function switchOn(menuname)
{
	//document.getElementById(menuname).style.visibility = "visible";
	document.getElementById(menuname).style.display = "block";
	/*
	if(document.body.clientWidth < 1038)
	{
		document.getElementById('subnav').style.top = '58px';
	} else {
		document.getElementById('subnav').style.top = '81px';
	}
	*/
	document.getElementById('subnav').style.top = '81px';
	document.getElementById('subnav').style.left = ((document.body.clientWidth-962)/2) + 'px';
	//alert(document.body.clientWidth);
}
function switchOff(menuname)
{
	//document.getElementById(menuname).style.visibility = "hidden";
	document.getElementById(menuname).style.display = "none";
	document.getElementById('subnav').style.top = '-273px';
}

function passer()
{
	document.getElementById('wrap').style.height = (document.body.clientHeight-154)+'px';
}
function WriteSwf(img,wsize,hsize){
    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\""+wsize+"\" height=\""+hsize+"\">");
    document.write("<param name=\"movie\" value=\""+img+"\">");
    document.write("<param name=\"menu\" value=\"false\">");
    document.write("<param name=\"quality\" value=\"high\">");
    document.write("<param name=\"wmode\" value=\"transparent\">");
    document.write("<param name=\"allowScriptAccess\" value=\"always\">");
    document.write("<param name=\"scale\" value=\"noborder\">");
    document.write("<embed src=\""+img+"\" quality=\"high\" allowScriptAccess=\"always\" scale=\"noborder\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\""+wsize+"\" height=\""+hsize+"\"></embed>");
   	document.write("</object>");
}
function Go(x)
{
 if(x == "nothing")
 {
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
   return;
 }
 else if(x == "end") top.location.href = parent.frames[0].location;
 else
  {
   top.location.href = x;
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
  }
}

function popup(Fn, X, Y, Scroll)
{
 l = (screen.width) ? (screen.width-550) / 2 : 0;
 t = (screen.height) ? (screen.height-600) / 2 : 0; 
 NewWindow=window.open(Fn,'newwindow','width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+Scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}
