/* hash */

var hash=escape(self.location.pathname);
if (hash)
{
	var testeradframe = hash.indexOf('adframe');
	if (testeradframe==-1)
	{	
		var testerhtm = hash.indexOf('.htm');
		if (testerhtm == -1)
		{
			hash+='index.html';
		}
		var temp='/cgi-bin/adframe'+hash;
		top.location=temp 
	}
}


/* genericOpen */

function genericOpen(name,url,width,height)
{
	var genmesg = open(url,name,"toolbar=0,status=1,menubar=0,resizable=yes,scrollbars=yes,width="+width+",height="+height); 
}

function genericOpenNoScroll(name,url,width,height)
{
	var genmesg = open(url,name,"toolbar=0,status=1,menubar=0,resizable=no,scrollbars=no,width="+width+",height="+height); 
}


// layer-code
	var layerNumShowing=0;
	function init()
	{
        if (navigator.appName == "Netscape") 
		{
				layerStyleRef="layer.";
				layerRef="document.layers";
				styleSwitch="";
        }
		else
		{
				layerStyleRef="layer.style.";
				layerRef="document.all";
				styleSwitch=".style";
		}
	}
	
	



	function showLayerNumber(number)
	{
		var layerNumToShow=number;
		hideLayer(eval('"layer' + layerNumShowing+'"'));
		showLayer(eval('"layer' + layerNumToShow+'"'));
		layerNumShowing=layerNumToShow;	
	}
	
	var testlayer = null;
	
	function showLayer(layerName)
	{
		if (document.getElementById)
		{
			testlayer = document.getElementById(layerName);
			if (testlayer)
			{
				testlayer.style.visibility="visible";
			}
		}
		else
		{
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}
	}
	
	function hideLayer(layerName)
	{
		if (document.getElementById)
		{
			testlayer = document.getElementById(layerName);
			if (testlayer)
			{
				testlayer.style.visibility="hidden";
			}
		}
		else
		{	
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}
	}
	
	function deselectLayerNumber(number)
	{
		var layerNumToShow=number;
		hideLayer(eval('"layer' + layerNumShowing+'"'));
	}
	onLoad=init()
	
	
	
	function switchlayer(Layer_Name)
	{
 		var GECKO = document.getElementById? 1:0 ;
  		var NS = document.layers? 1:0 ;
  		var IE = document.all? 1:0 ;
	
	if (GECKO)
       {document.getElementById(Layer_Name).style.display=(document.getElementById(Layer_Name).style.display=='block') ? 'none' : 'block';}
  	else if (NS)
       {document.layers[Layer_Name].display=(document.layers[Layer_Name].display=='block') ? 'none' : 'block';}
	else if (IE)
       {document.all[Layer_Name].style.display=(document.all[Layer_Name].style.display=='block') ? 'none' : 'block';}
	}