// force dojo to explictly load the widget(s) instead of searching the entire page for them
djConfig = {
	parseWidgets: false,
	searchIds: ["miniShopcartTotalArea"]
};

// legacy function for 3xN category page
function MM_effectAppearFade(targetElement, duration, from, to, toggle) { };

/******************************************
 START OMNITURE
*******************************************/
function trackLink(lpos,lid) {
	s_omni.prop13 = lpos;
	s_omni.prop9 = lid;
	s_omni.tl(this,'o','left_nav_links');
}

function sendAnalytics(lid,lpos) {
	var s_omni=s_gi(s_account);
	s_omni.linkTrackingArray = new Array;
	s_omni.linkTrackingArray[0]=window.location.hostname;
	s_omni.linkTrackingArray[1]=lid+"+"+lpos+"^"+s_omni.pageName;
	s_omni.tl(this,'o','hovercall');
}

function sendAnalyticsNoClickSubmit(lid,lpos) {
	var s_omni=s_gi(s_account);
	s_omni.linkTrackingArray = new Array;
	s_omni.linkTrackingArray[0]=window.location.hostname;
	s_omni.linkTrackingArray[1]=lid+"+"+lpos+"^"+s_omni.pageName;
	s_omni.linkTrackingArray[2]="1";//parameter only needed if action calling tl doesn't cause page to unload
	s_omni.tl(this,'o','linkclickcall');
}

function sendLinkIds(lid,lpos) {
	var s_omni=s_gi(s_account);
	s_omni.linkTrackingArray = new Array;
	s_omni.linkTrackingArray[0]=window.location.hostname;
	s_omni.linkTrackingArray[1]=lid+"+"+lpos+"^"+s_omni.pageName;
}

function linkHover(lid,lpos) {
	t=setTimeout("sendAnalyticsNoClickSubmit('"+lid+"','"+lpos+"')",1000)
}

function sendLinkIdsDelay(lid,lpos,link) {
	var s_omni=s_gi(s_account);
	s_omni.linkTrackingArray = new Array;
	s_omni.linkTrackingArray[0]=window.location.hostname;
	s_omni.linkTrackingArray[1]=lid+"+"+lpos+"^"+s_omni.pageName;
	t=setTimeout(link,1);  //delay prevents next page from loading before cookie has been updated FF issue doesn occur in IE
}

function stopCount() {
	clearTimeout(t)
}

/******************************************
 END OMNITURE
*******************************************/

/**
 * START: Check Login Status (anon, passive or logged in) for Omniture
**/
var omniLoginStatus = "";
function loginStatus() {
	if (getSWIDBlue() == "0"){
		omniLoginStatus = "anonymous";
	}else if (getSWIDBlue() == "1"){
		omniLoginStatus = "passive";
	}else{
		omniLoginStatus = "loggedIn";
	}
}

function getSWIDBlueCookie(name) {
var cookies = document.cookie.split("; ");
	for (var i=0; i < cookies.length; i++) {
		cookie = cookies[i].split("=");
		if (cookie[0] == name)
			return cookie[1];
		}
	return null;
}

function getSWIDBlue() {
	swid = getSWIDBlueCookie("SWID");
	blue = getSWIDBlueCookie("BLUE");
	var loginType = "";

	if (blue!=null && blue!="") {
		loginType = "2";
	} else if (((blue == null || blue == "") && (swid != null && swid != "")) || (blue!=null && blue!="" && ""=="")) {
		if (swid.indexOf("{")==0 && swid.indexOf("}")==swid.length-1) {
			loginType = "1";
		} else {
			loginType = "0";
		}
	} else {
		loginType = "0";
	}
	return loginType;
}
/**
 * END: Check Login Status (anon, passive or logged in) for Omniture
**/

