function StartAudio(AutoPlay) {

	var so = new SWFObject("_swf/MusicFLVPlayer.swf?0.9.2", "Video", "271", "359", "8", "#404040");
	so.addParam("allowScriptAccess", "sameDomain");
	so.addParam("quality", "high");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "transparent");
	so.addParam("menu", "false");
	so.addParam("loop", "false");
	so.addVariable("XMLLoc", "_uploads/mp3.xml");
	so.addVariable("AutoStart", AutoPlay);
	so.addVariable("WebRoot", "http://www.daddyyankee.com/");

	so.write("music_player");
}

function StartHighlights() {

	var so = new SWFObject("_swf/Highlights.swf?0.9", "Video", "641", "360", "8", "#404040");
	so.addParam("allowScriptAccess", "sameDomain");
	so.addParam("quality", "high");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "transparent");
	so.addParam("menu", "false");
	so.addParam("loop", "false");
	so.addVariable("XMLLoc", "_uploads/Featured.xml");
	so.addVariable("WebRoot", "http://www.daddyyankee.com/");

	so.write("flash_content");
}

function StartVideo(inVideo, inVideoThumb) {

	var so = new SWFObject("_swf/VideoPlayer.swf?0.9", "Video", "641", "360", "8", "#404040");
	so.addParam("allowScriptAccess", "sameDomain");
	so.addParam("quality", "high");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "transparent");
	so.addParam("menu", "false");
	so.addParam("loop", "false");
	so.addVariable("XMLLoc", "_uploads/Featured.xml");
	so.addVariable("WebRoot", "http://www.daddyyankee.com/");
	so.addVariable("VideoName", inVideo);
	so.addVariable("VideoThumb", inVideoThumb);

	so.write("flash_content");
}

function OpenPopoutPlayer(inXMLLoc) {
	OpenSized("StandAlonePlayer.php", 271, 360);
}
//************************************
// openSized window
function OpenSized(in_uri,theWidth,theHeight) {
	var theTop = 0;
	var theLeft = 0;
	var theBars = 0;
	if (theWidth > screen.width || theHeight > screen.height) {
		theBars = 1;
		theWidth += 22;
		if ((theWidth + 30) > screen.width) {
			theWidth = screen.width - 30;
		} else {
			theLeft=(screen.width/2)-(theWidth/2);
			theWidth += 15;
		}
		if ((theHeight + 30 ) > screen.height) {
			theHeight = screen.height - 30;
		} else {
			theTop=((screen.height/2)-(theHeight/2))/2;
		}
	} else {
		theTop=((screen.height/2)-(theHeight/2))/2;
		theLeft=(screen.width/2)-(theWidth/2);
	}
	var features='height=' + theHeight + ',width=' + theWidth + ',top='+theTop+',left='+theLeft+',toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=1';
	window.open(in_uri,"StandAlonePlayer",features);

}
//************************************
// SetDefaultValue
function SetDefaultValue(inID, inValue) {
	$(inID).addEvent("focus", function() {
		if($(inID).value == inValue) {
			$(inID).value = "";
		}
	});
	$(inID).addEvent("blur", function() {
		if($(inID).value == "") {
			$(inID).value = inValue;
		}
	});
}