function switchvisibility(layerid, onoff) {

		var arrayPageSize = getPageSize();
		Element.setWidth('cover', arrayPageSize[0]);
		Element.setHeight('cover', arrayPageSize[1]);

	if (onoff == "on") {
		document.getElementById(layerid).style.display = "inline";
		if (document.getElementById("cover")) {
			document.getElementById("cover").style.display = "inline";
		}
	} else {
		document.getElementById(layerid).style.display = "none";
		if (document.getElementById("cover")) {
			document.getElementById("cover").style.display = "none";
		}
	}
}

function mypopup(url)
{
  mywindow = window.open (url, "","status=0,toolbar=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=360,width=540");
  mywindow.moveTo(180,350);
} 

//--- AJAX initiator ---//
function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
  return xmlHttp;
}

