var isCDS = false
var chromeWidth = 994;
var chromeTop = 120;
var chromeDivName = "GC_holder";
var footerWidth = 994;
var footerDivName = "GF_holder";
var flashWidth = 994;
var firstload = true;
var channelLoading = false;
var frameworkRegistered = false;
var adz = 10; // was 70000
var adzStartingValue = 11; //added by CES.
var ads = new Array();
var adSlugs = new Array();
var adPadding = 7;
var slugPadding = 8;
var slugWidth = 10;
var adContentArray = new Object();
var adResizeTimers = new Object();
var iframeResizeTimer = 30;
var currentPageWidth = 0;
var refreshTimeout;
var animationStep = 10;

var theGameWidth = 500;
var theGameHeight = 350;
var theContainerWidth = 500;
var theContainerHeight = 350;
var gameFrameLeft = 33;
var gameFrameTop = 328;
var footerComImageDiv = "gde_comScoreLogo";


if (typeof chromeLinkMap == "undefined") {

	//channel type|highlighted tab|link URL|comScore image|comScore link
	var chromeLinkMap = [

		"Activities - Apps|create|http://disney.go.com/create/apps/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Artist|create|http://disney.go.com/create/artist/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Artists|create|http://disney.go.com/create/artists/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Designer|create|http://disney.go.com/create/designer/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Director|create|http://disney.go.com/create/director/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Galleries|create|http://disney.go.com/create/galleries/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Hall of Fame|create|http://disney.go.com/create/halloffame/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Master|create|http://disney.go.com/create/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Musician|create|http://disney.go.com/create/musician/|comscore_create.gif|http://disney.go.com/create",
		"Activities - My Create|create|http://disney.go.com/create/mycreate/|comscore_create.gif|http://disney.go.com/create",
		"Activities - Writer|create|http://disney.go.com/create/writer/|comscore_create.gif|http://disney.go.com/create",
		"Characters - All|characters|http://disney.go.com/characters/all/|comscore_characters.gif|http://disney.go.com/characters",
		"Characters - Animated|characters|http://disney.go.com/characters/animated/|comscore_characters.gif|http://disney.go.com/characters",
		"Characters - Classics|characters|http://disney.go.com/characters/classics/|comscore_characters.gif|http://disney.go.com/characters",
		"Characters - Live Action|characters|http://disney.go.com/characters/liveaction/|comscore_characters.gif|http://disney.go.com/characters",
		"Characters - Master|characters|http://disney.go.com/characters/|comscore_characters.gif|http://disney.go.com/characters",
		"Characters - Music Stars|characters|http://disney.go.com/characters/musicstars/|comscore_characters.gif|http://disney.go.com/characters",
		"Games - Action|games|http://disney.go.com/games/action/|comscore_games.gif|http://disney.go.com/games",
		"Games - All|games|http://disney.go.com/games/more/|comscore_games.gif|http://disney.go.com/games",
		"Games - Arcade|games|http://disney.go.com/games/arcade/|comscore_games.gif|http://disney.go.com/games",
		"Games - Characters|games|http://disney.go.com/games/characters/|comscore_games.gif|http://disney.go.com/games",
		"Games - Master|games|http://disney.go.com/games/|comscore_games.gif|http://disney.go.com/games",
		"Games - Puzzle|games|http://disney.go.com/games/puzzle/|comscore_games.gif|http://disney.go.com/games",
		"Games - Sports|games|http://disney.go.com/games/sports/|comscore_games.gif|http://disney.go.com/games",
		"Games - Video Games|games|http://disney.go.com/games/videogames/|comscore_games.gif|http://disney.go.com/games",
		"Games - Word|games|http://.disney.go.com/games/word/|comscore_games.gif|http://disney.go.com/games",
		"My Page - Master|my_page|http://disney.go.com/mypage/|comscore_mypage.gif|http://disney.go.com/mypage",
		"Videos - Characters|videos|http://disney.go.com/videos/characters/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - Classics|videos|http://disney.go.com/videos/classics/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - Disney Channel|videos|http://disney.go.com/tv/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - Disney XD|videos|http://disney.go.com/disneyxd/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - Master|videos|http://disney.go.com/videos/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - More|videos|http://disney.go.com/videos/more/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - Movies|videos|http://disney.go.com/videos/movies/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - Music Videos|videos|http://disney.go.com/musicvideos/|comscore_videos.gif|http://disney.go.com/videos",
		"Videos - TV Shows|videos|http://disney.go.com/videos/tvshows/|comscore_videos.gif|http://disney.go.com/videos"
	];
}
		

var isIE = false;
isIE = isInternetExplorer();

function registerFramework() {
	frameworkRegistered = true;
}

function getPanelSetConfiguration() {
	if (!firstload && !channelLoading) {
		channelLoading = true;
	}
}

function onPanelSetLoaded(panelSet) {
	//alert('onPanelSetLoaded');
}

function onPanelSetShowing(panelSet) {
	//alert('onPanelSetShowing inside');
}

function onTransitionComplete() {
	if (firstload) {
		firstload = false;
	}
	if (channelLoading) {
		channelLoading = false;
	}
}

function scrollToTop(y) {
	if (y == undefined) {
		y = 0;
	}
	if (getYOffset() > parseInt(y)) {
		window.scrollBy(0,-40); // horizontal and vertical scroll increments
		scrolldelay = setTimeout('scrollToTop('+y+')',5); // scrolls every 5 milliseconds
	}
}


function getYOffset() {
    var pageY;
    if( typeof( window.pageYOffset ) == 'number' ) {
		//Mozilla compliant
		pageY = window.pageYOffset;
	} else {
		//DOM compliant
		pageY = document.body.scrollTop;
	}
    return pageY;
}


function popCopyright(url, name, params){
	window.open("http://disney.go.com/dxd/dxd_copyright.html", "copyrightPop", "width=500,height=625, scrollbar=yes");
}

