function confirm_goto_nextpage()
{
  var goto_page= confirm("Are you sure you want to leave this page?");
  if (goto_page== true)
    return 1;
  else
    return 0;
}

function hideLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = "none";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = "none";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = "none";
	}
}

function showLayer(whichLayer)
{
	showLayer(whichLayer,"block");
}

function showLayer(whichLayer,whichStyle)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":whichStyle;
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":whichStyle;
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":whichStyle;
	}
}

function writeText( layer,text ) { 
	if( document.getElementById ) 
	{ 
		document.getElementById( layer ).innerHTML = text; 
	}
	else if( document.all ) 
	{ 
		document.all[layer].innerHTML = text; 
	}
	else
	{ 
		document[layer].document.open(); 
		document[layer].document.write( text ); 
		document[layer].document.close(); 
	} 
} 

var is_IE = document.all?true:false;
if (!is_IE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = getMouseXY;

var mouse_posX = 0;
var mouse_posY = 0;

function getMouseXY(e) 
{
	if (is_IE) { // grab the x-y pos.s if browser is IE
		mouse_posX = event.clientX + document.body.scrollLeft;
		mouse_posY = event.clientY + document.body.scrollTop;
	}
	else {  // grab the x-y pos.s if browser is NS
		mouse_posX = e.pageX;
		mouse_posY = e.pageY;
	}  
	if (mouse_posX < 0){mouse_posX = 0;}
	if (mouse_posY < 0){mouse_posY = 0;}  
	
	return true;
}

function positionLayer(poslayer,posx,posy)
{
	if( document.getElementById ) 
	{
		document.getElementById(poslayer).style.left = posx;
		document.getElementById(poslayer).style.top = posy;
	}
	else if ( document.all )
	{
		document.all[poslayer].style.left = posx;
		document.all[poslayer].style.top = posy;
	}
}

