<!--

// win IE style fixes


function launchDisclaimer() {
	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;
	win = window.open('http://bvhe.video.go.com/popups/calltoorder.html','orderwin', coords,'scrollbars=no,resizable=no');
}

function launchOrder800() {
	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;
	win = window.open('http://bvhe.video.go.com/popups/calltoorder.html','orderwin', coords,'scrollbars=no,resizable=no');
}

function openTrailer(clipID) {
	var w = 360;
	var h = 480;
	var winl = (screen.width - w) / 3;
	var wint = (screen.height - h) / 3;
	coords = 'width='+w+',height='+h+',top='+wint+',left='+winl;
	win = window.open('http://www.totaleclips.com/player/splash.aspx?custid=3&playerid=8&clipid='+clipID,'trailerwin', coords,'scrollbars=yes,resizable=yes');
}

function launchPopup(newURL) {
	win = window.open(newURL,'blurayWin');
	win.focus()
}

function openCtrWindow(theURL,winName,attributes,w,h) { //v2.0
	var winl = (screen.width - w) / 3;
	var wint = (screen.height - h) / 3;
	coords = attributes+',width='+w+',height='+h+',top='+wint+',left='+winl;
	win = window.open(theURL,winName,coords);
	win.focus()
}

function checkAvailable(movieArray) {
	var year=movieArray[1];
	var month=movieArray[2]-1;
	var date=movieArray[3];
	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){
		listNow.push(movieArray[0]);
	}else{
		listSoon.push(movieArray[0]);
	}
}

function writeMoviesList () {
	listSoon = new Array();
	listNow = new Array();
	for (i in movies) {
		checkAvailable(movies[i]);
	}
	// alert ("listNow="+listNow+"; listSoon="+listSoon);
	document.write('<table width="470" border="0" cellspacing="0" cellpadding="0" class="moviesList"><tr><td valign="top" class="streetRead">');
	document.write('Coming&nbsp;Soon:</td><td align="left" valign="top" class="titles"><ul>');
	for (i in listSoon) {
		document.write('<li>'+listSoon[i]+'</li>');
	}
	document.write('</ul></td></tr><tr><td valign="top" class="streetRead">Now Available:</td><td align="left" valign="top" class="titles"><ul>');
	for (i in listNow) {
		document.write('<li>'+listNow[i]+'</li>');
	}
    document.write('</ul></td></tr></table>');
}