function getFullScreenWindowParams() {
		return 'toolbar=no' + ',width=' + screen.availWidth
		+ ',height=' + screen.availHeight
		+ ',status=no,resizable=yes,fullscreen=yes'
		+ ',scrollbars=0';
}

function goFullscreen(videoPath, time, state) {
		var time = 0;
		var timeRegex = new RegExp('&begin=[0-9]+', 'i');
		var newVideoUrl = videoPath.replace(timeRegex, '&begin=' + Math.floor(time * 1000));
		var w = window.open(
				'../../video.google.com/videopopup@q='
				+ prepareSearchParams(newVideoUrl)
				+ '&windowtitle='
				+ prepareSearchParams(window.document.title + ' - Full Screen'),
				'GoogleVideo', getFullScreenWindowParams());
		w.focus();
}

function pp_openWindow(url){
			var w = window.open('','watchFullScreen', getFullScreenWindowParams());
			url = url.replace('&amp','&');
				w.document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml10-strict.dtd'>\
				<html xmlns='../../www.w3.org/1999/xhtml'><head>\
				<title></title></head>\
				<body style='padding:0px;margin:0px;'>\
				<div style='text-align:center'>\
				<object width='"+ screen.availWidth*.98+"' height='"+screen.availHeight*.95+"' type='application/x-shockwave-flash' data='"+url+"&amp;playNow=1'>\
				<param name='movie' value='"+url+"&amp;playNow=1' />\
				<param name='wmode' value='window'/>\
				<param name='scale' value='noScale'/>\
				<param name='salign' value='TL' />\
				</object></div></body></html>")
			w.document.title = window.document.title +  ' - Full Screen Video';
			w.focus();
		}

function qt_openWindow(url){
			var w = window.open('','watchFullScreen', getFullScreenWindowParams());
			url = url.replace('&amp','&');
w.document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml0-strict.dtd'>\
	<html xmlns='../../www.w3.org/1999/xhtml'><head>\
	<title></title>\
	<style type='text/css'>\
	* html object.gv_mov {\
		display: none;\
	}\
	* html object.gv_mov/**/ {\
		display: inline;\
	}\
	* html object.gv_mov {\
		display/**/: none;\
	}\
</style></head><body style='padding:0px;margin:0px;'>\
<div style='text-align:center'>\
<object width='"+ screen.availWidth+"' height='"+screen.availHeight*.95+"' \
classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='../../www.apple.com/qtactivex/qtplugin.cab/default.htm'>\
<param name='src' value='"+url+"'/>\
<param name='autoplay' value='true'/>\
<param name='controller' value='true'/>\
<param name='scale' value='Aspect'/>\
<object type='video/quicktime' data='"+url+"' width='"+ screen.availWidth+"' height='"+screen.availHeight*.95+"' class='gv_mov'>\
<param name='autoplay' value='true'/>\
<param name='controller' value='true'/>\
<param name='scale' value='Aspect'/>\
</object>\
</object>\
</div></body></html>")
			w.document.title = window.document.title +  ' - Full Screen Video';
                        w.focus();
		}
		
		function gv_switchOn(turnOn, turnOff){
			var on = document.getElementById(turnOn);
			var off = document.getElementById(turnOff);
			on.style.display = 'block';
			off.style.display = 'none';
		}