	function openPopupWindow(page, name)
	{
		newWin = window.open(page, name,'width=450, resizable=yes height=300, scrollbars=yes, left=10,top=20');
		if (window.focus) { newWin.focus() }
	}	
	/**
	*
	* Closes any existing popups before opening a new one
	* Any new windows will always have focus and you won't "loose" any existing windows
	*
	* Takes url for content and height and width for size of new window
	*/ 
	function popup( URL, width, height )
	{
		try
		{
			popup_window.close();
		}
		catch(e)
		{
					
		}
		
		popup_window=window.open( URL,"_popover","status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,width=" + width + ",height=" + height + ",screenX=100,screenY=100");	
		window.onerror = null;
	}
	
	function doProcessing() 
	{
		document.getElementById('submitBtn').className = 'thide'; 
		document.getElementById('processing').className = 'tshow';
	}
	
	function calculateCssProperties()
	{
		var pageName;
		if(document.getElementById('pagename')!=null)
		{
			pageName = document.getElementById('pagename').value;		
		}
		if(pageName!='index' & pageName!='prequal')
		{
			return;
		}
		var leftHeight = document.getElementById("leftSection").offsetHeight;		
		if(pageName=='index')
			document.getElementById("formBody").style.height=leftHeight-40;
		else if(pageName=='prequal')
			document.getElementById("formBody").style.height=leftHeight-40;
		else
			return;
		document.getElementById("container").style.height = document.getElementById("formBody").style.height+30;
		
		return;
	}	
