// 090610
// text displayed when clicking chromeLinkXXXX
var chromeDisclaimerText = "Hey Kids! You are about to go to a page that may have ads for Disney products or services.";

// chromeLinkXXXX  set this variable to the link to modify, where XXXX is the link title.  Example: chromeLinkMovies
var chromeLinksToModify=new
Array("chromeLinkGames","chromeLinkVideos","chromeLinkMyPage","chromeLinkCharacters","chromeLinkMovies","chromeLinkMusic","chromeLinkLiveEvents","chromeLinkParks","chromeLinkStore","chromeLinkForYou");

var tempDscURL = new Array;
var xLoc,yLoc,disclaimerTimeout;

if (document.addEventListener) {
	document.addEventListener("DOMContentLoaded", doChromeModify, false);
}else{
	window.onload = function(){
		doChromeModify();
	}
}

function doChromeModify(){
	bgURL=window.location.protocol+"//a.dolimg.com/en-US/dcom/media/foryou/preschool/disclaimerbg.gif";
	document.onmousemove=getMousePosition;
	
	var oDiv=document.createElement("div");
	oDiv.id="chromeDisclaimer";
	oDiv.style.position="absolute";
	oDiv.style.top="0px";
	oDiv.style.left="0px";
	oDiv.style.visibility="hidden";
	oDiv.style.border="black 1px solid";
	oDiv.style.width="290px";
	oDiv.style.font="12px arial,helvetica,geneva,sans-serif";
	oDiv.style.fontWeight="bold";
	oDiv.style.padding="10px";
	oDiv.style.textAlign="center";
	oDiv.style.backgroundImage="url("+bgURL+")";
	oDiv.style.color="#FFFFFF";
	oDiv.style.zIndex="150";
	oDiv.innerHTML=chromeDisclaimerText;
	document.body.appendChild(oDiv);

	for (i=0;i<chromeLinksToModify.length;i++){
		if(document.getElementById(chromeLinksToModify[i]) != null){
			tempDscURL.push(document.getElementById(chromeLinksToModify[i]).href);
			document.getElementById(chromeLinksToModify[i]).href="javascript:chromeDisclaimer("+i+"); void(0);";
		}
	}
}

function getMousePosition(doh){

	var xPos,yPos;

	if(document.all){
		xPos=event.clientX;
		yPos=event.clientY;
	}
	else{
		xPos=doh.pageX;
		yPos=doh.pageY;
	}

	xLoc=xPos-100;
	yLoc=yPos+10;

	return true;
}

function chromeDisclaimer(num){
	document.getElementById('chromeDisclaimer').style.left=xLoc+'px';
	document.getElementById('chromeDisclaimer').style.top=yLoc+'px';
	document.getElementById('chromeDisclaimer').style.visibility='visible';
	disclaimerTimeout = setTimeout('gotoPage('+num+')', 3000);
}

function gotoPage(num){
	document.location = tempDscURL[num];
}// JavaScript Document