// please wait panel for shopping bag and checkout functions
var tid = 0;
var pwBackgroundImg = new Image();
pwBackgroundImg.src = '//img.dsi.go.com/content/global/misc/waitPanel.png'; // preload the image
function pw_showSelects() {
	selectLists = document.getElementsByTagName('select');
	for (var counter=0; counter<selectLists.length; counter++) selectLists[counter].style.visibility = 'visible';
}
function pw_hideSelects() {
	selectLists = document.getElementsByTagName('select');
	for (var counter=0; counter<selectLists.length; counter++) selectLists[counter].style.visibility = 'hidden';
}
function pw_updateText(message) {
	if (document.getElementById('pwLoadingMessageContent') != null) document.getElementById('pwLoadingMessageContent').innerHTML = message;
}
function pw_updateText0() {
	pw_updateText('<p>Page Loading: Please Wait.</p>');
}
function pw_updateText1() {
	pw_updateText('<p>Page Loading: Please Wait.</p><p style="margin-top: 10px;">Please do not click the BACK, STOP or<br />REFRESH buttons in your web browser.</p>');
	tid = window.setTimeout("pw_updateText2()", 15000);
}
function pw_updateText2() {
	pw_updateText('<p>Page Loading: Please Wait.</p><p style="margin-top: 10px;">It may take up to a minute for the<br />system to respond to your request.</p>');
	tid = window.setTimeout("pw_updateText3()", 40000);
}
function pw_updateText3() {
	pw_updateText('<p>Page Loading: Please Wait.</p><p style="margin-top: 5px;">The system has not yet responded to your request.<br/>Please continue to wait, or you may <a href="javascript:(pw_hidePanel() && void(null))" style="text-decoration: none; color: #003399;">click here</a>.</p>');
}
function pw_showPanel() {
	if (document.getElementById('pwLoadingScreen') != null) {
		pw_updateText0();
		pw_hideSelects(); document.getElementById('pwLoadingScreen').style.display = ''; document.getElementById('pwLoadingMessageWrap').style.display = '';
		tid = window.setTimeout("pw_updateText1()", 5000);
	}
}
function pw_hidePanel() {
	if (document.getElementById('pwLoadingScreen') != null) {
		pw_showSelects(); document.getElementById('pwLoadingScreen').style.display = 'none'; document.getElementById('pwLoadingMessageWrap').style.display = 'none';
	}
}
function pw_showPanelConditional(flag) {
	if (document.getElementById('pwLoadingScreen') != null && flag == true) {
		pw_updateText0();
		pw_hideSelects(); document.getElementById('pwLoadingScreen').style.display = ''; document.getElementById('pwLoadingMessageWrap').style.display = '';
		tid = window.setTimeout("pw_updateText1()", 5000);
	}
	return flag;
}
// view shopping bag links double click protection
function disableViewBagLinks() {
	var myCartOpenBtn = document.getElementById('cartOpenBtn');
	var myCartLinkDiv = document.getElementById('cartLinkDiv');
	var myCartLinkLoadingMsg = document.getElementById('cartLinkLoadingMsg');
	if (busy == true) return false;
	try {
		if (myCartLinkDiv != null) {
			busy = true;
			myCartLinkDiv.style.display = 'none';
			if (myCartOpenBtn != null) myCartOpenBtn.style.display = 'none';
			if (myCartLinkLoadingMsg != null) myCartLinkLoadingMsg.innerHTML = '<br/>Loading, please wait...';
			tid = window.setTimeout("enableViewBagLinks()", 5000);
		}
	} catch(e) { }
	return true;
}
function enableViewBagLinks() {
	var myCartOpenBtn = document.getElementById('cartOpenBtn');
	var myCartLinkDiv = document.getElementById('cartLinkDiv');
	var myCartLinkLoadingMsg = document.getElementById('cartLinkLoadingMsg');
	try {
		busy = false;
		if (myCartLinkLoadingMsg != null) myCartLinkLoadingMsg.innerHTML = '';
		if (myCartOpenBtn != null) myCartOpenBtn.style.display = 'block';
		if (myCartLinkDiv != null) myCartLinkDiv.style.display = 'block';
	} catch(e) { }
	return true;
}

