// set the street date for pre/post street read

streetDate=[2008,1,8];
function checkAvailability() {
	var year=streetDate[0];
	var month=streetDate[1]-1;
	var date=streetDate[2];
	var today=new Date();
	var todaysYear=today.getFullYear();
	var todaysMonth=today.getMonth();
	var todaysDate=today.getDate();
	todayDateTime = today.getTime();
	var availableDate = new Date();
	availableDate.setFullYear(year);
	availableDate.setMonth(month);
	availableDate.setDate(date);
	availableDateTime = availableDate.getTime();
	if(todayDateTime >= availableDateTime){
		nowAvailable=true;
	}else{
		nowAvailable=false;
	}
}
checkAvailability();

function launch800Popup(hb) {
	hitbox.Set_hbLink(exitLinkArray[hb]);
	var w = 390;
	var h = 270;
	var winl = (screen.width - w) / 3;
	var wint = (screen.height - h) / 3;
	coords = 'width='+w+',height='+h+',top='+wint+',left='+winl;
	orderWin = window.open('http://disneyvideos.disney.go.com/moviefinder/calltoorder.html','orderpop', coords,'scrollbars=no,resizable=no');
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function launchOrder(orderPage, hb) {
	// document.write('<s'+'cript language="JavaScript" src="http://switch.atdmt.com/action/Peter_Pan_Return_To_Neverland_buynow"></s'+'cript>');
	hitbox.Set_hbLink(exitLinkArray[hb]);
	neverlandWin = window.open(orderPage,'neverlandpop');
	neverlandWin.focus(); 
}

function openPage(targURL, hb) {
	if (hb>=0){hitbox.Set_hbPageView(pageArray[hb], contentArray[hb]);}
	neverlandWin = window.open(targURL,'neverlandpop');
	neverlandWin.focus(); 
}
function openExitPage(targURL, hb) {
	if (hb>=0){hitbox.Set_hbLink(exitLinkArray[hb]);}
	neverlandWin = window.open(targURL,'neverlandpop');
	neverlandWin.focus(); 
}

function noflashImg() {
	if (nowAvailable) {
		document.write('<td align="center" valign="top" class="noflash" id="noflashPoststreet">');
	} else {
		document.write('<td align="center" valign="top" class="noflash" id="noflashPrestreet">');
	}
	
}
function textonlyStreet() {
	if (nowAvailable) {
		var streetImg = "textonly_poststreet.jpg";
	} else {
		var streetImg = "textonly_prestreet.jpg";
	}
	document.write("<img src='textonly_files/"+streetImg+"' alt='Eagle vs. Shark' width='994' height='190' hspace='0' vspace='1' border='0' usemap='#orderMap'>");
        
}

//disclaimer
function openDisclaimer(targURL, hb){
	if (hb>=0){hitbox.Set_hbLink(exitLinkArray[hb]);}
	GOurl2(targURL);
	// disclaimerWinwin = window.open('http://disney.go.com/disneyvideos/javascript/disclaimer/disclaimer.html?'+ targURL, 'intermediate', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=370,height=210');
	// disclaimerWin.window.focus();
}

/*******************************************************************
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>');
}
/*******************************************************************
STARTS GENERATING LINK DISCLAIMER
************/

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
