function loadPlayer($video, $userName, $VIDEO_URL, $player, width, height, $autoPlay, $internal){
	var hasPlayer = false;
    var $VIDEO_URL = 'videos2.videobloom.com';
	for(var i=0; i<arguments.length; i++){
		
		var temp_str = String(arguments[i]);
		
		var ext_str = temp_str.substr(temp_str.length-3,3);
		
		if(ext_str == "swf"){
			hasPlayer = true;
			break;
		}
	
	}
	
	var pos = $VIDEO_URL.indexOf("http");
	if(pos == -1){
		$VIDEO_URL = 'http://' + $VIDEO_URL;
	}

	if(hasPlayer == false){  
		var height = width;
		var width = $player;
		
		$player = "player.swf";
		hasPlayer = true;
	}
 	
	document.write('<embed width="'+width+'" height="'+height+'" id="player" src="'+$VIDEO_URL+'/'+$player+'" FlashVars="autoPlay='+$autoPlay+'&autoBuffer=false&description=autohide&videoId='+$video+'&internal='+$internal+'" quality="high" bgcolor="#ffffff" name="player" allowFullScreen="true" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>');
}

function loadPlayer_platform($content_id, $userName, $VIDEO_URL, $player, width, height, $autoPlay, $internal, which){
	var hasPlayer = false;
 
	for(var i=0; i<arguments.length; i++){
	
		var temp_str = String(arguments[i]);
		
		var ext_str = temp_str.substr(temp_str.length-3,3);
		
		if(ext_str == "swf"){
			hasPlayer = true;
			break;
		}
	}
 
	var pos = $VIDEO_URL.indexOf("http");
	if(pos == -1){
		$VIDEO_URL = 'http://' + $VIDEO_URL;
	}
	
	if(hasPlayer == false){  
		var height = width;
		var width = $player;
		
		$player = "container.swf";
		hasPlayer = true;
	}
 	
	if(which == 1){
		document.write('<embed width="'+width+'" height="'+height+'" id="player" src="'+$VIDEO_URL+'/'+$player+'" FlashVars="contentId='+$content_id+'&internal='+$internal+'" wmode="opaque" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>');
	}else{
		var p = document.getElementById('PlayerDiv');
		if(p.hasChildNodes) {
			while (p.firstChild) {
				p.removeChild(p.firstChild);
			}
		} 
		document.getElementById('PlayerDiv').innerHTML = ('<embed width="'+width+'" height="'+height+'" id="player" src="'+$VIDEO_URL+'/'+$player+'" FlashVars="contentId='+$content_id+'&internal='+$internal+'" wmode="opaque" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>');
	}
}

