/* ECOMMERCE TOWER */

/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : variables
- set basic variables
- outputTypeset to [flash] - 03.10.2006 //ccl
*/
var alertFlag = false;
var outputType = "flash";
var ecommItems = new Array(["/common/sgallery/ecomm/towers/1q06generic.gif","http://shopping.discovery.com/stores/servlet/Jumpzone?di=40588001&ci=36&ti=1000000","120","600"],["/common/smedia/promos/astro_120x600.swf","120","600"]);
var dirStr = window.location.pathname;
var dirStrChopped = dirStr.split("/"); if (dirStrChopped[1] == "sweepstakes") { alertFlag = true; }
var onesPlaceRandomNumber = Math.round(Math.random()*1);


/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : document.write
- writeout results
	- var htmlString; for anchored image
	- var flashString; for flash element
*/
var htmlString = "<a href=\"" + ecommItems[0][1] + "\" onclick=\"trackLink(\'tower/ecommerce\',\'" + window.location.hostname + "\')\;\"><img src=\"" + ecommItems[0][0] + "\" width=\"" + ecommItems[0][2] + "\" height=\"" + ecommItems[0][3] + "\" border=\"0\" alt=\"shopping banner\" /></a>";

var flashString = "";
flashString += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,14,0\" id=\"adTower\" width=\"" + ecommItems[1][1] + "\" height=\"" + ecommItems[1][2] + "\">";
flashString += "<param name=\"movie\" value=\"" + ecommItems[1][0] + "\" />";
flashString += "<param name=\"wmode\" value=\"opaque\" />";
flashString += "<param name=\"quality\" value=\"high\" />";
flashString += "<param name=\"scale\" value=\"exactfit\" />";
flashString += "<param name=\"bgcolor\" value=\"#ffffff\" />";
flashString += "<embed src=\"" + ecommItems[1][0] + "\" wmode=\"opaque\" name=\"adTower\" quality=\"high\" scale=\"exactfit\" bgcolor=\"#ffffff\" width=\"" + ecommItems[1][1] + "\" height=\"" + ecommItems[1][2] + "\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object>";

if (!alertFlag && (outputType == "flash")) { document.write(flashString); }
else if (!alertFlag && (outputType == "anchor")) { document.write(htmlString); }

/* END ECOMMERCE TOWER */