// JavaScript Document

function openDownload(cPath,cMovie){
	cPath = "http://www.thebigpicture.tv/"+cPath
	var newWind;
	var output;
	var wide = 400;
	var high = 300;
	var wCenter = ((screen.width)/2-(wide)/2);
	var hCenter = ((screen.height)/2-(high)/2);
	output='<HTML><HEAD><TITLE>The Big Picture</TITLE><link href="GeneralStyle.css" rel="stylesheet" type="text/css">'
	output+='<SCRIPT LANGUAGE="JavaScript1.2" SRC="BPscripts.js"></SCRIPT></HEAD><BODY>'
	output+='<FORM METHOD="LINK" ACTION="settings.html"><TABLE WIDTH="99%" HEIGHT="99%" BORDER="1" ALIGN="CENTER" CELLPADDING="25" CELLSPACING="0" BORDERCOLOR="#162A4D"><TR><TD>'
	output+='<P ALIGN="center" class="bodyheader"><A HREF="'+cPath+''+cMovie+'.wmv">DOWNLOAD THE CLIP HERE</A></P>'
	output+='<P ALIGN="center" class="bodytext">Filename: "'+cMovie+'"</P>'
	output+='<P ALIGN="left" class="bodytext">Please right-click the link (Apple users may need to control-click) and choose \"Save Target As...\" or \"Save link As...\" from the selection menu.<br><br>At the Save prompt choose a location to save the file and click Save.</p>'
	output+='</TD></TR></TABLE></FORM></body></html>'	
	newWind=window.open("","window","HEIGHT="+high+",WIDTH="+wide+",scrollbars=0,resizable=0,toolbar=0,menubar=0,location=0,directories=0,status=0,top="+hCenter+",left="+wCenter);
	newWind.document.write(output);
	newWind.document.close;
	newWind.focus();	
}

function openWinMedia(cMovie,nWidth,nHeight){
	var newWind;
	var output;
	var wide = (nWidth)+50; // window width
	var nHeight = (nHeight)+70 // movie height (nWidth = movie width)
	var high = (nHeight)+140; // window height.
	var wCenter = ((screen.width)/2-(wide)/2);
	var hCenter = ((screen.height)/2-(high)/2);
	output='<HTML><HEAD><TITLE>The Big Picture</TITLE><link href="GeneralStyle.css" rel="stylesheet" type="text/css"></head><BODY>'
	output+='<TABLE WIDTH="99%" HEIGHT="99%" BORDER="1" ALIGN="CENTER" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#162A4D"><TR class="bodytext"><TD>'
	output+='<P ALIGN="center">Double-click movie to view fullscreen</P>'
	output+='<P ALIGN="center">'
	output+='<object width="'+nWidth+'" height="'+nHeight+'"'
	output+='classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1">'
	output+='<param name="Filename" value="'+cMovie+'.wmv">'
	output+='<param name="AutoStart" value="True">'
	output+='<param name="ShowControls" value="True">'
	output+='<param name="ShowStatusBar" value="True">'
	output+='<param name="ShowDisplay" value="False">'
	output+='<param name="AutoRewind" value="True">'
	output+='<embed type="application/x-mplayer2"'
	output+='pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/"'
	output+='width="'+nWidth+'" height="'+nHeight+'" src="'+cMovie+'.wmv"'
	output+='filename="'+cMovie+'.wmv" autostart="True"'
	output+='showcontrols="True" showstatusbar="True"'
	output+='showdisplay="False" autorewind="True">'
	output+='</embed>'
	output+='</object>'
	output+='<br><br>'
	output+='<a href="http://www.microsoft.com/windows/windowsmedia/default.aspx" target="_blank"><img src="images/getwindows.gif" width="88" height="31" border="0" alt="download the Windows Media Player plugin"></a>'
	output+='</TD></TR></TABLE></BODY></HTML>'
	newWind=window.open("","window","HEIGHT="+high+",WIDTH="+wide+",scrollbars=0,resizable=0,toolbar=0,menubar=0,location=0,directories=0,status=0,top="+hCenter+",left="+wCenter);
	newWind.document.write(output);
	newWind.document.close;
	newWind.focus();	
}

