var videoWindow;
function showMovie(movie)
{
if(videoWindow)
videoWindow.close();

var videoWindow = window.open('', 'video', 'width=640, height=504');
    videoWindow.opener.movie = movie;
videoWindow.document.write('<html><head>');
videoWindow.document.write('<title>');
videoWindow.document.write('Mill Valley Hotels | Acqua Hotel | Marin County Boutique Hotels');
videoWindow.document.write('</title>');

var js = '<script type="text/javascript">' +
				'var flashObj;' +
				'function init()' +
				'{' +
					'if(navigator.appName.indexOf("Microsoft") != -1)' +
					'{' +
						'flashObj = document.getElementById("videoplayer");' +
					'}' +
					'else' +
					'{' +
						'flashObj = this.document.videoplayer;' +
					'}' +

				'}' +
				'function getMovie(movie, isVideo, mp3Text)' +
				'{' +
					'if(!isVideo && !mp3Text)' +
						'flashObj.playNext(movie, true, "");' +
					'else ' +
						'flashObj.playNext(movie, isVideo, mp3Text);' +
				'}' +
				'function playMovie()' +
				'{' +
					'init();' +
					'setTimeout("getMovie(this.opener.movie)", 500);' +

				'}' +
			'<\/script>';

videoWindow.document.write(js);
videoWindow.document.write('</head><body style="margin:0px;" onload="playMovie()">');

var html = '<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="640" height="504" id="videoplayer" align="middle">' +
		'<param name="allowScriptAccess" value="sameDomain" />' +
		'<param name="allowFullScreen" value="true" />' +
		'<param name="movie" value="/flash/videoplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />' +
		'<embed src="/flash/videoplayer.swf" quality="high" bgcolor="#000000" width="640" height="504" name="videoplayer"' +
		'align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
		'</object>';

videoWindow.document.write(html);
videoWindow.document.write('</body></html>');
videoWindow.document.close();
videoWindow.focus();
}


