function openvideo(url,wid,hei,nomail,mbsid){ 
	
	scWidthCenter = screen.availWidth / 2; 
	scHeightCenter = screen.availHeight / 2; 
	if (!nomail) hei = hei + 30; 
	wOption = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=" + wid + ",height=" + hei + ",left=" + (scWidthCenter - (wid / 2)) + ",top=" + (scHeightCenter - (hei / 2));
 	window.open('http://eas3.emediate.se/eas?cu=2998&ty=ct&EASTmbsid='+mbsid+'&EASLink=http://streamer.webtvlite.fi/video/'+url ,"video",wOption);
}


function sendvideo(url){
	
	scWidthCenter = screen.availWidth / 2;
	scHeightCenter = screen.availHeight / 2;
	hei = 290;
	wid = 500;
	wOption = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=" + wid + ",height=" + hei + ",left=" + (scWidthCenter - (wid / 2)) + ",top=" + (scHeightCenter - (hei / 2));
	window.open('http://streamer.webtvlite.fi/sendvideo.php?id='+url,"sendvideo",wOption);
}

function embedvideo(div_id, video_id, wid, hei, snapshottime){ 
	var so = new SWFObject('http://streamer.webtvlite.fi/player.swf','player', wid, hei, '8');
	so.addParam("allowfullscreen","true");
	so.addParam("base","http://streamer.webtvlite.fi");
	
	if (snapshottime)
		snapshottime="@time="+snapshottime;
	else
		snapshottime='';		
		
	so.addParam("flashvars", "config=loadvideo.php?id="+video_id+snapshottime);		
	
	so.addVariable("autostart", "true");
	so.write(div_id);
}