function fullFlashObject( url ) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="mainswf" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="' + url + '" />');
	document.write('<param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="wmode" value="" /><param name="scale" value="noscale" /><param name="swLiveConnect" value="true" />');
	document.write('<embed src="' + url + '" quality="high" width="100%"  height="100%" scale="noscale" bgcolor="#FFFFFF" wmode="" name="mainswf" align="middle" swLiveConnect=true allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');

}


function swapClass(i,c) { 

	if (document.getElementById) {  

	document.getElementById(i).className =  c;  

	} else {

	document.all[i].className = c;	

	}

}



function getElement( base, i ) {

	if (base.getElementById) {  

		return base.getElementById(i);  

	} else {

		return base.all[i];	

	}

}



function swapSrc(i,c) { 

	if (document.getElementById) {  

	document.getElementById(i).src =  c;  

	} else {

	document.all[i].src = c;	

	}

}



function preloadButtons()

{

	preloadImg( "assets/toplinkover.gif" );
	preloadImg( "assets/entersiteover.gif" );
	preloadImg( "assets/homelinkover.gif" );
	preloadImg( "assets/flashrequiredover.gif" );
	preloadImg( "assets/rssover.gif" );

	preloadImg( "assets/epone_over.gif" );
	preloadImg( "assets/watchoverone.gif" );
	preloadImg( "assets/eptwo_over.gif" );
	preloadImg( "assets/watchovertwo.gif" );
	preloadImg( "assets/epthree_over.gif" );
	preloadImg( "assets/watchoverthree.gif" );
	preloadImg( "assets/epfour_over.gif" );
	preloadImg( "assets/watchoverfour.gif" );
	preloadImg( "assets/epfive_over.gif" );
	preloadImg( "assets/watchoverfive.gif" );

//	preloadImg( "assets/epsix_over.gif" );
//	preloadImg( "assets/watchoversix.gif" );
//	preloadImg( "assets/epseven_over.gif" );
//	preloadImg( "assets/watchoverseven.gif" );
//	preloadImg( "assets/epeight_over.gif" );
//	preloadImg( "assets/watchovereight.gif" );

	
	preloadImg( "assets/woodsy_over.gif" );
	preloadImg( "assets/trailer_over.gif" );
	preloadImg( "assets/sendtofriendover.gif" );
	preloadImg( "assets/sweepsover.gif" );
	preloadImg( "assets/signupover.gif" );
	preloadImg( "assets/creditsover.gif" );

}

function preloadCreditsButtons()
{
	preloadImg( "assets/closeover.gif" );
}



//need to store the images globally so they don't go out of scope and not load.

//they appear to load in the order they are referenced on most browsers, so you

//can expect images to appear in the order you preload them.

preloadedImages = new Array();

function preloadImg( imgurl )

{

	var img = new Image();

	img.src = imgurl;

	preloadedImages[preloadedImages.length] = img;

}





function launchSite( theurl )

{

	var newwindow = window.open( theurl, "_blank", "", "true" );

	newwindow.focus();

}





function launchPopupNoChrome( theurl, name, width, height )

{

	var URLen = theurl;

	var winHeight = height;

	var winWidth = width;



	var windowNamen=name;

	var browserName=navigator.appName;

	var operatingSystem=navigator.platform;

	var version = parseFloat(navigator.appVersion);

	//var winWidth = window.screen.availWidth;

	//var winHeight = window.screen.availHeight;



	var thewindow;

	// Netscape check version 4.0+ on Win

	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)

	{

		 thewindow = window.open(URLen,windowNamen,'titlebar=no,width=' + winWidth +',height='+winHeight)

	}



	// MSIE Mac check

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'titlebar=no,width=' + winWidth +',height='+ winHeight )

	}



	// Netscape Mac check

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight);

	}



	// MSIE Windows

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		//window.open(URLen,windowNamen,'fullscreen=1,top=0,left=0');		 

		var win = window.open(URLen,windowNamen,'titlebar=no,toolbar=0,location=0,directories=0,status=1,resizable=1,scrollbars=1,menubar=0,width=' + (winWidth+20) +',height='+ winHeight );

		//win.resizeTo(screen.width, screen.height);

		thewindow = win;

		//win.moveTo(1, 1);

		//win.moveTo(0, 0);

		//win.resizeTo(screen.width, screen.height);

	}



		// Netscape Windows

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight );

	}



	else

	{

		thewindow = window.open(URLen,windowNamen);

	}

	thewindow.focus();

}





function launchFullScreen( theurl )

{

	URLen = theurl;

	var swfWidth = 500;

	var swfHeight = 400;

	

	// defaults, if we're not able to retrieve actual dimensions

	var winHeight = 800;

	var winWidth = 600;



	var windowNamen="mainwindow";

	var browserName=navigator.appName;

	var operatingSystem=navigator.platform;

	var version = parseFloat(navigator.appVersion);

	var winWidth = window.screen.availWidth;

	var winHeight = window.screen.availHeight;



	// Netscape check version 4.0+ on Win

	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)

	{

		 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + winWidth +',height='+winHeight+',screenX=0,screenY=0,top=0,left=0')

	}



	// MSIE Mac check

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + winWidth +',height='+ winHeight +',screenX=0,screenY=0,top=0,left=0')

	}



	// Netscape Mac check

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		winWidth = screen.width;

		winHeight = screen.height;

		window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight +',top=0,left=0');

	}



	// MSIE Windows

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		//window.open(URLen,windowNamen,'fullscreen=1,top=0,left=0');		 

		var win = window.open(URLen,windowNamen,'titlebar=no,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width=' + winWidth +',height='+ winHeight +',screenX=0,screenY=0,top=0,left=0');

		win.resizeTo(screen.width, screen.height);

		//win.moveTo(1, 1);

		//win.moveTo(0, 0);

		//win.resizeTo(screen.width, screen.height);

	}



		// Netscape Windows

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		winWidth = screen.width;

		winHeight = screen.height;		 

		window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight +',top=0,left=0');

	}



	else

	{

		window.open(URLen,windowNamen);

	}

	window.winWidth = winWidth;

	window.winHeight = winHeight;

}





function parseQueryString (str) {

  str = str ? str : location.search;

  var query = str.charAt(0) == '?' ? str.substring(1) : str;

  var args = new Object();

  if (query) {

    var fields = query.split('&');

    for (var f = 0; f < fields.length; f++) {

      var field = fields[f].split('=');

      args[unescape(field[0].replace(/\+/g, ' '))] = unescape(field[1].replace(/\+/g, ' '));

    }

  }

  return args;

}





