


/* INFOPOP FORUMS */

/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : set variables
- set global variable passed in from url string
*/
var category = getParam("f");

var netURLString = "http://www.discovery.com";
var netAbbr = "www";
var myDLoginURL = "http://my.discovery.com/MyDiscovery/login.html";
var myDChromeID = 0;

var categories = new Array(["3480944135","1"],["3290944135","1"],["5610974135","1"],["6810974135","1"]);
var pkgNavURLs = new Array("/media/leftnav.swf","/media/leftnav.swf");
var pkgBannerURLs = new Array("/common/sgallery/www/forumbanner.gif","/common/sgallery/www/forumbanner.gif");
var pkgHedURLs = new Array("/common/sgallery/forum_hed.gif","/common/sgallery/forum_hed.gif");


/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : functions
- style =(s) [leftnav / banners] | network =(s) [apl / dhc / dsc / tlc / trv / dhd]
*/
function setLocalVars(style, network) {
	if (category == "") { var theNum = 0; }
	else {
		for (i = 0; i < categories.length; i++) {
			if (category == categories[i][0]) { var theNum = categories[i][1]; break; } else { var theNum = 0; }
		}
	}
	
	var pkgNavURL = pkgNavURLs[theNum];
	var pkgHedURL = pkgHedURLs[theNum];
	var pkgBannerURL = pkgBannerURLs[theNum];
	doWrites(style, network, netURLString, pkgNavURL, pkgHedURL, pkgBannerURL);
}

function doWrites(style, network, netURLString, pkgNavURL, pkgHedURL, pkgBannerURL) {
	if (style == "leftnav") {
		document.write("<div><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" id=\"leftnav\" width=\"150\" height=\"655\">");
		document.write("<param name=\"movie\" value=\"" + netURLString + pkgNavURL + "?focus=00&baseurl=" + netURLString + "\" />");
		document.write("<param name=\"wmode\" value=\"opaque\" /><param name=\"quality\" value=\"high\" /><param name=\"scale\" value=\"exactfit\" /><param name=\"bgcolor\" value=\"#ffffff\" />");
		document.write("<embed src=\"" + netURLString + pkgNavURL + "?focus=00&baseurl=" + netURLString + "\" wmode=\"opaque\" name=\"leftnav\" quality=\"high\" scale=\"exactfit\" bgcolor=\"#ffffff\" width=\"150\" height=\"655\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object></div>");
	} else {
		document.write("<div><img src=\"" + netURLString + pkgHedURL + "\" width=\"615\" height=\"25\" border=\"0\" alt=\"header\"></div>");
		document.write("<div><img src=\"" + netURLString + pkgBannerURL + "\" width=\"615\" height=\"48\" border=\"0\" alt=\"banner\"></div>");
	}
}


/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : functions
- afix the chrome to login / logout / register process
*/
var nosiValue = getCookie("non_ot_session_info");
var theCValue = "c=" + myDChromeID;
if (nosiValue != theCValue) { setCookie("non_ot_session_info", theCValue); }


/* END INFOPOP */
