 /* SHOWS YOUTUBE MOVIE IN POPUP WINDOW */
var imgWin = null;

function popYouTube(MediaItem, wd, ht){
	if (!imgWin) {
	// default width and height
	var wd = 520; 
	var ht = 400;
	var params = 'width=' + wd + ',height=' + ht + ', left=';
	params += (screen.width  - wd)/2;
	params += ', top=150,location=no,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=no';
		imgWin = window.open('','movie',params);
		with (imgWin.document){
			writeln('<html><head><\/head><body onbeforeunload="javascript:opener.imgWin = null;" style=" background-color: #c8c8c8;">');
			writeln('<div style="width: 490px; height320px; border: 1px solid #ffffff; padding:1px;"> <object width="480" height="295">');
			writeln('<param name="movie" value="http:\/\/www.youtube.com\/' + MediaItem + '"' + '></param>');
			writeln('<param name="allowFullScreen" value="true"><\/param>');
			writeln('<param name="allowscriptaccess" value="always"><\/param>');
			writeln('<embed src="http:\/\/www.youtube.com\/' + MediaItem + '"' + 'type="application\/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295">');
			writeln('<\/embed><\/object><\/div>');
			writeln('<p \/>');
			writeln('<form>');
			writeln('<div style="text-align: right; background-color: #c8c8c8;"><input type="button" value="Close Window" onClick="opener.imgWin = null;window.close();"><\/div>');
			writeln('<\/form>');
			writeln('<\/body><\/html>');
		}
	} else {
		imgWin.focus();
	}
}

var helpWin = null;
function helpWin() {
	if (!helpWin) {
		var width = 900;
		var params = 'width=' + width + ',height=850, left=';
		params += (screen.width  - width)/2;
		params += ', top=150,location=no,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=no';
	
		helpWin = window.open('help.html','help',params);

	} else {
		helpWin.focus();
	}
}

var contactsWin = null;

function contactListWin() {
	if (!contactsWin) {
		var width = 696;
		var params = 'width=' + width + ',height=850, left=';
		params += (screen.width  - width)/2;
		params += ', top=150,location=no,toolbar=no,menubar=yes,status=no,scrollbars=yes,resizable=no,location=no';
		contactsWin = window.open('member_details.html','member_details', params);

	} else {
		contactsWin.focus();
	}
}
var reportwin = null;
function popwin(thisURL, ht,wd) {
	if (!reportwin) {
		if(arguments.length < 2){
			var ht = 620;
			var wd= 1000;
			}
		var params = 'width=' + wd + ',height=' + ht + ', left=';
		params += (screen.width  - wd)/2;
		params += ', top=150,location=no,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=yes';
	
		reportwin = window.open('','reportwin',params);
		with (reportwin.document){
			writeln('<html xmlns="http:\/\/www.w3.org\/1999\/xhtml" xml:lang="en" lang="en">');
			writeln('<head><title>Staines Cin&#233; &amp; Video Society - Report<\/title>');
			writeln('<link rel=stylesheet type="text\/css" href="style\/SCVS.css" \/>');
			writeln('<link rel=stylesheet type="text\/css" href="style\/masthead.css" \/>');
			writeln('<script language="JavaScript" src="js\/SCVS.js"><\/script>');
			writeln('<\/head><body>');
			writeln('<div class="masthead_wrapper"><div class="masthead_top_left"><\/div>');
			writeln('<div class="masthead_top_right"><\/div><div class="registered_top_left"><\/div>');
			writeln('<div class="registered_top_right"><\/div><div class="masthead_bottom"><\/div>');
			writeln('<img class="rightmast_img" alt="Staines Cin&#233; &amp; Video Society Logo" src="images\/logo\/clearlogo.gif"\/>');
			writeln('<img class="leftmast_img" alt="Staines Cin&#233; & Video Society Logo" src="images\/logo\/clearlogo.gif"\/>');
			writeln('<div class="masthead_title">Staines Cin&#233; &amp; Video Society<\/div><\/div><div class="clear"><\/div>');
			writeln('<div class="reportWinWrapper">');
			writeln('<div style="position: absolute; bottom : 50px; left: 650px;"><input type="button" value="Close Window" onClick="opener.reportwin = null;window.close();"><\/div>');
			writeln('<\/div><\/body><\/html>');
		}
	} else {
		reportwin.focus();
	}
}
function showMovie(MovieItem, wd, ht, movW, movH){
	if (!imgWin) {
		// default width and height movW= 400, movH=324
		//if(!) {wd = 500; ht = 380;}
		var params = 'width=' + wd + ',height=' + ht + ', left=';
		params += (screen.width  - wd)/2;
		params += ', top=150,location=no,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=no';
		imgWin = window.open('','movie',params);
		with (imgWin.document){
			writeln('<html><head><script language="javascript">AC_FL_RunContent = 0;<\/script><script src="AC_RunActiveContent.js" language="javascript"><\/script><\/head><body onbeforeunload="javascript:opener.imgWin = null;" style=" background-color: #c8c8c8;">');
			writeln('<div style="width: 490px; height320px; border: 1px solid #ffffff; padding:1px;"> <object width="480" height="295">');
			writeln('<script language="javascript">');
			writeln('if (AC_FL_RunContent == 0) {');
			writeln('alert("This page requires AC_RunActiveContent.js.");');
			writeln('} else {');
			writeln("AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '" + movW + "', 'height', '" + movH + "', 'src', 'well house', 'quality', 'high', 'pluginspage', 'http:\/\/www.macromedia.com\/go\/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'well house', 'bgcolor', '#ffffff', 'name', 'well house', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'well house', 'salign', ''); \/\/end AC code}<\/script>");
			writeln('<noscript><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=9,0,0,0" width="' + movW + '" height="' + movH + '" id="movie" align="middle">');
			writeln('<param name="allowScriptAccess" value="sameDomain" \/>');
			writeln('<param name="allowFullScreen" value="false" \/>');
			writeln('<param name="movie" value="' + MovieItem + '.swf" \/><param name="quality" value="high" \/><param name="bgcolor" value="#ffffff"\ /><embed src="' + MovieItem + '.swf" quality="high" bgcolor="#ffffff" width="' + movW + '" height="' + movH + '" name="movie" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application\/x-shockwave-flash" pluginspage="http:\/\/www.macromedia.com\/go\/getflashplayer" \/>');
			writeln('<\/object><\/noscript>');
			writeln('<p \/>');
			writeln('<form>');
			writeln('<div style="text-align: right; background-color: #c8c8c8;"><input type="button" value="Close Window" onClick="opener.imgWin = null;window.close();"><\/div>');
			writeln('<\/form>');
			writeln('<\/body><\/html>');
		}
	} else {
		imgWin.focus();
	}
}



