chromeFoo = false;
chrome_location = window.location.toString();
if(chrome_location.indexOf("disney.videos.go.com") != -1)isMovieClub = true;
else isMovieClub=false;
if(chrome_location.indexOf("http://disney.go.com/home/html/index.html") != -1 || chrome_location.indexOf("http://disney.go.com/guestservices/upgrade/") != -1)chromeFoo = true;
if (!document.getElementById && chromeFoo != true) top.location.replace("http://disney.go.com/home/html/index.html");
if(!chromeColor){chromeColor = "#003399";}
if(!chromeWidth){chromeWidth = "770";}
if(!legalFooterColor){legalFooterColor = "#FFFFFF";}
prot = window.location.protocol;
prot = prot.toString();
if(prot == "https:"){
	call_sign = "s";
}
else {
	call_sign = "";
}

var breadCrumb = "";
var bCrumbGr = "&nbsp;&nbsp;&gt;&nbsp;&nbsp;";
var bCrumbFt = "<font color='#ffffff' face='arial,helvetica' size='-2'>";
var bCrumbTr = "http://transfer.go.com/cgi/transfer.dll?srvc=dis&goto=";
var bCrumbLv1 = "";
var searchQuery = "";
var pwdByLogo = '';
//Test
//pwdByLogo = '<a href="http://www.disneyconnection.com"><img src="http://disney.go.com/globalmedia/chrome/dc_logo_tag.gif" border="0"></a>';
if(pwdByLogo != ""){
	pwdByLogo  = '<td align="center" valign="middle" width="99">'+pwdByLogo+'</td>'
}

if(call_sign == "s"){
	if(pwdByLogo.indexOf("goto=http://adimages.go.com/") != -1){
		pwdByLogo = pwdByLogo.replace("goto=http://adimages.go.com/", "goto=https://adimages.go.com/")
	}
	if(pwdByLogo.indexOf("goto=http://Adsatt.Disney.starwave.com") != -1)
		pwdByLogo = pwdByLogo.replace("goto=http://Adsatt.Disney.starwave.com", "goto=https://Adsatt.Disney.starwave.com")
}
document.writeln("<style>");
document.writeln(".dolChrome { font-family: arial, helvetica !important; color: #ffffff !important; font-size: 10px !important;}");
document.writeln("a.dolChrome,a.dolChrome:hover, a.dolChrome:active { background-color: transparent !important; text-decoration: underline !important;}");
document.writeln("</sty"+"le>");
//exception for movieclub
if(isMovieClub)addSearch="";
else{addSearch='<a href="'+bCrumbTr+'http://search.disney.go.com/index.html'+searchQuery+'&name=g_micChrome_search" class="dolChrome" target="_top"><img src="http'+call_sign+'://disney.go.com/globalmedia/chrome/magnifying_glass.gif" width="19" height="19" alt="" border="0" valign="middle" hspace="2" vspace="0" align="middle"><b>Search Disney</b></a>';}

var replaceStyleClass = new RegExp ('><img src=', 'gi');
var pwdByLogo2 = pwdByLogo.replace(replaceStyleClass, ' class="dolChrome"><img src=');

if(bCrumbLevel_1)
	bCrumbLv1 = bCrumbLevel_1.toLowerCase();
	
if(bCrumbLv1 == "destinations" || bCrumbLv1 == "vacations" || bCrumbLv1 == "store")
	searchQuery = "%3Ftype%3Dnsl";

