function getFullScreenWindowParams() {
		return 'menubar=no'
		+ ',toolbar=no'
		+ ',width=' + screen.availWidth
		+ ',height=' + screen.availHeight
		+ ',outerWidth=' + screen.availWidth
		+ ',outerHeight=' + screen.availHeight
		+ ',left=0'
		+ ',top=0'
		+ ',status=no,'
		+ ',resizable=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(
				'http://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='http://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 wm_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='http://www.w3.org/1999/xhtml'><head>\
	<title></title>\
	</head><body style='padding:0px;margin:0px;'>\
	<div style='text-align:center'>\
		<embed src='"+url+"' width='"+ screen.availWidth*.98+"' height='"+screen.availHeight*.95+"' scale='tofit' autoplay='true' type='video/x-mplayer2' controller='true' />\
			</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='http://www.w3.org/1999/xhtml'><head>\
	<title></title>\
	</head><body style='padding:0px;margin:0px;'>\
	<div style='text-align:center'>\
		<embed src='"+url+"' width='"+ screen.availWidth*.98+"' height='"+screen.availHeight*.95+"' scale='tofit' autoplay='true' type='video/quicktime' controller='true' />\
	</div></body></html>")
	w.document.title = window.document.title +  ' - Full Screen Video';
	w.focus();
}

function gv_switchOn(turnOn, turnOff){
	document.getElementById(turnOn).style.display = 'block';
	document.getElementById(turnOff).style.display = 'none';
}
