if(agent=="ie"){
  for(i=0;i<document.images.length;i++){
      if (document.images[i].className=="top" || document.images[i].className=="bot"){
        Edge=document.images[i];
        Edge.src="zero.gif";
      }
   }
}

function Calculate1(){
  //Menu=document.getElementById("prod");
  //alert(Menu.top);
  //Punkt=Menu.getElementsByTagName("p");
  //Menu.style.paddingRight=0,005/Menu.top
}

function Calculate(){
   //alert(props(document.getElementsByTagName("div")[0],""));
/*   Divs=document.getElementsByTagName("div");
   for(n=0; n<=Divs.length; n++){
   	//alert(Divs[n].parentNode.offsetTop);
   	Divs[n].style.backgroundPositionY=-1*(Divs[n].parentNode.offsetTop+Divs[n].parentNode.clientHeight-6*(n+1));
   	//alert(Divs[n].style.backgroundPositionY);
   }*/
}

function View(arg,flag){
  Ttl=arg.title;
  if(!flag) img=arg.src.split("t.")[0]+".jpg";
  else img=arg.src.split("t.")[0]+".gif";
  Foto=window.open('../foto.html','foto', 'resizable=0, width=450, height=450, scrollbars=no, status=no, menubar=no');
  Foto.focus();
}

var prevSubMenu;
var prevHead;

function Sub2act(subMenu,head){
  if(prevHead) with(prevHead.style){
  	backgroundColor="";
  	color="";
  }

  prevHead=head.childNodes[1].childNodes[0];
  prevHead.style.backgroundColor="#4a676b";
  prevHead.style.color="white";

  if(prevSubMenu) prevSubMenu.style.display="";
  document.getElementById(subMenu).style.display="block";
  prevSubMenu=document.getElementById(subMenu);
}
function Sub2close(){
  if(prevSubMenu) prevSubMenu.style.display="";
  if(prevHead) with(prevHead.style){
  	backgroundColor="";
  	color="";
  }
}

var curCell=0;
var z=0;


function Act(cell,Color){
  cell.style.backgroundImage="url(../act_"+Color+".jpg)";
  cell.style.color="white";
  if(curCell!=0 && curCell!=cell){
  	if(curCell.childNodes[3])
  		if(curCell.childNodes[3].style.display=="block"){
  		//alert(curCell.childNodes[3].style.display);
  		curCell.childNodes[3].style.display="";
  		reAct(curCell);
  	}
  //document.writeln(props(curCell.childNodes,""));
  }
  curCell=cell;
}


function Show(cell){
  cell.childNodes[3].style.display="block";
  curCell=cell;
}

function Hide(){
  if(curCell!=0){
  	if(curCell.childNodes[3])
  		if(curCell.childNodes[3].style.display=="block"){
  		curCell.childNodes[3].style.display="";
  		reAct(curCell);
  	}
  }
}

function reAct(cell){
  //document.writeln(props(cell.childNodes[1],""));
  if(cell.childNodes[childNumber])
    if(cell.childNodes[childNumber].style.display=='block'){
  	return false;
    }
  else {
  	cell.style.backgroundImage="";
  	cell.style.color="";
  	if(cell.childNodes[childNumber])
  		cell.childNodes[childNumber].style.display="";
  }
}

var oldCell;
var oldSubCell;

function subAct(cell){
  if(oldCell){
  	oldCell.style.backgroundColor="transparent";
  	oldCell.style.color="";
  	if (oldSubCell) oldSubCell.style.display="none";
  }
  cell.style.backgroundColor="#4a676b";
  cell.style.color="white";
  oldCell=cell;
}

function reSubAct(cell){
  cell.style.backgroundColor="transparent";
  cell.style.color="";
}

function subAct2(cell){
  if(oldCell){
  	oldCell.style.backgroundColor="transparent";
  	oldCell.style.color="";
  }
  cell.style.backgroundColor="black";
  cell.style.color="white";
  oldCell=cell;
}

var XPos;

function CalcPos(event){
  XPos=event.clientX;
  if(XPos>360) Sub2close();
 // if(event.relatedTarget != oldSubCell) oldSubCell.style.display="none";
}

if(document.addEventListener)
	document.addEventListener("mousemove", CalcPos, false);



function reSubAct1(cell,subCell,event){
//  alert(event.clientX);
/*  if(event.toElement) {
    if(event.toElement != document.getElementById(subCell)){
  	//alert(event.clientX);
  	cell.style.backgroundColor="transparent";
  	cell.style.color="";
  	document.getElementById(subCell).style.display="none";
    }
  }*/
  //if(event.clientX <172){
  	cell.style.backgroundColor="transparent";
  	cell.style.color="";
//  	oldSubCell.style.display="none";
//  }
}

function reSubAct2(cell){
  cell.style.backgroundColor="transparent";
  cell.style.color="";
}

function sub2on(cell){
  oldSubCell=document.getElementById(cell);
  oldSubCell.style.display="block";
}
function sub2off(cell){
  cell.style.display="none";
}

var Cell;
var Timer;

function SubMenu(cell){
  Cell=cell;
  Timer= setTimeout("ShowSubMenu(Cell)",300);
}

function HideSubMenu(){
  //alert(Start);
  clearTimeout(Timer);
  Cell.childNodes[1].style.display='none';
}

function ShowSubMenu(cell){
  Cell.childNodes[1].style.display='inline';
}

function Translate(old,lang){
  langold="/"+old+"/";
  addr=window.top.location.href.split(langold);
  window.top.location.href=addr[0]+"/"+lang+"/"+addr[1];
}
function Light(pic){
  	pic.src=pic.src.split("1.gif")[0]+".gif";
}
function Shade(pic){
  	pic.src=pic.src.split(".gif")[0]+"1.gif";
}