function writeChrome(){
	document.write('<table width="'+chromeWidth+'" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="'+chromeColor+'"><tr><td width="122"><a href="'+bCrumbTr+'http://disney.go.com/&name=g_micChrome_dlogo" class="dolChrome" target="_top"><img src="http'+call_sign+'://disney.go.com/globalmedia/chrome/disney_logo.gif" width="122" height="25" alt="" border="0"></a></td><td align="left" valign="middle" class="dolChrome">'+breadCrumb+'</td><td align="right" valign="middle">'+addSearch+'&nbsp;&nbsp;&nbsp;</td>'+pwdByLogo2+'</tr></table>');
}
function doCrumb(goTo,tName,text){

	if(tName == "" && goTo == ""){
		breadCrumb = bCrumbGr+text;
	}else{

		breadCrumb = bCrumbGr+"<a href='"+bCrumbTr+goTo+"&name="+tName+"' class='dolChrome' target='_top'>"+text+"</a>";
		if(bCrumbLevel_2_text){
			breadCrumb += bCrumbGr;
			if(bCrumbLevel_2_url){breadCrumb += "<a href='"+bCrumbLevel_2_url+"' class='dolChrome' target='_top'>";}
			breadCrumb += bCrumbLevel_2_text;
			if(bCrumbLevel_2_url){breadCrumb += "</a>";}
		}
		if(bCrumbLevel_2_url){
			if(bCrumbLevel_3_text){
				breadCrumb += bCrumbGr;
				if(bCrumbLevel_3_url){breadCrumb += "<a href='"+bCrumbLevel_3_url+"' class='dolChrome' target='_top'>";}
				breadCrumb += bCrumbLevel_3_text;
				if(bCrumbLevel_3_url){breadCrumb += "</a>";}
			}
		}
	}
	bCrumbLevel_1 = text;
writeChrome();	
}

switch (bCrumbLv1){
case "entertainment" :
	doCrumb('http://disney.go.com/entertainment/today/index.html', 'g_micChrome_bc_entertainment', 'Entertainment'); break;
case "familyfun" :
	doCrumb('http://disney.go.com/familyfun/today/index.html', 'g_micChrome_bc_familyfun', 'Family Fun'); break;
case "guestservices" :
	doCrumb('http://disney.go.com/guestservices/index.html', 'g_micChrome_bc_guestservices', 'Guest Services'); break;
case "kidsisland" :
	doCrumb('http://disney.go.com/kids/today/index.html', 'g_micChrome_bc_kids', 'Kids Island'); break;
case "playhouse" :
	doCrumb('http://disney.go.com/playhouse/today/index.html', 'g_micChrome_bc_playhousedisney', 'Playhouse Disney'); break;
case "store" :
	doCrumb('http://disney.store.go.com/', 'g_micChrome_bc_shopping', 'Disney Store'); break;
case "vacations" :
	doCrumb('http://destinations.disney.go.com/parksandresorts/index', 'g_micChrome_bc_destinations', 'Disney Destinations'); break;
case "destinations" :
	doCrumb('http://destinations.disney.go.com/parksandresorts/index', 'g_micChrome_bc_destinations', 'Disney Destinations'); break;
case "insidedisney2" :
	doCrumb('','','Disney Insider'); break;
case "disneyinsider" :
	doCrumb('http://disney.go.com/inside/today/index.html', 'g_micChrome_bc_disneyInsider','Disney Insider'); break;
case "insidedisney" :
	doCrumb('http://disney.go.com/inside/today/index.html', 'g_micChrome_bc_disneyInsider','Disney Insider'); break;
case "mainstreet" :
	doCrumb('http://disney.go.com/shop/today/index.html', 'g_micChrome_bc_mainstreet', 'Shop'); break;
case "shopping" :
	doCrumb('http://disney.go.com/shop/today/index.html', 'g_micChrome_bc_shopping', 'Shop'); break;
case "shop" :
	doCrumb('http://disney.go.com/shop/today/index.html', 'g_micChrome_bc_shop', 'Shop'); break;
case "blast" :
	doCrumb('http://transfer.go.com/cgi/transfer.dll%3Fname%3DBL_1279%26SOURCE%3DBL_1279%26srvc%3Ddolsubsrvc%26goto%3Dhttp://disney.go.com/preview/blast/special_offer/preview.html', 'g_micChrome_bc_blast', "Disney's Blast"); break;
case "toontown" :
	doCrumb('http://transfer.go.com/cgi/transfer.dll%3Fname%3DTT_1195%26SOURCE%3DTT_1195%26srvc%3Ddolsubsrvc%26goto%3Dhttp://play.toontown.com/%3Fsource%3DTT_1195', 'g_micChrome_bc_toontown', "Disney's Toontown Online"); break;
case "clientpromotions" :
	doCrumb('http://preview.disney.go.com', 'g_micChrome_bc_promotions', "Client Promotions Site"); break;
case "charactergallery" :
	doCrumb('http://disney.go.com/characters/today/index.html', 'g_micChrome_bc_cg', 'Character Gallery'); break;
default :
	breadCrumb = "<span class='dolChrome'>&nbsp;&nbsp;&gt;&nbsp;&nbsp;Where the Magic Comes to You!</span>"; writeChrome(); break;
}