var ic_cell_footer_dstore_dsi = "6Q5F06";
var ic_cell_footer_dstore_dsy = "6Q5H06";

function SetCBMember(val) {
	if (val=="CastMember") {
		document.getElementById("TCPCastMember").checked = false;
	} else {
		document.getElementById("CastMember").checked = false;
	}
}

function prepare_entered_keyword(searchform,kwrequired) {
	var kw = new String(searchform.Searchstr.value);

	kw = kw.replace(/(\s+)/g," "); // consolidate white space
	kw = kw.replace(/^ /,""); // remove leading white space
	kw = kw.replace(/ $/,""); // remove trailing white space
	kw = kw.replace(/"/g,""); // remove double quotes "
	kw = kw.replace(/'/g,""); // remove single quotes
	kw = kw.replace(/^#/,""); // remove leading number sign (for item numbers)

	if (kw.length > 0) searchform.Searchstr.value = kw;
	return true;
}

function setIfBlank(obj) {
	var parentForm = obj.form;
	var z = 0;
	while(parentForm.elements[z] != obj) { z++; }
	var defValue = parentForm.elements[z+1].value;
	if (obj.value == "") obj.value = defValue;
}

function clearIfDefault(obj) {
	var parentForm = obj.form;
	var y = 0;
	while(parentForm.elements[y] != obj) { y++; }
	var defValue = parentForm.elements[y+1].value;
	if (obj.value == defValue) obj.value = "";
}

function isEmailAddr(email) {
	var result = false;
	var theStr = new String(email);
	var index = theStr.indexOf("@");
	if (index > 0) {
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1)) result = true;
	}
	return result;
}

function validRequired(formField,fieldLabel) {
	var result = true;
	if (formField.value == "") {
		alert("You must enter an email address. Please try again.\nExample: mailbox@domain.com");
		formField.focus();
		result = false;
	}
	return result;
}

function validEmail(formField,fieldLabel,required) {
	var result = true;
	if (required && !validRequired(formField,fieldLabel)) result = false;
	if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) ) {
		alert("Your email address is incomplete. Please try again.\nExample: mailbox@domain.com");
		formField.focus();
		result = false;
	}
	return result;
}

function validateForm(theForm) {
	for (var w=0; w < theForm.elements.length; w++) {
		if (theForm.elements[w].type == "text" && theForm.elements[w+1].type == "hidden") clearIfDefault(theForm.elements[w]);
	}
	return true;
}

function validateSearchForm(theForm) {
	for (var w=0; w < theForm.elements.length; w++) {
		if (theForm.elements[w].type == "text" && theForm.elements[w+1].type == "hidden") clearIfDefault(theForm.elements[w]);
	}
	return true;
}

function Hilite(path,name,over) {
	if(window.document.images) {
		if (over) window.document.images[name].src = path + name + "_hot.gif";
		else window.document.images[name].src = path + name + "_cold.gif";
	}
}

function Rotate(path,name,over) {
	if(window.document.images) {
		if (over) window.document.images[name].src = path;
		else window.document.images[name].src = path;
	}
}

function popup(url) {
	win = window.open(url, "DisneyStore", "width=460,height=390,scrollbars=no");
	win.focus(); // bring the pop-up window to the top of the desktop
	false;
}

function popupDimensions(url, width, height) {
	win = window.open(url, "DisneyStore", "width="+width+",height="+height+",scrollbars=no");
	win.focus(); // bring the pop-up window to the top of the desktop
	false;
}

function popupDimensionsScroll(url, width, height) {
	win = window.open(url, "DisneyStore", "width="+width+",height="+height+",scrollbars=yes");
	win.focus(); // bring the pop-up window to the top of the desktop
	false;
}


function popupBVReviews(url) {
	win = window.open(url, "DisneyStore", "width="+"760"+",height="+"700"+",scrollbars=yes");
	win.focus(); // bring the pop-up window to the top of the desktop
	false;
}