function setWmode(mode) {

	//user agent
	var ua = navigator.userAgent.toLowerCase();
	//is mac
	var mac = (ua.indexOf("mac")>-1);
	//firefox 2
	var ff2 = (ua.indexOf("firefox/2")>-1);
	//firefox 3
	var ff3 = (ua.indexOf("firefox/3")>-1);
	//safari 2
	var s2 = (ua.indexOf('safari') > -1 && ua.indexOf('applewebkit') > -1 && (ua.indexOf('416') > -1 || ua.indexOf('412') > -1));	
	//default wmode
	var wmode = 'Window';
	
	if (mode == 'true' || mode) {
		//if mac and firefox 2 or safari 2
		if (mac && (ff2 || s2)) {
			wmode = "transparent";
			
		//if firefox 3 on a mac
		} else if (ff3 && mac) {
			//ff3 on a mac seems to handle layered content above flash fine.
			wmode = "window";
		} else {
			wmode = "opaque";
		}
	}
	
	//if there is a new wmode switch it
	if (getWmode() != wmode) {
		getSWF('dxdcontent').wmode = wmode;
	}
}

function getWmode() {
	return getSWF('dxdcontent').wmode;
}

function resizeDXD(w, h) {
	getSWF('dxdcontent').style.height = Number(h);
	try {
		bumpChromeAndFooter();
	} catch(e) {
	}
}

function repositionDXD(x,y) {
	var dxd = getSWF('dxdcontent');
	if (x != null && x >= 0) {
		dxd.style.left = x;
	}
	
	if (y != null && y >= 0) {
		dxd.style.top = y;
	}
}

function changeBackgroundColor(color) {
	//Change the background color as well as the Legal Footer text color and the Legal Footer image if you are not on a Games page.
	var appVersion=navigator.appVersion.split("MSIE"),browserVersion=parseFloat(appVersion[1]);
	try {
		_gdeFooter.hideFooter();
	} catch(e) {
	}

	document.body.style.backgroundColor = color;
	var channelURLId = location.hash;
}

function getSWF (movieName) {
    return swfobject.getObjectById(movieName)
}

function removeResizeTimers() {
	for (var p in adResizeTimers) {
		clearTimeout(adResizeTimers[p]);
	}
	adResizeTimers = {};
}

function hideAdPanels() {
	removeResizeTimers();
	adsRefreshing = false;
	
	clearTimeout(refreshTimeout);
	var len = ads.length;

	for (i = 0; i<len; i++) {
		document.getElementById("frame").removeChild(ads[0]);
		ads.shift();
	}

	while (adSlugs.length > 0) {
		document.getElementById("frame").removeChild(adSlugs[0]);
		adSlugs.shift();
	}
}

var adsRefreshing = false;
function refreshAd(id) {
	
	adsRefreshing = true;
	removeResizeTimers();
	
	//var frame = document.getElementById('adframe' + id);
	//var div = document.getElementById('ab_dxd_ad' + id);
	var adData = adContentArray[id];
	/*
	frame.contentWindow.document.open("text/html","replace");
   	frame.contentWindow.document.write('');
   	frame.contentWindow.document.close();
	document.getElementById("frame").removeChild(div);
	*/
	getSWF('dxdcontent').refreshAd(adData);
	
	/*
	var len = ads.length;
	var idx = 0;
	
	for (i = 0; i<len; i++) {
		if (div == ads[i]) {
			idx = i;
			break;
		}
	}

	if (len > 0) {
		ads.splice(idx);
	}
	*/
}


function adjustAdX(x) {

	var adjustedX = parseInt((document.body.offsetWidth - flashWidth) / 2);
	if (adjustedX < 0) {
		adjustedX = 0;
	}
	adjustedX += x;
	return adjustedX;
}


function bumpAdsAndGame() {
	bumpGame();
	bumpChromeAndFooter();
	for (var i = 0; i < ads.length; i++) {
		try {
			var thisAdIDOffset = ads[i].id.replace("ab_dxd_ad","");
			var thisAd = document.getElementById(ads[i].id);
			thisAd.style.left = adjustAdX(adContentArray[thisAdIDOffset].x) + 'px';
		} catch(e) {

		}
	}
}


function bumpGame() {
	try {
		var theGameDiv = document.getElementById('game');
		var leftAdjust = adjustAdX(((theContainerWidth - theGameWidth) / 2) + gameFrameLeft);
		
		if (isIE) {
			if (leftAdjust > (gameFrameLeft + 10)) {
				leftAdjust -= 10;
			} else {
				leftAdjust = gameFrameLeft;
			}
		}
		theGameDiv.style.left = leftAdjust + 'px';
		theGameDiv.style.top = ((theContainerHeight - theGameHeight) / 2) + gameFrameTop + 'px';
	} catch(e) {
	}
}

function bumpChromeAndFooter() {

	try {
		var theChromeDiv = document.getElementById(chromeDivName);
		var theFooterDiv = document.getElementById(footerDivName);
		if (theChromeDiv) {
			var leftAdjust = adjustAdX(chromeWidth) - chromeWidth;
			if (isIE) {
				if (leftAdjust > 10) {
					leftAdjust = leftAdjust - 10;
				}
			}
			theChromeDiv.style.marginLeft = '0px';
			theChromeDiv.style.left = leftAdjust + 'px';

		}
		if (theFooterDiv) {
			var leftAdjust = adjustAdX(footerWidth) - footerWidth;
			if (isIE) {
				if (leftAdjust > 10) {
					leftAdjust = leftAdjust - 10;
				}
			}
			theFooterDiv.style.marginLeft = '0';
			theFooterDiv.style.left = leftAdjust + 'px';
			var theFlashHeight = parseInt(getSWF('dxdcontent').style.height);
			theFooterDiv.style.top = theFlashHeight + 'px';
			theFooterDiv.style.visibility = "visible";
		}
	} catch(e) {
	}
}





