


/* INFOPOP FORUMS */

/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : set variables
set global variable passed in from url string: either query or path
*/
var category;

var theLocalSearch = window.location.search;
if (theLocalSearch) { category = getParam("f"); }

var fsSplitLocalPath = (window.location.pathname).split("/");
for (fp = 0; fp < fsSplitLocalPath.length; fp++) { if (fsSplitLocalPath[fp] == "f") { category = fsSplitLocalPath[fp + 1]; break; } }

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

var categories = new Array(["4921968606","0"],["1941998606","0"],["6451998606","0"],["8711904568","0"]);
var navigation = new Array(["global","/media/leftnav.xml"]);
var bannerURLs = new Array("/common/sgallery/dhd/forumbanner.gif");
var headerURLs = new Array("/common/sgallery/forum_hed.gif");


/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : functions
set variables, then execute document write functions
	- style = [leftnav / banners]
*/
function setLocalVars(style, network) {
	var theNum;
	for (i = 0; i < categories.length; i++) { if (category == categories[i][0]) { var theNum = categories[i][1]; break; } }
	
	if (style == "leftnav") {
		var navXML; var navSWF;
		if (theNum == "" || navigation[theNum][0] == "global") { navXML = "/media/netnav.xml"; navSWF = "/common/smedia/pagenetnav.swf"; }
		else {  navXML = navigation[theNum][1]; navSWF = "/common/smedia/package.swf"; }
		
		document.write("<div><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" id=\"leftnav\" width=\"150\" height=\"655\">");
		document.write("<param name=\"movie\" value=\"" + netURLString + navSWF + "?navxml=" + netURLString + navXML + "&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 + navSWF + "?navxml=" + netURLString + navXML + "&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>");
	}
	
	if (style == "banners") {
		document.write("<div><img src=\"" + netURLString + headerURLs[theNum] + "\" width=\"615\" height=\"25\" border=\"0\" alt=\"header\"></div>");
		document.write("<div><img src=\"" + netURLString + bannerURLs[theNum] + "\" 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 */
