//
// Site header javascript functions
// (C) 2002 Mindworks Industries
//
	
	// authentication and unauthentication POSTs
	function doAuth(formname)
	{
		if (formname == 'loginform')
		{
			document.loginform.submit();
		}
		else if (formname == 'logoutform')
		{
			document.logoutform.submit();
		}
		else
		{
			alert('Error: unknown formname in doAuth (common_header.js)');
		}
	}
	
	function popWindow(strURL, intWidth, intHeight)
	{
		window.open(strURL, '', 'width=' + intWidth + ', height=' + intHeight + ', toolbar=0, directories=0, menubar=0, status=0, resizable=no, location=0, scrollbars=yes, copyhistory=0');
	}
	
	function build(strName, strDomain, strText, strClass)
	{
	    var s = '<';
	    s += 'a';
	    s += ' h';
	    s += 'ref';
	    s += '='
	    s += '\'ma';
	    s += 'ilt';
	    s += 'o:';
	    s += strName+String.fromCharCode(68-4)+strDomain;
	    s += '\'';
	    if(strClass.length > 0)
	    {
	        s += ' class=\''+strClass+'\'';
	    }	    
	    s += '>'
	    if(strText.length > 0)
	    {
	        s += strText
	    }
	    else
	    {
	        s += strName+String.fromCharCode(68-4)+strDomain;
	    }
	    s += '</';
	    s += 'a';
	    s += '>';
	    document.write(s);
	}
	
	