function popupMoreInfo(url) {
	win = window.open("", "MoreInfoPopUp", "width=420,height=485,scrollbars=no,toolbar=no,menubar=no,resizable=yes");
	win.document.open("text/html");
	win.document.writeln("<html><head><title>DisneyStore.com</title></head>");
	win.document.writeln("<frameset rows=\"55,*\" frameborder=\"NO\" border=\"0\" framespacing=\"0\">");
	win.document.writeln("<frame src=\"http://aimg.disneystore.com/content/ds/themes/default/popup_header.html\" name=\"topFrame\" scrolling=\"no\" noresize>");
	win.document.writeln("<frame src=\""+url+"\" name=\"mainFrame\" scrolling=\"auto\">");
	win.document.writeln("</frameset><noframes><body></body></noframes>");
	win.document.writeln("</body></html>");
	win.focus(); // bring the pop-up window to the top of the desktop
	false;
}

function popupMoreInfoThemed(url,theme_path) {
	win = window.open("", "MoreInfoPopUp", "width=420,height=485,scrollbars=no,toolbar=no,menubar=no,resizable=yes");
	win.document.open("text/html");
	win.document.writeln("<html><head><title>DisneyStore.com</title></head>");
	win.document.writeln("<frameset rows=\"55,*\" frameborder=\"NO\" border=\"0\" framespacing=\"0\">");
	win.document.writeln("<frame src=\""+theme_path+"/popup_header.html\" name=\"topFrame\" scrolling=\"no\" noresize>");
	win.document.writeln("<frame src=\""+url+"\" name=\"mainFrame\" scrolling=\"auto\">");
	win.document.writeln("</frameset><noframes><body></body></noframes>");
	win.document.writeln("</body></html>");
	win.focus(); // bring the pop-up window to the top of the desktop
	false;
}

function jumpTo(URL_List) {
	var URL = URL_List.options[URL_List.selectedIndex].value;
	if (URL.length > 0) window.location.href = URL;
}

function getCookieDate(measure,increment) {
	var expDate = new Date();
	if ((measure == "hours") && (increment > 0)) {
		var hourInMilliseconds = 3600000;
		expDate.setTime(expDate.getTime() + (hourInMilliseconds * increment));
	}
	if (measure == "today") {
		expDate.setHours(23);
		expDate.setMinutes(55);
	}
	return expDate.toGMTString();
}

function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) end = cookie.length;
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

function getCookie2(name) {
	return getCookie(name);
}

function getCookie_(name) {
	return getCookie(name);
}

function setCookie(name, value, expires, path, domain, secure) {
	document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
}

function setCookie2(name,value,expires,path,domain,secure) {
	return setCookie(name, value, expires, path, domain, secure);
}

function setCookie_(name, value, expires, path, domain, secure) {
	return setCookie(name, value, expires, path, domain, secure);
}

function setChunk_Size(theSize,process) {
	// deprecated from InterWorld; code removed
}

// function to set shopping cart count cookie for Disney Online
function setDSIshopcartcount(n) {
	// deprecated; code removed
}

// set a quasi-GUID cookie used by Quest Foglight to track unique sessions
function fx_S4() { return (((1+Math.random())*0x10000)|0).toString(16).substring(1); }
if (getCookie("DSIFXID") == null) {
	var fx_Now = new Date();
	var fx_Ts = (fx_Now.getHours()+100)+""+fx_Now.getMinutes()+""+fx_Now.getSeconds()+""+(fx_Now.getMilliseconds()+1000);
	var fx_Cookie = (fx_S4()+fx_S4()+"-"+fx_S4()+"-"+fx_S4()+"-"+fx_S4()+"-"+fx_S4()+fx_S4()+fx_S4()+"-"+fx_Ts).toUpperCase();
	var fx_Domain = "";
try {
	fx_Domain = document.location.host.replace(/^(.*)\.([^\.]+)\.com$/,".$2"+".com");
} catch (e) {
	fx_Domain = ".disneystore.com";
};
	setCookie("DSIFXID",fx_Cookie,null,"/",fx_Domain,null);
}

