	//
	//	Monitor Resolution		Minimum Live Space		Maximum Live Space 
	//	640 x 480				623 x 278				635 x 380 
	//	800 x 600				783 x 398				795 x 500 
	//	1024 x 768				1007 x 566				1019 x 668 
	//	1152 x 870				1135 x 668				1147 x 770 
	//
	
	var m_oInfoWindow = null;
	var m_oAppWindow = null;
	var m_oAlertWindow = null;
	var m_oImageViewer = null;

	function OpenInfoWindow( URL )
	{
		try
		{
			m_oInfoWindow.document.location.href = URL;
			m_oInfoWindow.focus();
		}
		catch ( Exception )
		{
			m_oInfoWindow = winOpen( URL, '', 640, 600, true, false, false, false, false, false );
			m_oInfoWindow.focus();
		}
	}

	function OpenAlertWindow( URL )
	{
		try
		{
			m_oAlertWindow.document.location.href = URL;
			m_oAlertWindow.focus();
		}
		catch ( Exception )
		{
			m_oAlertWindow = winOpen( URL, '', 300, 169, true, false, false, true, false, false );
			m_oAlertWindow.focus();
		}
	}

	function OpenAppWindow( URL )
	{
		try
		{
			m_oAppWindow.document.location.href = URL;
			m_oAppWindow.focus();
		}
		catch ( Exception )
		{
			m_oAppWindow = winOpen( URL, 'Application', 1024, 768, true, false, false, true, false, false );
			m_oAppWindow.focus();
		}
	}

	function OpenImageViewer( URL )
	{
		try
		{
			m_oImageViewer.document.location.href = URL;
			m_oImageViewer.focus();
		}
		catch ( Exception )
		{
			m_oImageViewer = winOpen( URL, 'Images', 953, 620, true, false, false, true, false, false );
			m_oImageViewer.focus();
		}
	}

	function winOpen( URL, windowName, width, height, resizable, location, menubar, scrollbars, status, toolbar )
	{
		var windowFeatures;
		windowFeatures = '';
		if (width != '' && width != null)
		{
			windowFeatures = windowFeatures + 'width=' + width + ',';
		}
		if (height != '' && height != null)
		{
			windowFeatures = windowFeatures + 'height=' + height + ',';
		}
		if (resizable)
		{
			windowFeatures = windowFeatures + 'resizable,';
		}
		if (location)
		{
			windowFeatures = windowFeatures + 'location,';
		}
		if (menubar)
		{
			windowFeatures = windowFeatures + 'menubar,';
		}
		if (scrollbars)
		{
			windowFeatures = windowFeatures + 'scrollbars,';
		}
		if (status)
		{
			windowFeatures = windowFeatures + 'status,';
		}
		if (toolbar)
		{
			windowFeatures = windowFeatures + 'toolbar,';
		}
		return window.open( URL, windowName, windowFeatures );
	}

	function getstylebyID( ID )
	{
		if ( ID == null )
		{
			return null;
		}
		if ( document.getElementById && document.getElementById( ID ) )
		{
			return document.getElementById( ID ).style;
		}
		else if ( document.all && document.all( ID ) )
		{  
			return document.all( ID ).style;
		} 
		else if ( document.layers && document.layers[ ID ] )
		{ 
			return document.layers[ ID ];
		}
		else
		{
			return null;
		}
	}

	function getobjectbyID( ID )
	{
		if ( ID == null )
		{
			return null;
		}
		if ( document.getElementById && document.getElementById( ID ) )
		{
			return document.getElementById( ID );
		}
		else if ( document.all && document.all( ID ) )
		{  
			return document.all( ID );
		} 
		else if ( document.layers && document.layers[ ID ] )
		{ 
			return document.layers[ ID ];
		}
		else
		{
			return null;
		}
	}

	function showimageviewer( URL )
	{
		var oViewer		= window.parent.getstylebyID( 'imageviewer' );
		var oViewerObj	= window.parent.getobjectbyID( 'imageviewer' );
		var oHeight		= document.documentElement.clientHeight;
		var oWidth		= document.documentElement.clientWidth;

		if ( oHeight >= 700 )
		{
			oViewer.top = ( ( oHeight - 651 ) / 2 ) + "px";
			window.parent.getstylebyID( 'imageviewermask' ).display = "block";
			oViewer.display = "block";
			oViewer.left = ( ( oWidth - 958 ) / 2 ) + "px";
			window.parent.getobjectbyID( 'imageviewerframe' ).src = "javascript:'<big><b>Loading . . .</b></big>'";
			setTimeout( 'IFrameNavTo(\'' + URL + '\')', 1500 );	
		}
		else
		{
			OpenImageViewer( URL )
		}	
	}

	function IFrameNavTo( URL )
	{
		window.parent.getobjectbyID( 'imageviewerframe' ).src = URL;
	}

	function hideimageviewer()
	{
		window.parent.getstylebyID( 'imageviewer' ).display = "none";
		window.parent.getstylebyID( 'imageviewermask' ).display = "none";
	}

	function CloseButtonOn()
	{
		document.getElementById( 'CloseButton' ).src = "../images/viewer/close-over.gif";
	}

	function CloseButtonOff()
	{
		document.getElementById( 'CloseButton' ).src = "../images/viewer/close-norm.gif";
	}

	function SendMail( UserName )
	{
		var sDomain = "comcept" + "." + "net";
		var sEmail = UserName + "@" + sDomain;
		var sProtocol = "mailto:";
		var sURL = sProtocol + sEmail;
		window.open( sURL, "mailer" );
	}

	function TriggerCounter( CounterName )
	{
		var sCounterUrl;
		sCounterUrl = "http://www.comcept.net/common/";
		sCounterUrl += "counter.asp";
		sCounterUrl += "?counter=" + CounterName;
		WebGet( sCounterUrl );
	}

	function WebGet( URL )
	{
		var oXmlHttp = GetXmlHttp();
		oXmlHttp.open( 'GET', URL, false );
		oXmlHttp.setRequestHeader( 'Content-Type', 'text/html' );
		oXmlHttp.send();
		return oXmlHttp.responseText;
	}				

	function WebPost( URL, Data )
	{
		var oXmlHttp = GetXmlHttp();
		oXmlHttp.open( 'POST', URL, false );
		oXmlHttp.setRequestHeader( 'Content-Type', 'text/html' );
		oXmlHttp.send( Data );
		return oXmlHttp.responseText;
	}

	function GetXmlHttp()
	{
		try
		{
			var oReturn = new XMLHttpRequest;
		}
		catch(e)
		{
			var oReturn = new ActiveXObject( "Msxml2.XMLHTTP.3.0" );
		}
		return oReturn;
	}