var PreviousStyle, PleaseWaitDivStyle, objItem;

	function showPleaseWait()
	{
		PleaseWaitDivStyle.visibility='visible';
	}
	
	function setBorder(bttnID)
	{
		document.getElementById(bttnID).border='2';
	}

	function removeBorder(bttnID)
	{
		document.getElementById(bttnID).border='0';
	}

	function showText(StyleName, imageName)
	{
		if( PreviousStyle == '' )
			return;
		objItem = document.getElementById(PreviousStyle).style;
		objItem.display="none";
		objItem = document.getElementById(StyleName).style;
		objItem.display="block";
		PreviousStyle = StyleName;

		document.getElementById('img'+StyleName).src = imageName;// problem
		
		PleaseWaitDivStyle.display='none';

		return;
	}

	function init() 
	{
		PleaseWaitDivStyle = document.getElementById('PleaseWaitDiv').style;
		
		//If coming from the main page with ?client=EquiMark then change to that div.
		var sLocation = new String(document.location);
		if( sLocation.indexOf("ConferenceConnex") > 0 )
		{
			//PreviousStyle = UtahStateStyle;
			PreviousStyle = 'ConferenceConnex';
			showText(PreviousStyle, "samples/art-CC.jpg");
		}
		else if( sLocation.indexOf("Alliedresource") > 0 )
		{
			//PreviousStyle = UtahStateStyle;
			PreviousStyle = 'Alliedresource';
			showText(PreviousStyle, "samples/art-ARC-small.jpg");
		}
		else
		{
			//PreviousStyle = UtahStateStyle;
			PreviousStyle = "GFS";
			showText(PreviousStyle, "samples/art-gfs.jpg");
		}
	}

	function openNewWindow(pgnew) 
	{
		mywin = top.open(pgnew, "ApexConnex", "toolbar=0,scrollbars=1,location=0,menubar=no,status=no,resizable=1,height=690,width=660,top=100,left=100");
		mywin.location = pgnew;
	}
