/*******************************************************************************
*
*	file:		General Javascript functionality for thegameindustry
*
*******************************************************************************/

/***************************************************************************
*
*	function:		Writes out a contact email for thegamesindustry - the
*					opening <a>
*
***************************************************************************/
function generate_email() 
{
	var mailBit1="ct@the";
	var mailBit2="gamesindustry.n";
	document.write( "<a href='mai" );
	document.write( "lto:conta" + mailBit1 + mailBit2 + "et'>" );
}


/***************************************************************************
*
*	function:	Writes out a (hopefully) spamproof "mailto:" link.
*				address is built by concatenating args in reverse order
*				eg:
*				gen_mailto( "email me", "com", "megacorp", "cubedweller" );
*
***************************************************************************/
function gen_mailto()
{
	var i = arguments.length-1;
	var addr = arguments[ i ] + '@';
	i--;

	while( i>=1 )
	{
		addr += arguments[i] + '.';
		i--;
	}
	addr += arguments[0];
	document.write( '<a href="mai' );
	document.write( 'lto:' + addr + '">' + addr + '</a>' );
}

