function homepageswf() {
	//flash vars and params
	var rand = (Math.random() * 100000)|0;
	var path = "/main/wb_portal.swf?" + rand;
	var s = new swfIN(path, "flashMovie", "1000", "614");

	s.scrollbarAt(1000, 614);
	s.useExpressInstall("/main/expressInstall.swf", "1000", "614");

	//player requirements & redirect URL  |  [optional]  |  required flash version (array), url(string), pass querystring param(boolean)
	s.detect( [9,0,45] , "/all/us/plugins/flash.html", false);
	s.addParam("bgcolor", "#000000");
	s.addParam("menu", "true");
	s.addParam("allowFullScreen", "true");
	s.addParam("swLiveConnect", "true");
	s.addParam("allowScriptAccess", "always");

	s.hideSEO("div_seo");

	s.useSWFAddress();

	s.write();
}
function homepagefooter() {
	var yr = new Date();
	d.write("<div style=\"float:left;clear:left;\" class=\"footer\"><a href=\"javascript:popWin('/main/advertisewithwb.html','w320x240',320,240,0,0,0,0,0,0,0,1);\">Advertise With Us</a>");
	// Community logos. Title tag is required for Firefox browsers to display tooltip
	d.write("<a href=\"http://www.facebook.com/warnerbrosent\" target=\"_blank\" style=\"margin-left:65px;\"><img src=\"/main/img/communitylogos/facebook.gif\" class=\"communitylogo\" alt=\"Friend us on Facebook\" title=\"Friend us on Facebook\"/></a>");
	d.write("<a href=\"http://twitter.com/Warnerbrosent\" target=\"_blank\" style=\"margin-left:46px;\"><img src=\"/main/img/communitylogos/twitter.gif\" class=\"communitylogo\" alt=\"Follow us on Twitter\" title=\"Follow us on Twitter\"/></a>");
	d.write("<a href=\"http://www.youtube.com/user/WarnerBrosOnline\" target=\"_blank\" style=\"margin-left:46px;\"><img src=\"/main/img/communitylogos/youtube.gif\" class=\"communitylogo\" alt=\"Watch us on YouTube\" title=\"Watch us on YouTube\"/></a>");
	
	d.write("<a href=\"https://www.surveymonkey.com/s.aspx?sm=6z3FcbVzRe9G3g9cpRPk9w_3d_3d\" target=\"_blank\" style=\"margin-left:90px;\">Survey: Tell Us What You Think</a></div>");
	d.write("<div style=\"float:right;clear:none;\" class=\"footer\">TM &amp; &copy; "+yr.getFullYear()+" Warner Bros. Entertainment Inc. All rights reserved.</div>");
}
function showfooter() {
	var lyrObj = (d.layers)?d['footer']:d.all?d.all['footer'].style:d.getElementById('footer').style;
	lyrObj.visibility = "visible";
	window.clearTimeout();
}
function displaypage() {
	var pgval = "";
	pgval += "<div align=\"center\">";
	pgval += "<script language=\"javascript\" onLoad=\"window.document.flashMovie.focus();\">homepageswf();</script>";
	pgval += "<div id=\"footer\"><script language=\"javascript\">homepagefooter();</script></div>";
	pgval += "</div>";
	pgval += "<script language=\"javascript\" type=\"text/javascript\">window.setTimeout('showfooter()', '5000');</script>";
	//pgval += "<script src=\"https://www.surveymonkey.com/jsPop.aspx?sm=wf8zpbLvUyfbqWfoR0_2fr_2fQ_3d_3d\"> </script>";
	d.write(pgval);

	// google analytics call
	try {
	var pageTracker = _gat._getTracker("UA-8926407-1");
	pageTracker._trackPageview();
	} catch(err) {}
	// end google analytics call

}
//function validateWindow(winName, content) {
//	var win = open("", winName);
//	if (win) setContent();
//	else setTimeout(checkOpened, 1000);
//	function setContent() {
//		win.document.write(content);
//		win.focus();
//		win.print();
//	}
//	function checkOpened() {
//		if (!win) alert("Please enable popups for this site.");
//		else setContent();
//	}
//}
function validateWindow(url, winName) {
	var win = open(url, winName);
	if (!win) alert("Please enable popups for this site.");
}

// google analytics include
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
document.write(unescape("%3C/script%3E"));
// end google analytics include