function addAdTracking(data) {

	if (data != null) {
		adz++;
		var newdiv = document.createElement('div');
		newdiv.setAttribute('id', 'ab_dxd_ad' + adz);
		ads.push(newdiv);
		
		newdiv.style.width = 10;
		newdiv.style.height = 1;
		newdiv.style.position = "absolute";
		newdiv.style.left = 0;
		newdiv.style.top = 0;
		newdiv.style.zIndex = adz;
		//newdiv.style.border = "1px #FF0000 solid";

		document.getElementById("frame").appendChild(newdiv);

		var adframe = document.createElement('iframe');
	   	adframe.setAttribute('name', 'adframe' + adz);
	   	adframe.setAttribute('id', 'adframe' + adz);
	   	adframe.setAttribute('frameBorder', 0);
	   	adframe.setAttribute('marginHeight', 0);
	   	adframe.setAttribute('marginWidth', 0);
	   	adframe.setAttribute('height', 10);
	   	adframe.setAttribute('width', 10);
	   	adframe.setAttribute('scrolling', 'no');
	   	adframe.setAttribute('allowTransparency', true);
	   	adframe.setAttribute('transparency', true);
	   	adframe.setAttribute('style', 'background-color:transparent;filter:alpha(opacity=100)!important');
		adframe.src = 'about:blank';
		
	   	newdiv.appendChild(adframe);
	
		adframe.contentWindow.document.open("text/html","replace");
	   	adframe.contentWindow.document.write('<html><head><title></title><script>function errorHandler(){return true;}; window.onerror=errorHandler</script></head><body id="adBody" class="adBody" style="background-color:transparent"><div id="content">'+unescape(data)+'</div></body></html>');
	   	adframe.contentWindow.document.close();
		adframe.contentWindow.onerror = errorsuppressor;
	}

}

function MouseMoveDelegate(frame, func) {
	var _frame = frame;
	var _func = func;
	
	this.onMouseMove = function(e) {
		if (_frame == undefined || _func == undefined) {
			return;
		}
		
		if (!e) {
			e = _frame.contentWindow.window.event;
		}
		
		_func(e);
	}
}


function addAdPanel(id, x, y, w, h, r, s, bg, url, data, adCategory) {
	var floater = false;
	adz++;
	if (!x) {
		adContentArray[adz] = {id:adContentArray[id].id, x:adContentArray[id].x, y:adContentArray[id].y, w:adContentArray[id].w, h:adContentArray[id].h, r:adContentArray[id].r, s:adContentArray[id].s, bg:adContentArray[id].bg, url:adContentArray[id].url, data:adContentArray[id].data, adCategory:adContentArray[id].adCategory};
		adContentArray.splice(id);
	} else {
		adContentArray[adz] = {id:id, x:x, y:y, w:w, h:h, r:r, s:s, bg:bg, url:url, data:data, adCategory:adCategory};
   	}
   	
   	var newdiv = document.createElement('div');
   
	newdiv.setAttribute('id', 'ab_dxd_ad' + adz);
	ads.push(newdiv);
	
	//check for Rovion Floating ad
	if (id.indexOf('Floating') > -1) {
		floater = true;
		newdiv.innerHTML = unescape(adContentArray[adz].data);
	}

	if (r > 0) {
		clearTimeout(refreshTimeout);
		refreshTimeout = setTimeout('refreshAd("'+adz+'")', r*1000);
	}

if (adContentArray[adz]) {
   
if (!floater) {
   newdiv.style.width = (adContentArray[adz].w - adPadding) + 'px';
   newdiv.style.height = (adContentArray[adz].h - adPadding) + 'px';
   newdiv.style.position = "absolute";
   newdiv.style.textAlign = 'center';
   //newdiv.style.overflow = "hidden";
   newdiv.style.left = adjustAdX(adContentArray[adz].x) + 'px';
   newdiv.style.top = adContentArray[adz].y + 'px';
   newdiv.style.zIndex = adz;
   newdiv.style.paddingTop = adPadding + 'px';
   newdiv.style.paddingLeft = adPadding + 'px';

   var container = document.createElement('div');
   container.setAttribute('id', 'container');
   }

   if (adContentArray[adz].data == null) {
   			if (id.indexOf('Leaderboard') > -1) {
  				makeHttpRequest(adContentArray[adz].url, 'loadBanner', false, newdiv, true);
   			} else if (adContentArray[adz].id.indexOf('Skyscraper') > -1) {
  				makeHttpRequest(adContentArray[adz].url, 'loadBanner', false, newdiv, true);
  			 } else if (adContentArray[adz].id.indexOf('Rectangle') > -1) {
  				makeHttpRequest(adContentArray[adz].url, 'loadBanner', false, newdiv, true);
  			 } else {
   				var adData = '';
   				return;
   			}
   	
   			if (adData) {
  	 			newdiv.innerHTML = adData;
     			newdiv.runttimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + bg + "',sizingMethod='scale')";
     			newdiv.appendChild(container);
   			}
   	} else {
   		document.getElementById("frame").appendChild(newdiv);
   		setTimeout("displayAdData("+adz+")", 1000);
  	 }
   
   
  	 if (adContentArray[adz].id.indexOf('Leaderboard') > -1) {
			adContentArray[adz].type = 'Leaderboard';
   			if (adContentArray[adz].s) {
    			newdiv.style.width = (adContentArray[adz].w - slugPadding) + 'px';
  				newdiv.style.paddingLeft = slugPadding + 'px';
  			}
   			if (adContentArray[adz].bg == undefined) {
  				if (adContentArray[adz].s) {
  					newdiv.style.backgroundImage = 'url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/728x90_holder_ADSlug.png)';
 				} else {
  					newdiv.style.backgroundImage = 'url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/728x90_holder.png)';
  				}
  			}
			if (parseInt(getSWF('dxdcontent').style.height) <= 800) {
				//disneygroups ad
				moveDXDSwfDownTo(115);  //
			}
			
   		} else if (adContentArray[adz].id.indexOf('Skyscraper') > -1) {
			adContentArray[adz].type = 'Skyscraper';
   			if (adContentArray[adz].s) {
    			newdiv.style.height = (adContentArray[adz].h - slugPadding) + 'px';
  				newdiv.style.paddingTop = slugPadding + 'px';
  			}
   			if (adContentArray[adz].bg == undefined) {
  				if (adContentArray[adz].s) {
  					newdiv.style.backgroundImage = 'url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/160x600_holder_ADSlug.png)';
  				} else {
  					newdiv.style.backgroundImage = 'url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/160x600_holder.png)';
  				}
  			}
  		} else if (adContentArray[adz].id.indexOf('Medium Rectangle') > -1) {
			adContentArray[adz].type = 'Medium Rectangle';
   			if (adContentArray[adz].s) {
    			newdiv.style.height = (adContentArray[adz].h - slugPadding) + 'px';
  				newdiv.style.paddingTop = slugPadding + 'px';
  			}
   			if (adContentArray[adz].bg == null) {
  				if (adContentArray[adz].s) {
  					newdiv.style.backgroundImage = "url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/300x250_holder_ADSlug.png)";
  				} else {
  					newdiv.style.backgroundImage = 'url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/300x250_holder.png)';
  				}
  			}
   	
   		} else if (adContentArray[adz].id.indexOf('Rectangle') > -1) {
			adContentArray[adz].type = 'Rectangle';
   			if (adContentArray[adz].s) {
    			newdiv.style.height = (adContentArray[adz].h - slugPadding) + 'px';
  				newdiv.style.paddingTop = slugPadding + 'px';
  			}
  			//newdiv.style.paddingLeft = '2px';
  			newdiv.style.height = (newdiv.style.height + 50) + 'px';
   			if (adContentArray[adz].bg == null) {
  				if (adContentArray[adz].s) {
  					newdiv.style.backgroundImage = "url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/180x150_holder_ADSlug.png)";
  				} else {
  					newdiv.style.backgroundImage = 'url(http://a.dolimg.com/media/en-US/dxd/bitmaps/ads/180x150_holder.png)';
  				}
  			}
   		}
   		if (!floater) {
	   		newdiv.style.backgroundRepeat = 'no-repeat';
		}
   }
}

