
function writePlayer(id)
{
	var flashObject = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="770" height="630">'
	+ '        <param name="movie" value="mediaPlayer' + id + '.swf?itemid=' + document.getElementById("itemid").value + '&chid=' + document.getElementById("chid").value + '&cid=' + document.getElementById("cid").value + '&lid=' + document.getElementById("lid").value + '&opfl=' + document.getElementById("opflash").value + '&org=' + document.getElementById("orgname").value + '&opFlashUrl=' + document.getElementById("opflashurl").value + '&lcSubdomain=' + document.getElementById("lcsubdomain").value + '&ipAddress=' + document.getElementById("ip").value + '">'
	+ '        <param name="quality" value="high">'
	+ '        <param name="menu" value="false">'
	+ '        <param name="allowFullScreen" value="true" />'
	+ '        <embed src="mediaPlayer' + id + '.swf?itemid=' + document.getElementById("itemid").value + '&chid=' + document.getElementById("chid").value + '&cid=' + document.getElementById("cid").value + '&lid=' + document.getElementById("lid").value + '&opfl=' + document.getElementById("opflash").value + '&org=' + escape(document.getElementById("orgname").value) + '&opFlashUrl=' + document.getElementById("opflashurl").value + '&lcSubdomain=' + document.getElementById("lcsubdomain").value + '&ipAddress=' + document.getElementById("ip").value + '" quality="high" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="630" menu="false"></embed>'
	+ '        </object>'
	//alert(flashObject)
	document.write(flashObject); 
}


var currWidth = 780;
var currHeight = 680;

function skinMode()
{
    var ScreenWidth=window.screen.width;
    var ScreenHeight=window.screen.height;
    var movefromedge=0;
    placementx=(ScreenWidth/2)-((392)/2);
    placementy=(ScreenHeight/2)-((550+50)/2);
	
	window.resizeTo(392,560);
	window.moveTo(placementx, placementy);
}

function fullMode()
{
    var ScreenWidth=window.screen.width;
    var ScreenHeight=window.screen.height;
    var movefromedge=0;
    placementx=(ScreenWidth/2)-((770)/2);
    placementy=(ScreenHeight/2)-((630+50)/2);

	window.resizeTo(780,680);
	window.moveTo(placementx, placementy);
}

function videoMissing()
{
	alert("There has been an error. Please click OK to reset the player and continue viewing");
	document.location = document.location;	
}


function doFullScreen()
{
	//alert(url)
	//document.getElementById("fullScreen").src = "playerBlank.asp?url=" + url;
	window.moveTo(0, 0);
	window.resizeTo(screen.width,screen.height);
	//alert(screen.width + " x " + screen.height)
}

function doPreviousSize()
{
    var ScreenWidth=window.screen.width;
    var ScreenHeight=window.screen.height;
    var movefromedge=0;
    placementx=(ScreenWidth/2)-((770)/2);
    placementy=(ScreenHeight/2)-((630+50)/2);

	//window.moveTo(0, 0);
	window.resizeTo(currWidth,currHeight-10);
	window.moveTo(placementx, placementy);
}

function openPlayer(cid)
{
    var ScreenWidth=window.screen.width;
    var ScreenHeight=window.screen.height;	
    var movefromedge=0;
    placementx=(ScreenWidth/2)-((770)/2);
    placementy=(ScreenHeight/2)-((630+50)/2);
    var PopUpUrl= "http://www.aspireonemedia.com/playerHome.asp?id=" + document.getElementById("mediaid").value + "&chid=" + document.getElementById("chid").value;
	//alert(PopUpUrl)
	window.open(PopUpUrl,"","width=770,height=630,toolbar=0,location=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=0,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+",");
}






function hitBeacon()
{
	document.getElementById("beacon").src = "/images/none.jpg"
}
setInterval("hitBeacon", 300000)