var additionalVals="";

function launchVideo(clipy, format, speed, type){

	

if(!type){
	type = 'v';
}	
	
	
clipyNew = clipy

clipy = clipyNew

formatNew = format

format = formatNew

speedNew = speed

speed = speedNew

typeNew = type

type = typeNew

if (format == ''){
	sUrl = "/mediaPlayer/mediaPlayer.php"
	eval("videoPopUp=window.open('" + sUrl + "?id=" + clipy + "&format=','videoplayer','width=400,height=575,scrollbars=no,resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no')");
	return;
}else{
if(format == 'WIN')
	if(getCookie("WindwsMediaCook")=='1')
		sUrl = "/mediaPlayer/winPlayer.php"
	else 
		sUrl = "/mediaPlayer/checkWin.html"

if(format == 'REAL')
	if(getCookie("RealCook")=='1')
		sUrl = "/mediaPlayer/realPlayer.php"
	else 
		sUrl = "/mediaPlayer/checkReal.html"
		
if(format == 'QT')
		sUrl = "/mediaPlayer/checkQT.php"
		
if(format == 'FLV')
		sUrl = "/mediaPlayer/flashPlayer.php"
}

/*
alert("videoPopUp=window.open('" + sUrl + "?id=" + clipy + "&format=" + format + "&speed=" + speed + "&type=" + type + additionalVals + "','videoplayer','width=400,height=575,scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no')");
*/	

eval("videoPopUp=window.open('" + sUrl + "?id=" + clipy + "&format=" + format + "&speed=" + speed + "&type=" + type + additionalVals + "','videoplayer','width=400,height=575,scrollbars=no,resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no')");
}


function getCookie(cookieId)
{
if (document.cookie.length < 1) { return null; }

begin = document.cookie.indexOf(cookieId+"="); 
if(begin == -1) { return null; }

begin += cookieId.length+1; 
end = document.cookie.indexOf(";", begin);

if (end == -1) { return unescape(document.cookie.substring(begin)); }

return unescape(document.cookie.substring(begin, end));
}