var animateDXDSwf;
function moveDXDSwfDownTo(y) {
	var cur = parseInt(getSWF('dxdcontent').style.marginTop);
	var newPos = (cur+animationStep);
	
	clearTimeout(animateDXDSwf);
	animateDXDSwf = setTimeout("animateDXDSwfDownTo('"+newPos+"','"+y+"')", 20);
}


function animateDXDSwfDownTo(y, end) {
	
	if (parseInt(end) > parseInt(y)) {
		getSWF('dxdcontent').style.marginTop = y + 'px';
		
		var cur = parseInt(getSWF('dxdcontent').style.marginTop);
		var newPos = (cur+animationStep);
		
		clearTimeout(animateDXDSwf);
		animateDXDSwf = setTimeout("animateDXDSwfDownTo('"+newPos+"','"+end+"')", 20);
	} else {
		clearTimeout(animateDXDSwf);
		getSWF('dxdcontent').style.marginTop = end + 'px'
	}
}

function moveDXDSwfUpTo(y) {
	var cur = parseInt(getSWF('dxdcontent').style.marginTop);
	var newPos = (cur-animationStep);
	
	clearTimeout(animateDXDSwf);
	animateDXDSwf = setTimeout("animateDXDSwfUpTo('"+newPos+"','"+y+"')", 20);
}

function animateDXDSwfUpTo(y, end) {
	if (parseInt(end) < parseInt(y)) {
		getSWF('dxdcontent').style.marginTop = y + 'px';
		
		var cur = parseInt(getSWF('dxdcontent').style.marginTop);
		var newPos = (cur-animationStep);
		
		clearTimeout(animateDXDSwf);
		animateDXDSwf = setTimeout("animateDXDSwfUpTo('"+newPos+"','"+end+"')", 20);
	} else {
		clearTimeout(animateDXDSwf);
		getSWF('dxdcontent').style.marginTop = end + 'px'
	}
}



///////////////////////////////////////

var animateChrome;
function moveChromeDownTo(y) {
	var cur = parseInt(document.getElementById('GC_holder').style.marginTop);
	var newPos = (cur+animationStep);
	
	clearTimeout(animateChrome);
	animateChrome = setTimeout("animateChromeDownTo('"+newPos+"','"+y+"')", 20);
}
function moveChromeDownTo(y) {
	var theChromeDiv = document.getElementById('GC_holder');
	var cur = parseInt(theChromeDiv.style.marginTop);
	if(isNaN(cur)) {
		cur = 0;
	}
	var newPos = (cur+animationStep);
	
	clearTimeout(animateChrome);
	animateChrome = setTimeout("animateChromeDownTo('"+newPos+"','"+y+"')", 20);
}


function animateChromeDownTo(y, end) {
	
	if (parseInt(end) > parseInt(y)) {
		document.getElementById('GC_holder').style.marginTop = y + 'px';
		
		var cur = parseInt(document.getElementById('GC_holder').style.marginTop);
		if(isNaN(cur)) {
			cur = 0;
		}
		var newPos = (cur+animationStep);
		
		clearTimeout(animateChrome);
		animateChrome = setTimeout("animateChromeDownTo('"+newPos+"','"+end+"')", 20);
	} else {
		clearTimeout(animateChrome);
		document.getElementById('GC_holder').style.marginTop = end + 'px'
	}
}

function moveChromeUpTo(y) {
	var cur = parseInt(document.getElementById('GC_holder').style.marginTop);
	if(isNaN(cur)) {
		cur = 0;
	}
	var newPos = (cur-animationStep);
	
	clearTimeout(animateChrome);
	animateChrome = setTimeout("animateChromeUpTo('"+newPos+"','"+y+"')", 20);
}

function animateChromeUpTo(y, end) {
	if (parseInt(end) < parseInt(y)) {
		document.getElementById('GC_holder').style.marginTop = y + 'px';
		
		var cur = parseInt(document.getElementById('GC_holder').style.marginTop);
		if(isNaN(cur)) {
			cur = 0;
		}
		var newPos = (cur-animationStep);
		
		clearTimeout(animateChrome);
		animateChrome = setTimeout("animateChromeUpTo('"+newPos+"','"+end+"')", 20);
	} else {
		clearTimeout(animateChrome);
		document.getElementById('GC_holder').style.marginTop = end + 'px';
	}
}




