/* 
	Javascript for the player
	Beau Durrant
	
*/

function openPlayer(playlist){
	var height = 660;
	var width = 880;
	var top = parseInt((screen.height - height) / 2, 10);
	var left = parseInt((screen.width - width) / 2, 10);
	var windowFeatures = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left;
	window.open(playlist, 'previewTV', windowFeatures);
}

function sendEmail(url, toemail, toname, videoid, playerid){
	url += '?toEmail='+toemail+'&videoID='+videoid+'&toName='+toname+'&playerID='+playerid;
	new Ajax.Request(url);
}

function postUrl(url){
	new Ajax.Request(url);
}

function downloadUrl(url)
{
	document.location.href = url;
}

/* DEBUG */
function playerCallBack(string){
	alert(string);
}	