// ALLOWS PNGS IN IE
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	document.writeln('<style type="text/css">img.png { visibility:hidden; }</style>');
	window.attachEvent("onload", fnLoadPngs);
}
function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) < 7.0);
 try {
	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			if (!img.className.match("noFix")) {
				var src = img.src;
				img.style.width = img.width + "px";
				img.style.height = img.height + "px";
				img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
				img.src = "//img.disneystore.com/content/global/pngfix/blank.gif";
			}
		}
		img.style.visibility = "visible";
	}	
 } catch (e) { }
}

// BAYNOTE: baynote.js

var BaynoteJSVersion="$Revision: 1.29 $";var BN_READY_SIGNAL="ReadySignal";if(typeof(baynote_globals)=="undefined")var baynote_globals=new Object();baynote_globals.waitForReady=true;baynote_globals.checkStatus=false;function BNLog(){this.timeBase=new Date().getTime();this.lines=new Array();this.lastLine="";this.repCount=0;}
BNLog.prototype.log=function(str){if(str==this.lastLine){++this.repCount;return;}
if(this.repCount>0){this.lines.push("___ ABOVE REPEATED "+this.repCount+" TIME"+((this.repCount>1)?"S":""));}
this.lastLine=str;this.repCount=0;var elapsed=new Date().getTime()-this.timeBase
this.lines.push(elapsed+": "+str);}
BNLog.prototype.toString=function(){if(this.repCount>0){this.lines.push("___ ABOVE REPEATED "+this.repCount+" TIME"
+((this.repCount>1)?"S":""));this.lastLine="";this.repCount=0;}
return this.lines.join("\n");}
if(typeof(bnLog)=="undefined"){var bnLog=new BNLog();}
function BNCriticalSectionQueue(){this.waitList=new Object();this.lastId=0;}
BNCriticalSectionQueue.prototype.issueId=function(){return++this.lastId;}
BNCriticalSectionQueue.prototype.enqueue=function(id,item){this.waitList[id]=item;}
BNCriticalSectionQueue.prototype.getWaiter=function(id){return(id==null)?null:this.waitList[id];}
BNCriticalSectionQueue.prototype.firstWaiter=function(){return this.getWaiter(this.nextWaiterKeyAfter(null));}
BNCriticalSectionQueue.prototype.nextWaiterAfter=function(id){return this.getWaiter(this.nextWaiterKeyAfter(id));}
BNCriticalSectionQueue.prototype.nextWaiterKeyAfter=function(id){for(var currKey in this.waitList){if(typeof(this.waitList[currKey])!="object")continue;if(id==null)return currKey;if(id==currKey)id=null;}
return null;}
BNCriticalSectionQueue.prototype.nextPredecessor=function(target,start){for(var currWaiter=start;currWaiter!=null;currWaiter=this.nextWaiterAfter(currWaiter.id)){if(currWaiter.enter||(currWaiter.number!=0&&(currWaiter.number<target.number||(currWaiter.number==target.number&&currWaiter.id<target.id)))){return currWaiter;}}
return null;}
function BNCriticalSection(csQueue){this.csQueue=csQueue;this.debug=1;}
BNCriticalSection.prototype.enter=function(enterFunc){this.enterFunc=enterFunc;this.id=this.csQueue.issueId();this.csQueue.enqueue(this.id,this);this.enter=true;this.number=(new Date()).getTime();this.enter=false;this.attempt(this.csQueue.firstWaiter());}
BNCriticalSection.prototype.leave=function(){if(this.debug)bnLog.log("LEAVE "+this.id);this.number=0;}
BNCriticalSection.prototype.attempt=function(start){var nextReady=this.csQueue.nextPredecessor(this,start);if(nextReady!=null){if(this.debug)bnLog.log("WAIT "+this.id);var me=this;return setTimeout(function(){me.attempt(nextReady);},50);}
if(this.debug)bnLog.log("ENTER "+this.id);this.enterFunc();}
function BNResourceManager(){this.csQueue=new BNCriticalSectionQueue();this.critSec=null;this.debug=1;this.resources=new Object();this.waiting=new Object();}
BNResourceManager.prototype.getResource=function(rId){return this.resources[rId];}
BNResourceManager.prototype.loadResource=function(rId,rAddress,rType){if(typeof(this.resources[rId])!="undefined")return;this.resources[rId]=null;var critSec=new BNCriticalSection(this.csQueue);critSec.enter(function(){bnResourceManager.inject(rId,rAddress,rType,critSec);});}
BNResourceManager.prototype.inject=function(rId,rAddress,rType,critSec){this.critSec=critSec;if(this.debug)bnLog.log("INJECT "+this.critSec.id+" ("+rId+")");if(!rType||rType=="script"){var scriptTag1=document.createElement("script");scriptTag1.language="javascript";scriptTag1.src=rAddress;var head=document.getElementsByTagName("head");head[0].appendChild(scriptTag1);}
else if(rType=="img"){var img=document.createElement("IMG");var handler=function(){bnResourceManager.registerAndAddResource(rId,img);};if(img.addEventListener)img.addEventListener("load",handler,false);else if(img.attachEvent)img.attachEvent("onload",handler);else img["onload"]=handler;img.src=rAddress;img.style.display="none";var ph=document.getElementById("bn_placeholder_global");if(ph!=null)ph.appendChild(img);}
else alert("Unexpected resource type to loadResource: "+rType);}
BNResourceManager.prototype.waitForResource=function(rId,callbackCode,rAddress,rType){with(this){if(getResource(rId)){this.runCallback(callbackCode);}
else{if(typeof(waiting[rId])=="undefined")waiting[rId]=new Array();var waitingList=waiting[rId];waitingList[waitingList.length]=callbackCode;if(rAddress)this.loadResource(rId,rAddress,rType);}}}
BNResourceManager.prototype.wakeUpWaiting=function(rId){with(this){var waitingList=waiting[rId];if(!waitingList)return;for(var i=0;i<waitingList.length;i++){if(waitingList[i]){var codeToEval=waitingList[i];waitingList[i]=null;if(this.debug&&codeToEval)bnLog.log("CALLBACK "+rId+": "+codeToEval);this.runCallback(codeToEval);}}}}
BNResourceManager.prototype.registerAndAddResource=function(rId,resource){if(this.debug)bnLog.log("REGISTER "+(this.critSec?this.critSec.id:"")+" ("+rId+")");this.resources[rId]=resource;this.wakeUpWaiting(rId);this.critSec.leave();setTimeout("bnResourceManager.wakeUpWaiting('"+rId+"')",5000);}
BNResourceManager.prototype.registerResource=function(rId){this.registerAndAddResource(rId,true);}
BNResourceManager.prototype.runCallback=function(callback){if(typeof(callback)=="string")eval(callback);else if(typeof(callback)=="function")callback();else alert("Invalid callback, type="+typeof(callback));}
if(typeof(bnResourceManager)=="undefined"){var bnResourceManager=new BNResourceManager();}
function BNSystem(){this.testServer=null;}
BNSystem.prototype.getCookieValue=function(cookieName,cookieSubDomain){if(!cookieSubDomain)cookieSubDomain=baynote_globals.cookieSubDomain;if(cookieSubDomain)cookieName+=("-"+cookieSubDomain);var sRE="(?:; )?"+cookieName+"=([^;]*);?";var oRE=new RegExp(sRE);if(oRE.test(document.cookie)){return decodeURIComponent(RegExp["$1"]);}else{return null;}}
BNSystem.prototype.setCookie=function(cookieName,cookieValue,cookiePath,cookieExpires,cookieDomain,cookieSubDomain){cookieValue=encodeURIComponent(cookieValue);if(cookieExpires=="NEVER"){var nowDate=new Date();nowDate.setFullYear(nowDate.getFullYear()+500);cookieExpires=nowDate.toGMTString();}
else if(cookieExpires=="SESSION")cookieExpires="";if(cookiePath!="")cookiePath=";Path="+cookiePath;if(cookieExpires!="")cookieExpires=";expires="+cookieExpires;if(!cookieDomain)cookieDomain=(baynote_globals.cookieDomain)?baynote_globals.cookieDomain:"";if(cookieDomain!="")cookieDomain=";domain="+cookieDomain;if(!cookieSubDomain)cookieSubDomain=baynote_globals.cookieSubDomain;if(cookieSubDomain)cookieName+=("-"+cookieSubDomain);var cookieStr=cookieName+"="+cookieValue+cookieExpires+cookiePath+cookieDomain;if(cookieStr.length>4096)return false;document.cookie=cookieStr;return true;}
BNSystem.prototype.removeCookie=function(cookieName,cookieDomain){this.setCookie(cookieName,"","/","Mon, 1 Jan 1990 00:00:00",cookieDomain);}
BNSystem.prototype.getURLParam=function(name,url){if(!url)var url=window.location.href;var regex=new RegExp("[\\?&]"+name+"=([^&#]*)");var match=regex.exec(url);if(!match)return null;else return match[1];}
BNSystem.prototype.getTestServer=function(){if(this.testServer!=null)return this.testServer;var testServer=this.getURLParam("bn_test");if(testServer)this.setCookie("bn_test",testServer,"/","SESSION");else if(testServer=="")this.removeCookie("bn_test");else{testServer=this.getCookieValue("bn_test");if(!testServer)testServer="";}
this.testServer=testServer;return testServer;}
if(typeof(bnSystem)=="undefined"){var bnSystem=new BNSystem();}
if(typeof(BNTag)=="undefined"){function BNTag(previousTag){if(previousTag){this.id=previousTag.id+1;this.server=previousTag.server;this.customerId=previousTag.customerId;this.code=previousTag.code;}
else this.id=0;this.attrs=new Object();this.docAttrs=new Object();this.css=new Object();}}
BNTag.prototype.getCommonResourceId=function(){return"Common";}
BNTag.prototype.getCommonResourceAddress=function(tag){return(this.server+"/baynote/tags2/common.js");}
BNTag.prototype.getFailsafeResourceId=function(){return"Failsafe";}
BNTag.prototype.getFailsafeResourceAddress=function(){var v=BaynoteJSVersion.split(" ")[1];var u=bnSystem.getCookieValue("bn_u");return(this.server+"/baynote/customerstatus2?customerId="+this.customerId+"&code="+this.code+"&v="+v+"&u="+u);}
BNTag.prototype.show=function(parentElemId){if(this.id==0)document.write("<span id='bn_placeholder_global'></span>");this.placeHolderId="bn_placeholder"+this.id;var placeHolderType;if(this.placeHolderElement)placeHolderType=this.placeHolderElement;else placeHolderType=this.popup?"span":"div";if(parentElemId){var placeHolder=document.createElement(placeHolderType);placeHolder.id=this.placeholderId;document.getElementById(parentElemId).appendChild(placeHolder);}
else document.write("<"+placeHolderType+" id='"+this.placeHolderId+"'></"+placeHolderType+">");window["bn_tags"][this.id]=this;var testServer=bnSystem.getTestServer();if(testServer){var reValidTestServer=new RegExp("^https?://[^/]*\.baynote\.(com|net)(:\d+)?(/.*)?");if(reValidTestServer.test(testServer))this.server=testServer;else alert("Ignoring invalid test server \""+testServer+"\"");}
this.showWhenReady(this);baynote_tag=new BNTag(this);}
BNTag.prototype.showWhenReady=function(tag){if(baynote_globals.waitForReady&&!bnResourceManager.getResource(BN_READY_SIGNAL)){bnResourceManager.waitForResource(BN_READY_SIGNAL,function(){tag.showWhenReady(tag);});return;}
if(baynote_globals.checkStatus){if(!bnCheckCustomerStatus()){bnWaitForCustomerStatus(function(){tag.showWhenReady(tag);});return;}}
var commonId=this.getCommonResourceId();if(!bnResourceManager.getResource(commonId)){bnResourceManager.waitForResource(commonId,function(){tag.showWhenReady(tag);},this.getCommonResourceAddress(),"script");return;}
bnTagManager.show(tag.id);}
BNTag.prototype.noshow=function(){window["bn_tags"][this.id]=this;baynote_tag=new BNTag(this);}
BNTag.prototype.getParam=function(name,defaultValue){var value=this[name];if(typeof(value)=="undefined"||value==null)return defaultValue;else return value;}
if(typeof(baynote_tag)=="undefined"){window["bn_tags"]=new Array();var baynote_tag=new BNTag(null);}
function bnReadySignal(){bnResourceManager.registerResource(BN_READY_SIGNAL);}
function bnCall(resName,methodName,methodArg){var resource=bnResourceManager.getResource(resName);if(!resource){bnResourceManager.waitForResource(resName,function(){bnCall(resName,methodName,methodArg);});return;}
if(typeof(resource)!="object"){return;}
var method=resource[methodName];if(typeof(method)!="function"){return;}
method.call(resource,methodArg);}
function bnWaitForCustomerStatus(callBack){if(!bnCheckCustomerStatus()){var failsafeId=baynote_tag.getFailsafeResourceId();bnResourceManager.waitForResource(failsafeId,function(){bnWaitForCustomerStatus(callBack);},baynote_tag.getFailsafeResourceAddress(),"img");return;}
bnResourceManager.runCallback(callBack);}
function bnCheckCustomerStatus(){var failsafeId=baynote_tag.getFailsafeResourceId();if(bnResourceManager.getResource(failsafeId))return true;else return false;}