var mouseX, mouseY; // <- Global variables allow your other functions to access the current position
var lastMousePos;
function trackMouse(e) {
	if (!e) e = window.event;
	
	if (e) {
		isOverSkyscraper = false;
		isOverLeaderBoard = false;
		lastMousePos = e;
		if (e.pageX || e.pageY) {
			mouseX = e.pageX;
			mouseY = e.pageY;
		} else {
			mouseX = e.clientX;
			mouseY = e.clientY;
		}
	}
}

function trackMouseIframeSkyScrapper(e) {
	if (e) {
		isOverSkyscraper = true;
		//console.log('isOverSkyscraper')
		if (e.pageX || e.pageY) {
			mouseX = lastMousePos.pageX + e.pageX;
			mouseY = lastMousePos.pageY + e.pageY;
		} else {
			mouseX = lastMousePos.clientX + e.clientX;
			mouseY = lastMousePos.clientY + e.clientY;
		}
	}
}

function trackMouseIframeLeaderboard(e) {
	if (e) {
		isOverLeaderBoard = true;
		//console.log('isOverLeaderBoard')
		if (e.pageX || e.pageY) {
			mouseX = lastMousePos.pageX + e.pageX;
			mouseY = lastMousePos.pageY + e.pageY;
		} else {
			mouseX = lastMousePos.clientX + e.clientX;
			mouseY = lastMousePos.clientY + e.clientY;
		}
	}
}

window.onresize = bumpAdsAndGame;

var bSkyscraperExpanded = false
var bLeaderboardExpanded = false;
var isOverSkyscraper;
var isOverLeaderBoard;

function iframeResizeWatcher(adz, w, h) {
	
	if (document.body.offsetWidth != currentPageWidth) {
		currentPageWidth = document.body.offsetWidth;
	}
	
	adframe = document.getElementById('adframe' + adz);
	addiv = document.getElementById('ab_dxd_ad' + adz);
	
	var embeds;
	var adObjects;	
	try {
		embeds = adframe.contentWindow.document.body.getElementsByTagName("embed");
		adObjects = adframe.contentWindow.document.body.getElementsByTagName("object");
	} catch (e) {
		console.log('iframeResizeWatcher catch 1' + e)
		return;
	}
	
	try {
	
		
				
		if (window.ActiveXObject && !adContentArray[adz].reloaded) {
			adContentArray[adz].reloaded = true;
			adframe.contentWindow.location.reload(false);
			clearTimeout(adResizeTimers[adz]);
			adResizeTimers[adz] = setTimeout("iframeResizeWatcher('"+adz+"', "+w+", "+h+")", iframeResizeTimer);
			return;
		}
		
		if (adContentArray[adz].delegate && adframe && adframe.contentWindow && adframe.contentWindow.document.onmousemove != adContentArray[adz].delegate.onMouseMove) {
			adframe.contentWindow.document.onmousemove = adContentArray[adz].delegate.onMouseMove;
		}

		if (adContentArray[adz].type == 'Leaderboard') {
			
			var embedHeight = 0;
			var expansionHeight = 0;
			
			if (adObjects.length > 0 && (adObjects[0].height > h || adObjects[0].height == "100%")) {
				embedHeight = adObjects[0].height;
			} else if (embeds.length > 0 && (embeds[0].height > h || embeds[0].height == "100%")) {
				embedHeight = embeds[0].height;
			}
			
			expansionHeight = adframe.contentWindow.document.body.scrollHeight;

			if (embedHeight == "100%" || embedHeight > h || isOverLeaderBoard) {
				if (adframe.contentWindow.document.body.scrollHeight > h) {
					expansionHeight = 350;
				} else {
					expansionHeight = h;
				}
			} else {
					expansionHeight = h;
			}
			
			if (expansionHeight >= h)  {				
				addiv.style.height = (expansionHeight)+'px';
				adframe.style.height = (expansionHeight)+'px';
				bLeaderboardExpanded = true;
			}
			
			
		} else if (adContentArray[adz].type == 'Skyscraper' || adContentArray[adz].type == 'Medium Rectangle') {
			
			var embedWidth = 0;
			var expansionWidth = 0;
			if (adObjects.length > 0 && (adObjects[0].width > w || adObjects[0].width == "100%")) {
				embedWidth = adObjects[0].width;
			} else if (embeds.length > 0 && (embeds[0].width > w || embeds[0].width == "100%")) {
				embedWidth = embeds[0].width;
			}
			
			
			if (adContentArray[adz].type == 'Medium Rectangle') {
				var expandSize = 700;
				var pos = adjustAdX(adContentArray[adz].x);
			} else {
				var expandSize = 350; // CES: tried 167
				var pos = adjustAdX(adContentArray[adz].x);
			}
			

			if (embedWidth == "100%" || embedWidth > w || isOverSkyscraper) {
				if (parseInt(adframe.contentWindow.document.body.scrollWidth) > w) {
					expansionWidth = adframe.contentWindow.document.body.scrollWidth;
				} else {
					expansionWidth = 700;
				}
			} else {
					expansionWidth = w;
			}
			
			//console.log(adframe.contentWindow.document.body.scrollWidth)
			
			if (expansionWidth > w)  {
				var contentDiv = adframe.contentWindow.document.getElementById('content');
				
				if (contentDiv != null) {
					contentDiv.style.marginLeft = (expansionWidth-w) + 'px';
				}
				
				addiv.style.backgroundPosition = (expansionWidth-w)+'px 0';
				adframe.contentWindow.document.body.style.left = (pos + (w-expansionWidth)) + 'px'
				addiv.style.left = (pos + (w-expansionWidth)) + 'px'
				addiv.style.width = (expansionWidth)+'px';
				adframe.style.width = (expansionWidth)+'px';
				bSkyscraperExpanded = true;
			} else {
				expansionWidth = w;

				var contentDiv = adframe.contentWindow.document.getElementById('content');
				
				if (contentDiv != null) {
					contentDiv.style.marginLeft = (expansionWidth-w) + 'px';
				}
				
				addiv.style.backgroundPosition = (expansionWidth-w)+'px 0';
				adframe.contentWindow.document.body.style.left = (pos + (w-expansionWidth)) + 'px'
				addiv.style.left = (pos + (w-expansionWidth)) + 'px'
				addiv.style.width = (expansionWidth)+'px';
				adframe.style.width = (expansionWidth)+'px';
				bSkyscraperExpanded = false;
			}
			
		}
		
	} catch (e) {
		console.log('iframeResizeWatcher catch 3' + e)
	};

	clearTimeout(adResizeTimers[adz]);
	adResizeTimers[adz] = setTimeout("iframeResizeWatcher('"+adz+"', "+w+", "+h+")", iframeResizeTimer);
}


