/************
**
** File:  commonjs.js
**
** Description:  The most common utility functions. 
**
** Copyright Sphere Points 2003
**
************/


	if( document.images )
	{

		iHome_lit      = new Image;
		iHome_off      = new Image;
		iMarkets_lit   = new Image;
		iMarkets_off   = new Image;			
		iProducts_lit  = new Image;
		iProducts_off  = new Image;
		iContact_lit   = new Image;
		iContact_off   = new Image;
		iAbout_lit     = new Image;
		iAbout_off     = new Image;

		iHome_lit.src         = "Images/btnHome_lit.jpg";
		iHome_off.src         = "Images/btnHome.jpg";
		iMarkets_lit.src      = "Images/btnMarkets_lit.jpg";
		iMarkets_off.src      = "Images/btnMarkets.jpg";
		iProducts_lit.src     = "Images/btnProducts_lit.jpg";
		iProducts_off.src     = "Images/btnProducts.jpg";
		iContact_lit.src      = "Images/btnContact_lit.jpg";
		iContact_off.src      = "Images/btnContact.jpg";
		iAbout_lit.src        = "Images/btnAbout_lit.jpg";
		iAbout_off.src        = "Images/btnAbout.jpg";

	}


	function roll( szField, szImg )
	{
		if( document.images )
		{	
			parent.document[szField].src=eval( szImg + ".src" );
		}
	}


	function popupWindow(url, width, height )
	{
		var myWindow = window.open(url,
		"popupWin",
		"dependent=yes,status=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
		myWindow.focus();
		return false;
	}

	
	function getDomain()
	{ 
		document.write( "@" + "pow" + "rmat" + "ic.c" + "om" ); 
	}

	function getMailLink( szAddr, szText )
	{
		document.write( "<a hr" + "ef='ma" + "ilt" + "o:" + szAddr );
		getDomain();
		document.write( "'>" );
	
	}
	