function baynote_addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } }
baynote_addLoadEvent(bnReadySignal);

// BAYNOTE: baynote-guide-for-prod.js

function baynote_isNotEmpty(name) {
	return (typeof(name) != "undefined") && (name != null) && (name != "");
}

function baynote_getUrlParam(name) {
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var tmpURL = window.location.href;
	var results = regex.exec( tmpURL );
	if( results == null )
		return "";
	else
		return unescape(results[1]);
}

function show_baynote_guide(myguidetype, filter, listSize) {
	baynote_tag.server = "http://disney-store.baynote.net";
	baynote_tag.customerId = "disney";
	baynote_tag.code = "store";
	baynote_tag.type = "guide";
	if(filter)
		baynote_tag.attrFilter="Category:\"" + filter + "\"";
	baynote_tag.listSize=4;
	if(listSize != null && listSize > 0) { baynote_tag.listSize = listSize; }
	baynote_tag.guide = myguidetype;
	
	var bn_myurl = window.location.href;
	if(baynote_isNotEmpty(baynote_tag.url))
		bn_myurl = baynote_tag.url;
	if(bn_myurl.match(/\/c(do)?\//) || bn_myurl.match(/\/Category(_|Page_|Display)/) || bn_myurl.match(/\/DSIGiftFinderDisplayView/)){
		baynote_tag.guide = "CategoryGuide";
	}

	var myquery = baynote_getUrlParam("Searchstr");
	if(baynote_isNotEmpty(myquery)){
			baynote_tag.query = myquery.replace(/\+/g, " ");
	}
	baynote_tag.show();
}

// include ForeSee survey
var foresee_trigger_included = "f";
if (getCookie("testSurvey") != "f") {
document.writeln('<script type="text/javascript" src="//img.disneystore.com/content/misc/surveys/foresee/foresee-alive.js"></script>');
}

// Flash Detection Scripts

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