function displayAdData(adz, target) {

	if (target == null) {
		target = document.getElementById('ab_dxd_ad' + adz);
	}
	
	var adframe = document.createElement('iframe');
   	adframe.setAttribute('name', 'adframe' + adz);
   	adframe.setAttribute('id', 'adframe' + adz);
   	adframe.setAttribute('frameBorder', 0);
   	adframe.setAttribute('marginHeight', 0);
   	adframe.setAttribute('marginWidth', 0);
   	adframe.setAttribute('height', target.style.height);
   	adframe.setAttribute('width', target.style.width);
   	adframe.setAttribute('scrolling', 'no');
   	adframe.setAttribute('allowTransparency', true);
   	adframe.setAttribute('transparency', true);
   	adframe.setAttribute('style', 'background-color:transparent;filter:alpha(opacity=100)!important');
   	
   	var adFrameContainer = document.getElementById('ab_dxd_ad' + adz);
   	
   	adContentArray[adz].data.replace("'", "\'");
   	adContentArray[adz].data.replace('"', '\"');
   	
	if (adContentArray[adz].data.toLowerCase().indexOf('script') > -1) {
   		adframe.src = 'about:blank';
   		//adframe.onResize = alert('resize');
		var data = unescape(adContentArray[adz].data);
		
		// Extract the ad slug and place it outside the IFRAME.  This is done to maintain the slug in the event that an ad busts out of an IFRAME
		// This RegEx finds the ad slug image from the table sent from the calldown
		var slugExpression = '^[^<]*<table[^<]+<tr[^<]+<td[^>]*>(<img src="([^"]*)"[^>]*>)';
		var regEx = new RegExp(slugExpression);
		var match = regEx.exec(data);
		
		if (match != null) {
			// The slug's image tag
			var slugImg = match[1];
			
			var slugDiv = document.createElement('div');
			slugDiv.setAttribute('id', 'ab_dxd_ad' + adz + 'slug');

			// Position the div slug
			slugDiv.style.position = "absolute";
			slugDiv.style.zIndex = adz + 1;
			slugDiv.style.left = adFrameContainer.style.left;
			slugDiv.style.top = adFrameContainer.style.top;
			slugDiv.style.paddingLeft = adFrameContainer.style.paddingLeft;
			slugDiv.style.paddingTop = adFrameContainer.style.paddingTop;
			slugDiv.innerHTML = slugImg;
			
			document.getElementById("frame").appendChild(slugDiv);
			adSlugs.push(slugDiv);
			
			// Determine if the slug is above the ad, or to the left.
			// This is the regex for the ad being above.
			regEx = new RegExp(slugExpression + '[^<]*</td>[^<]*</tr>[^<]*<tr>[^<]*<td');
			
			// If the ad is on top, shift the ad div down by increasing the top padding
			if (regEx.exec(data) != null) {
				// The padding looks something like '8px', so we remove the 'px', add the width of the slug, then re-add 'px' to the end
				adFrameContainer.style.paddingTop = (parseInt(('' + adFrameContainer.style.paddingTop).replace('px', '')) + slugWidth) + 'px';
			// Otherwise shift the ad to the right by increasing the left padding
			} else {
				adFrameContainer.style.paddingLeft = (parseInt(('' + adFrameContainer.style.paddingLeft).replace('px', '')) + slugWidth) + 'px';
			}

			data = data.replace(slugImg, '');
		}

		adFrameContainer.appendChild(adframe);
   		
		adframe.contentWindow.document.open("text/html","replace");
   		adframe.contentWindow.document.write('<html><head><title></title><script>function errorHandler(){return true;}; window.onerror=errorHandler</script></head><body id="adBody" class="adBody" style="background-color:transparent"><div id="content">'+data+'</div></body></html>');
   		adframe.contentWindow.document.close();
   		
   		clearTimeout(adResizeTimers[adz]);			
		adResizeTimers[adz] = adframe.contentWindow.document.body.onLoad = setTimeout("iframeResizeWatcher('"+adz+"', "+target.style.width.replace('px', '')+", "+target.style.height.replace('px', '')+")", iframeResizeTimer);

		if (adContentArray[adz].type == 'Medium Rectangle' || adContentArray[adz].type == 'Skyscraper') {
			adContentArray[adz].delegate = new MouseMoveDelegate(adframe, trackMouseIframeSkyScrapper);
		} else {
			adContentArray[adz].delegate = new MouseMoveDelegate(adframe, trackMouseIframeLeaderboard);
		}
   		adframe.contentWindow.onerror = errorsuppressor;
    } else {
        target.innerHTML = unescape(adContentArray[adz].data);
    }
    
}

function makeHttpRequest(url, callback_function, return_xml, target, iframe) {

	document.getElementById("frame").appendChild(target);
	
	var adframe = document.createElement('iframe');
   	adframe.setAttribute('name', 'adframe' + adz);
   	adframe.setAttribute('id', 'adframe' + adz);
   	adframe.setAttribute('frameborder', 0);
   	adframe.setAttribute('marginheight', 0);
   	adframe.setAttribute('marginwidth', 0);
   	adframe.setAttribute('height', target.style.height);
   	adframe.setAttribute('width', target.style.width);
   	adframe.setAttribute('scrolling', 'no');
   	adframe.setAttribute('allowTransparency', 'true');
   	
   	var adFrameContainer = document.getElementById('ab_dxd_ad' + adz);
   	
	
	var http_request = false;

	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
		   http_request.overrideMimeType('text/xml');
		}

	} else if (window.ActiveXObject) { // IE
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
			}
		}
	}

	if (!http_request) {
		return false;
	}
	
	http_request.onreadystatechange = function() {
	if (http_request.readyState == 4) {
		if (http_request.status == 200 || http_request.status == 0) {
			if (return_xml) {
				var xml = http_request.responseXML;
				target.innderHTML = xml.firstChild;
			} else {
				if (http_request.responseText.indexOf('script') > -1) {
					//adframe.setAttribute('src', url);
					//adFrameContainer.appendChild(adframe);
				} else {
					target.innerHTML = http_request.responseText;
					//adFrameContainer.removeChild(adframe);
					////alert(http_request.responseText)
					////alert('no script');
				}
			}
			document.getElementById("frame").appendChild(target);

			//document.getElementById("flashcontent").style.top = '110px';
		} else {
			//alert('There was a problem with the request.(Code: ' + http_request.status + ')');
	}
	}
   		}
   		http_request.open('GET', url, true);
   		http_request.send(null);
   //}
}


