var do_drop=(parseInt(navigator.appVersion) >= 4) &&
	(navigator.appName.indexOf("Microsoft Internet Explorer") != -1) && (navigator.appVersion.indexOf("Win") != -1);

var MM2K_nLayerTimeoutID=null;

function MM2K_overLayer() {
	if (!do_drop)
		return;

	if ( MM2K_nLayerTimeoutID )
		clearTimeout(MM2K_nLayerTimeoutID);
	MM2K_nLayerTimeoutID=null;
}

function MM2K_outLayer() {
	if (!do_drop)
		return;
	if ( MM2K_nLayerTimeoutID )
		clearTimeout(MM2K_nLayerTimeoutID);
	MM2K_nLayerTimeoutID=setTimeout('MM2K_showHideLayers(\'movierewardsBurst\',\'\',\'hide\',\'support_unt\',\'\',\'hide\')', 1);
}

var MM2K_nButtonTimeoutID=null;

function MM2K_overButton(sJS) {
	if (!do_drop)
		return;
	if ( MM2K_nButtonTimeoutID )
		clearTimeout(MM2K_nButtonTimeoutID);
	MM2K_nButtonTimeoutID=setTimeout(sJS, 130);
}

function MM2K_outButton() {
	if (!do_drop)
		return;

	if ( MM2K_nButtonTimeoutID )
		clearTimeout(MM2K_nButtonTimeoutID);
	MM2K_nButtonTimeoutID=null;
}

function MM2K_hideElement(sElementID, oDOMLayer)  {
	var nIndex;
	var oDOMElement;
	var nLeft;
	var nTop;
	var oDOMParent;

	if ( !document.all )
		return true;

	var nX=oDOMLayer.style.top;
	nX=parseInt(nX.substring(0, nX.length - 2));
	var nY=oDOMLayer.style.left;
	nY=parseInt(nY.substring(0, nY.length - 2));

	for (nIndex=0; nIndex < document.all.tags(sElementID).length; nIndex++) {
		oDOMElement=document.all.tags(sElementID)[nIndex];
		if (( sElementID == 'OBJECT' ) && ( oDOMElement.codeBase.indexOf('/flash/') != -1))
			continue;
		if (( !oDOMElement ) || ( !oDOMElement.offsetParent))
			continue;
		nLeft=oDOMElement.offsetLeft;
		nTop=oDOMElement.offsetTop;
		oDOMParent=oDOMElement.offsetParent;
		while ( oDOMParent.tagName.toUpperCase() != 'BODY') {
			nLeft += oDOMParent.offsetLeft;
			nTop += oDOMParent.offsetTop;
			oDOMParent=oDOMParent.offsetParent;
		}
		// Adjust the element's offsetTop relative to the dropdown menu
		nTop=nTop - nX;

		if ( nY > (nLeft + oDOMElement.offsetWidth) || nLeft > (nY + oDOMLayer.offsetWidth));
		else if ( nTop > oDOMLayer.offsetHeight );
		else oDOMElement.style.visibility='hidden';
	}
}

function MM2K_showElement(sElementID) {
	var nIndex;
	var oDOMElement;

	if ( !document.all )
		return true;

	for (nIndex=0; nIndex < document.all.tags(sElementID).length; nIndex++) {
		oDOMElement=document.all.tags(sElementID)[nIndex];
		if (( !oDOMElement ) || ( !oDOMElement.offsetParent))
			continue;
		oDOMElement.style.visibility='';
	}
}

// Standard MM JavaScript

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM2K_showHideLayers() { // based off v3.0 MM_showHideLayers
	var i,p,v,obj,args=MM2K_showHideLayers.arguments;
	var oDOMLayer;
	if ( !do_drop )
		return;
	for (i=0; i<(args.length-2); i+=3)
		if ( (obj=MM_findObj(args[i]))!=null ) {
			v=args[i+2];
			oDOMLayer=obj;
			if (obj.style) {
				obj=obj.style;
				v=(v=='show')?'visible':(v='hide')?'hidden':v;
			}
			if ( v=='visible' ) {
 				MM2K_hideElement('SELECT', oDOMLayer);
				MM2K_hideElement('OBJECT', oDOMLayer);
			} else {
				MM2K_showElement('SELECT');
				MM2K_showElement('OBJECT');
			}
			obj.visibility=v;
		}
}

// DEFAULTS
theImage="http://disney.go.com/disneyvideos/pixarshorts/";
burstAltTag='Disney Movie Rewards';
exitLink="exit_pixar+shorts_burst_disney+movie+rewards";
burstXdim=283;
burstYdim=161;

// regExp to change the exit link and image
// COMMENT OUT BLOCKS TO REMOVE THE BURSTS FROM SITES

/*
if(location.href.match(/airbuddies/)){
	exitLink="Exit_air+buddies_movieRewards+burst"}
	
if(location.href.match(/babyeinstein_buy3offer/)){
	exitLink="Exit_baby+einstein+buy+3+offer_movieRewards+burst";
	theImage+="burst_BabyEinstein3.png";
	burstAltTag+=' Baby\'s First Moves';
	document.write('<style type="text/css">#movierewardsBurst{right:6px;top:330px;}</style>');}
*/
	
if(location.href.match(/pixarshorts/)){
	exitLink="exit_pixar+shorts_burst_disney+movie+rewards"
	theImage+='burst_pin.png';
	burstAltTag+=' Pixar Shorts';
	document.write('<style type="text/css">#movierewardsBurst{left:50%;margin-left:250px;top:500px;}</style>');}
	//document.write('<style type="text/css">#movierewardsBurst{right:90px;top:500px;}</style>');}


