/*
call this function to create the javscript, that will, in turn, call the adserver.
this file should be included once on any page that wants to request an advert

zone_id :	- the zone id for the location of the banner to be served.
			- a zone represents a banner size and [site] location


example call to write_adserver_script

<script type="text/javascript">
try {
	var my_zone_id = 1234;
	write_adserver_script( my_zone_id );
}
catch( some_horrid_exception ) {
	// something bad happened
}
</script>

*/

function write_adserver_script( zone_id ) {
	if( zone_id == '' || zone_id == 0 ) {
		return;
	}

	// begin create code.
	// please do not edit below.
	if( ! document._used ) {
		document._used = ',';
	}
	var _random = new String( Math.random( ) ); 
	_random = _random.substring( 2, 11 );

	document.write( "<" + "script type='text/javascript' src='" );
	document.write( "http://dolphin.icebergmedia.com/adjs.php?n=" + _random );
	document.write( "&amp;what=zone:" + zone_id );
	document.write( "&amp;block=1" );
	document.write( "&amp;exclude=" + document._used );
	if( document.referer )	{
		document.write( "&amp;referer=" + escape( document.referer ) );
	}
	document.write( "'><" + "/script>" );
}

