// JavaScript Document
var current;
var photoWindow;

function Load(k){
  if (k == current) { return false;}
  switch (k){
    case 1: document.location.href="http://www.sinergos.ru/index.html";
	        break ;
    case 2: document.location.href="http://www.sinergos.ru/solution.htm";
	        break ;
    case 3: document.location.href="http://www.sinergos.ru/project.htm";
	        break ;
    case 4: document.location.href="http://www.sinergos.ru/equip.htm";
	        break ;
    case 5: document.location.href="http://www.sinergos.ru/about.htm";
	        break ;
    case 6: document.location.href="http://www.sinergos.ru/contact.htm";
	        break ;
    case 7: document.location.href="http://www.sinergos.ru/equip/bosch/bosch_eq.html";
	        break ;
	case 8: document.location.href="http://www.sinergos.ru/equip/folsom/folsom_eq.html";
	        break ;
	default: alert("how did ya do that????");
  }
  return true;
}

function turnOff(k) {
  if (k!=current){
      document.all['link'+k].style.background="#0000CC";
      document.all['link'+k].style.color="#FFFFFF";
  }
}

function turnOn(k) {
  if (k!=current){
      document.all['link'+k].style.background="#FFFFFF";
      document.all['link'+k].style.color="#0000CC";
  }
}

function turnOn2(k) {
      document.all['pic'+k].style.borderColor="#0000CC";
}

function turnOff2(k) {
      document.all['pic'+k].style.borderColor="#FFFFFF";
}

function turnOn3(k) {
      document.all['date'+k].style.textDecoration="underline";
      document.all['news'+k].style.textDecoration="underline";
}

function turnOff3(k) {
      document.all['date'+k].style.textDecoration="none";
      document.all['news'+k].style.textDecoration="none";
}

function turnOn4(k) {
  curMenu=event.srcElement;
  curMenu.style.background="#FFFFFF";
  curMenu.style.color="#0000CC";
}
 
function turnOff4(k) {
  curMenu=event.srcElement;
  curMenu.style.background="#0000CC";
  curMenu.style.color="#FFFFFF";
}

function underlineOn(){
  curMenu=event.srcElement;
  curMenu.style.textDecoration="underline";
}
 
function underlineOff(){
  curMenu=event.srcElement;
  curMenu.style.textDecoration="none";
}

function LoadPic(file){
  if (!photoWindow || photoWindow.closed) { 
      photoWindow = window.open("http://www.sinergos.ru/cgi-bin/photo.pl?img="+file, "photoWin", "toolbar=0 status=0 directories=0 Scrollbars=1 resizable=1 channelmode=0");
  } else{
	  photoWindow.focus();
	  photoWindow.document.location.href="http://www.sinergos.ru/cgi-bin/photo.pl?img="+file;
  }
}