function writeDXDFlash(){

	var questionMark = window.location.href.indexOf("?");
	var hash = window.location.href.indexOf("#");
	
	if (hash > -1) {
		var flashVars = questionMark < 0 ? "" : window.location.href.substring(questionMark+1, hash);
		var hashString = window.location.href.substring(hash+1);
		var lastSlash = hashString.lastIndexOf("/")+1;
		if (lastSlash == -1) {
			lastSlash = 0;
		}
		var deeplink = hashString.substring(lastSlash);
		
		if (flashVars.length > 0) {
			var exists = flashVars.indexOf("channel") > -1 ? true : false;
			if (exists) {
				var startPos = flashVars.indexOf("channel=")+1;
				var choppedVars = flashVars.substring(startPos+6);
				var endPos = choppedVars.indexOf("&");
				if (endPos == -1) {
					endPos = choppedVars.length;
				}
				var replaceVal = choppedVars.substring(startPos, endPos);
				var splitString = flashVars.split(replaceVal);
				flashVars = splitString[0] + deeplink + splitString[1];
				
			} else {
				flashVars = flashVars + "&channel=" + deeplink;
			}
		} else {
			flashVars = "channel=" + deeplink;
		}
		
	} else {
		var flashVars = questionMark < 0 ? "" : window.location.href.substr(questionMark+1);
	}
	
	flashVars = (flashVars.length > 0) ? flashVars + "&" + deparams : deparams;
	flashVars = (flashVars.length > 0) ? flashVars + "&chromeData=" + escape(document.location.href) : "chromeData=" + escape(document.location.href);
	flashVars = (flashVars.length > 0) ? flashVars + "&basePath=" : "basePath=";
	
	//browser detect for wmode stuff
	var ua = navigator.userAgent.toLowerCase();
	var mac = (ua.indexOf("mac")>-1);
	
	var ff2 = (ua.indexOf("firefox/2")>-1);
	var ff3 = (ua.indexOf("firefox/3")>-1);
	var s2 = (ua.indexOf('safari') > -1 && ua.indexOf('applewebkit') > -1 && (ua.indexOf('416') > -1 || ua.indexOf('412') > -1));
	
	
	var fvars = false;
	var flashparams = {
  		menu: "false",
  		scale: "noscale",
		menu: "false",
		quality: "best",
		salign: "tl",
		base: ".",
		align: "t",
		bgcolor: "#FFFFFF",
		flashVars: flashVars,
		allowFullScreen: "true",
		allowScriptAccess: "always"
	};
	
	if (mac && (ff2 || s2)) {
		flashparams.wmode = "Transparent";
	} else if (ff3 && mac) {
		flashparams.wmode = "Window";
	} else {
		flashparams.wmode = "Opaque";
	}
	
	var attributes = {
  		id: "dxdcontent",
 		 name: "dxdcontent"
	};

	swfobject.embedSWF("http://a.dolimg.com/media/en-US/dxd/DFSF.swf", "flashcontent", "994", "700", "10.0.0","http://a.dolimg.com/swf/dcom/expressInstall.swf", fvars, flashparams, attributes);
		
}


function onExpressInstall() {
}

function onLoadEventHandler() {

	if(!document.getElementById)top.location.replace("http://disney.go.com/home/html/index.html");



	loaded=(connection=="broadband"||connection=="xdsl"||connection=="t1"||connection=="cable"||connection=="wireless"||connection=="?")?true:false;
	narrowBand=(!loaded)?true:false;
	country = country.toLowerCase();
	cload=(country=="united states"||country=="canada"||country=="puerto rico"||country=="guam"||country=="us virgin islands"||country=="american samoa"||country=="northern mariana islands")?true:false;

	if(!cload){
		if (country == "united kingdom") {
			document.location.replace("http://home.disney.co.uk/");
		} else {
			document.location.replace("http://disney.go.com/dxd/international.html");
		}
	}

	var modecheck = params(document.cookie,"MODE",null);
	if(modecheck=="1")loaded=false;
	if(modecheck=="0")loaded=true;

	deparams = "connection=" + connection;
	deparams += "&country=" + country;
	deparams += "&loaded=" + loaded;
	deparams += "&narrowBand=" + narrowBand;
	deparams += "&cload=" + cload;
	deparams += "&modecheck=" + modecheck;

	if(!loaded) {
		document.location.replace("http://home.disney.go.com/lite/index");
	}

	var FLASHVERSION = swfobject.getFlashPlayerVersion();
	if (loaded && (FLASHVERSION.major == 0)) {
		SetCookieUtil("return_path",document.location,oneWeek,"",".go.com","");
		document.location.replace("http://disney.go.com/home/html/index.html?flash=false");
	}

	writeDXDFlash();
	
	document.onmousemove=trackMouse;
	
	try {
		cto=new CTO();
	    cto.account='disneycom';
	    cto.category='dcore';
	    cto.site='dcom';
	    cto.siteSection='';
	    cto.pageName='play_html_wrapper';
	    cto.contentType='regular';
	    cto.brandSegment='play';
	    cto.property='';
	    cto.region='';
	    cto.country='';
	    cto.unit='';
	    cto.track();

	} catch (e) {
		//try catch just in case aglobal.go goes down again.
	}

}

document.onLoad = onLoadEventHandler();

function errorsuppressor(){
	return true;
}
window.onerror = errorsuppressor;



