// load_external_file( '/js/jquery-latest.js', 'js' );
// load_external_file( '/js/rotate.js', 'js' );
var ar = new Array( );
i = 0;
ar[i++] = '<a href="http://www.UnrealWebTraffic.com/member" style="text-decoration: none;"><ul><li><h2>Free Membership</h2><strong>Insider Information</strong> - free in-depth Internet Marketing training for you!</li></ul></a>';
ar[i++] = '<ul><li><a href="http://www.twitter.com/unrealwebtraff" style="text-decoration: none;" target="_blank"><h2>Twitter</h2>Don\'t miss a single post, follow <b>Unreal Web Traffic</b> on Twitter</a>.</li></ul>';
ar[i++] = '<ul><li><a href="http://www.facebook.com/group.php?gid=102711346593" style="text-decoration: none;" target="_blank"><h2>Facebook</h2>Join the <b>Unreal Web Traffic</b> group on Facebook and colaborate with other marketers</a>.</li></ul>';

$( function( )
   {
      initialize_rotate( 'header', ar, 850, 'fade', 7000 );
   } );


function load_external_file( filename, filetype )
{
	if( filetype == 'js' )
	{
		var fileref = document.createElement( 'script' );
		fileref.setAttribute( 'type', 'text/javascript' );
		fileref.setAttribute( 'src', filename );
	}
	else if( filetype == 'css' )
	{
		var fileref = document.createElement( 'link' );
		fileref.setAttribute( 'rel', 'stylesheet' );
		fileref.setAttribute( 'type', 'text/css' );
		fileref.setAttribute( 'href', filename );
	}
	if( typeof( fileref ) != 'undefined' )
	{
		document.getElementsByTagName( 'head' )[ 0 ].appendChild( fileref );
	}
}

function write_social_invite_block( float )
{
   document.write( '<div class="bl" style="float:' + float + ';"><div class="br"><div class="tl"><div class="tr">Have you connected with me on <strong><a href="http://www.facebook.com/richard.pickett" target="_blank">Facebook</a></strong>,<br />joined the <strong><a href="http://www.facebook.com/group.php?gid=102711346593" target="_blank">Unreal Web Traffic Facebook Group</a></strong>,<br />and <strong><a href="http://www.twitter.com/unrealwebtraff" target="_blank">twittered</a></strong> me yet?<br />Don\'t wait - you don\'t want miss out<br />on any free information or updates!</div></div></div></div>' );
}

function write_float_block( float, text, width )
{
   document.write( '<div class="bl" style="float:' + float + ';' + ( width != null ? 'width:' + width : '' ) + '"><div class="br"><div class="tl"><div class="tr">' + text + '</div></div></div></div>' );
}

function write_attached_files_download_block( ar )
{
	var txt = '';
	for( i in ar )
	{
		txt = txt + '<a class="member_download" href="http://www.UnrealWebTraffic.com/?s2member_file_download=' + ar[ i ][ 'file' ] + '" title="' + ar[ i ][ 'title' ] + '"><img src="http://www.UnrealWebTraffic.com/images/' + ar[ i ][ 'type' ] + '.png"></a>';
	}
	/*	document.write( '<div style="float:right;" class="blue_line_t"><div class="blue_line_r"><div class="blue_line_b"><div class="blue_line_l"><div class="blue_line_bl"><div class="blue_line_br"><div class="blue_line_tr"><div class="blue_line_tl">' + txt + '</div></div></div></div></div></div></div></div>' ); */
	document.write( '<div class="download_div">DOWNLOADS<br>' + txt + '</div>' );
}

function convert_member_downloads_to_alert( )
{
	$( '.member_download' ).click( function( ) { alert( 'Please sign in or register for your free\nmembership account to download.\n\n(link is in the right column)' ); return false; } );
}