// END INSTANT WINS

if(theImage=="http://disney.go.com/disneyvideos/pixarshorts/"){ // SET DEFAULT BURST IMAGE IF NOT SET ABOVE
	theImage+='burst_pin.png'}

mappy="burst";
if(theImage.match(/dmrInstantWin2/)){
	burstAltTag='Play the new Instant Win Game &mdash; 12,000 Instant Winners!';
	mappy="dmrInstantWin2";
}

MM2K_loaded=true;

document.write('<style type="text/css">');
var IE=document.all?true:false;
if(IE){
	document.write('#sweepsBurst{width:'+burstXdim+'px;height:'+burstYdim+'px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+theImage+'\',sizingMethod=\'scale\')}');
}else{
	document.write('#sweepsBurst{width:'+burstXdim+'px;height:'+burstYdim+'px;}');
}
document.write('</style>');

// WRITE THE BURST
document.write('<div id="movierewardsBurst" onMouseOver="MM2K_overLayer(); MM2K_showHideLayers(\'support_unt\',\'\',\'hide\',\'movierewardsBurst\',\'\',\'show\')" style="position:absolute;width:'+burstXdim+'px;height:'+burstYdim+'px;z-index:2;visibility:visible">');
if(navigator.appName=="Microsoft Internet Explorer"){
	document.write('<div id="sweepsBurst"><img border="0" src="http://adisney.go.com/disneyvideos/assets/invis.gif" width="'+burstXdim+'" height="'+burstYdim+'" alt="" title="" /></div>\
	<div style="position:relative;top:-'+burstYdim+'px;"><img border="0" src="http://adisney.go.com/disneyvideos/assets/invis.gif" width="'+burstXdim+'" height="'+burstYdim+'" alt="" title="" usemap="#'+mappy+'" /></div>');
}else{
	document.write('<img border="0" src="'+theImage+'" width="'+burstXdim+'" height="'+burstYdim+'" alt="" title="'+burstAltTag+'" usemap="#'+mappy+'" />');
}

//<img src="burstCars.png" width="270" height="150" alt="" border="0" usemap="#burst">
document.write('<map name="burst">\
<area alt="" target="_top" coords="226,18,248,41" title="Close [x]" href="javascript:void(0)" onClick="javascript:document.getElementById(\'movierewardsBurst\').style.visibility=\'hidden\'">\
<area alt="Disney Movie Rewards" shape="poly" coords="37,20,37,130,248,133,248,46,219,46,218,17" href="http://disney.go.com/disneymovierewards/pins/index.html" target="_top" name="&lid='+exitLink+'" title="'+burstAltTag+'">\
</map>');



/*******************************************************************
START LINK DISCLAIMER
*******************************************************************/
function GOurl(url) {
GOurl2(url);
}
/*******************************************************************
END LINK DISCLAIMER
*******************************************************************/

/*******************************************************************
STARTS GENERATING LINK DISCLAIMER
*******************************************************************/
function GOurl2(url,width,height,scrollbars,name){
if (name != null) { url = url + '\",\"'+name+'\"'; } else { url = url + '\",\"_blank\"'; }
if (width != null) { url = url + ',\"width='+width+',height='+height; if (scrollbars != null) { url = url + ',scrollbars\"' } else { url = url + '\"'; } }
var popDisclaimer=window.open("","disclaimer","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=370,height=210,top=100,left=150,screenX=180,screenY=100");
popDisclaimer.document.write ('<html>');
popDisclaimer.document.write ('<head>');
popDisclaimer.document.write ('<title>Disney.com - Disclaimer</title>');
popDisclaimer.document.write ('<SCR'+'IPT TYPE="text/javascript" LANGUAGE="JavaScript">');
popDisclaimer.document.write ('sendTimer = setTimeout("sendToClientSide()",1500);closeTimer = setTimeout("window.close()",15000);');
popDisclaimer.document.write ('function sendToClientSide(){window.open("'+url+');}');
popDisclaimer.document.write ('</scr'+'ipt>');
popDisclaimer.document.write ('</head>');
popDisclaimer.document.write ('<body bgcolor="#FFFFFF" text="#0065CE" link="#FFFF80" vlink="#FFFF80" alink="#FFFF80" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>');
popDisclaimer.document.write ('<table width="370" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="http://disney.go.com/sponsors/images/disclaimer_top.gif" width="370" height="27" alt="" border="0"></td></tr><tr><td><table width="330" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td><br><FONT FACE="Verdana,sans-serif" SIZE="2" COLOR="#0065CE"><b>The web site you are about to link to is not controlled by Disney Online and different terms of use and privacy policy will apply. By proceeding you agree and understand that Disney Online is not responsible for the site you are about to access.</b></FONT><br><br></td></tr></table>');
popDisclaimer.document.write ('</td></tr><tr bgcolor="#0000CC"><td align="center" height="20"><a href="javascript:window.close();"><FONT FACE="Verdana,sans-serif" SIZE="1" COLOR="#FFFF00"><b>Close this window</b></font></a></td></tr></table>');
popDisclaimer.document.write ('</body>');
popDisclaimer.document.write ('</html>');
}
/*******************************************************************
STOPS GENERATING LINK DISCLAIMER
*******************************************************************/