var today = new Date();
var expire = new Date(today.getTime() - 10);
var oneYear = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
var oneMonth = new Date(today.getTime() + 30 * 24 * 60 *60 * 1000);
var oneWeek = new Date(today.getTime() + 7 * 24 * 60 *60 * 1000);
var twoWeek = new Date(today.getTime() + 14 * 24 * 60 *60 * 1000);
var nonbranded = "http://disney.go.com/detect/nonbranded.html";
//redirect function

//sets the cookie
function SetCookieUtil (name,value,expires,path,domain,secure) {
	document.cookie = name + "=" + escape (value) +	((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "; path=/") + ((domain) ? "; domain=" + domain : "; domain=.go.com") +	((secure) ? "; secure" : "");
}

function SetCookieUtilRaw (name,value,expires,path,domain,secure) {
	document.cookie = name + "=" + escape (value) +	((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "; path=/") + ((domain) ? "; domain=" + domain : "; domain=.go.com") +	((secure) ? "; secure" : "");
}

function params(wut,qp,dflt) {
	dflt=(dflt==null)?'':dflt; 
	try {
		r = unescape(wut.match(new RegExp(qp+"=+([^&;]*)"))[1]);
	} catch (qp) {
		r=dflt;
	} 
	return r;
}

function GetCookie(name) {
    var cookieValue = params(document.cookie,name,null);
    return cookieValue;
}



function popWindow(url, name, params) {
    window.open(url, name, params);
}

function isInternetExplorer() {
	var rv = -1; // Return value assumes failure.
	if (navigator.appName == 'Microsoft Internet Explorer'){
		var ua = navigator.userAgent;
		var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		if (re.exec(ua) != null)
		rv = parseFloat( RegExp.$1 );
	}
	if (rv == -1) {
		return false;
	} else {
		return true;
	}
}

// Send a message from the chrome to Flash
function chromeMessage2DFSF(C) {

	if(C.panelID){
		var msg = {messageType:"com.disney.coretech.dfsf.messaging.ChangeChannelMessage", channelId:C.panelID};
	} else {
		var msg = {messageType:"com.disney.coretech.dfsf.messaging.NavigateToUrlMessage", url:C.url};
	}
	
	
	var flashObject = getFlashObject("dxdcontent");
	flashObject.sendMessage(msg);
}

// Receive a message from Flash and fire a chrome function.
function handleDFSFMessage(msg, messageType) {
	var theMessage = "";

	
	if(messageType) {
		switch(messageType) {
			case "com.disney.coretech.dfsf.messaging.JavascriptAdapterReadyMessage":
				var flashObject = getFlashObject("dxdcontent");
				flashObject.watchMessageType("com.disney.coretech.dfsf.messaging.ChannelChangingMessage");
				flashObject.watchMessageType("com.disney.coretech.dfsf.tracking.TrackingMessage");
				break;

			case "com.disney.coretech.dfsf.messaging.ChannelChangingMessage":
			
				var isMaster = msg.isMasterChannel;
				var footerMode;
				var targetChromePosition = 0;
				
				if(isCDS)
				{
					footerMode = "cds";
				}
				else if(isMaster)
				{
					footerMode = ""
					targetChromePosition = 108
				}
				else
				{
					footerMode = "legalOnly";
				}
				
				moveChromeDownTo(targetChromePosition)
				if (_gdeFooter.footerDisplayMode != footerMode) {
				    _gdeFooter.footerDisplayMode = footerMode;
				    _gdeFooter.setFooterDisplayState();
				}
			
				theMessage = msg.channelCategory;
				var splitMessage = theMessage.split(" - ");
				theMessage = splitMessage[0];
				if (chromeLinkMap[theMessage]) {
					_gdeChrome.highlightChromeButton(chromeLinkMap[theMessage]);
				}
				

				changeFooter(msg.channelCategory);
				_gdeFooter.showFooter();				
				
				break;
			case "com.disney.coretech.dfsf.tracking.TrackingMessage":
				if (typeof cto == "object") {
					cto = null;
					cto = new CTO();
					for (var o in msg) {
						cto[o] = msg[o];
					}
					cto.update();
				}

				break;
			default:
				break;
		}
	}
}

function changeFooter(channel) {
	var lgProtocol=window.location.protocol.toString();
	var legalFooterImgPath="//"+((lgProtocol=="https:")?"s":"a")+".dolimg.com/en-US/dcom/media/footer/comscore/";
	var	comscoreImage = "comscore_disney.gif";
	var comscoreURL = "http://disney.go.com/index";

	if (channel) {
		for (var i = 0; i < chromeLinkMap.length; i++) {
			var linkParts = chromeLinkMap[i].split('|');
			if (channel == linkParts[0]) {
				comscoreImage = linkParts[3];
				comscoreURL = linkParts[4];
				break;
			}
		}
	}


	var D = document.getElementById(footerComImageDiv);
	// The comscore div won't exist sometimes, for instance in CDS mode
	if(D)
	{
		var theLinks = D.getElementsByTagName('a');
		var theImages = theLinks[0].getElementsByTagName('img');
		theLinks[0].href = comscoreURL;
		theImages[0].src = legalFooterImgPath + comscoreImage;
	}
}

// Utility function to get the flash object
function getFlashObject(id) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[id];
	} else {
		return document[id];
	}
}


function chromeMessage(C) {
	output = "";
	for (items in C) {
		output += items + ": " + C[items] + "\n";
	}
	//alert(output);
}

function checkForHighlightedButton() {
	var channelURLId = location.hash;
	if (channelURLId.indexOf("#/mypage") != -1) {
		_gdeChrome.highlightChromeButton("my_page");
	} else if (channelURLId.indexOf("#/characters") != -1) {
		_gdeChrome.highlightChromeButton("characters");
	} else if (channelURLId.indexOf("#/games") != -1) {
		_gdeChrome.highlightChromeButton("games");
	} else if (channelURLId.indexOf("#/videos") != -1) {
		_gdeChrome.highlightChromeButton("videos");
	} else if (channelURLId.indexOf("#/create") != -1) {
		_gdeChrome.highlightChromeButton("create");
	}
}
