// JavaScript Document

function popDiv(theDiv, theTop, theWidth, theHeight)
{
	setStyleById(theDiv, 'width', theWidth+'px');
	setStyleById(theDiv, 'height', theHeight+'px');
	setStyleById(theDiv, 'top', theTop+'px');
	var docWidth = Math.max(document.documentElement.clientWidth, document.body.clientWidth);
	setStyleById(theDiv, 'position', 'absolute');
	setStyleById(theDiv, 'left', ((docWidth-theWidth)/2)  + 'px');
	setStyleById(theDiv, 'zIndex', '150');
	//setStyleById(theDiv, 'visibility', 'visible');
	setVisible(theDiv);
}
	
//set visibility and reduce width of close bar by amount of padding
function setVisible(theDiv)
{
	theDiv = document.getElementById(theDiv);
	theClose=document.getElementById('close');//set width of close bar
	closeWidth=theDiv.style.width;//get width of popwindow
	closeWidth=closeWidth.slice(0, closeWidth.length-2);//chop of px
	closeWidth=closeWidth-4;//reduce width by padding amount
	theClose.style.width= closeWidth+'px';//set width of close bar
	theDiv.style.visibility = (theDiv.style.visibility == 'visible') ? 'hidden' : 'visible';	
}

function doResize()
{
	setStyleById("contactLr", "visibility", "hidden");//hide  layer
	setStyleById("privacyLr", "visibility", "hidden");//hide  layer
	window.focus();//return focus to winodw
}


