function openwindow(url,w,h){
	var winwidth = screen.availWidth;
	var winheight = screen.availHeight;
	var leftt=Math.floor((winwidth/2)-(w/2));
	var topt=Math.floor((winheight/2)-(h/2));
	window.open(url,'popup','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};


function GetXmlHttpObject(){
	var xmlHttp=null;
	try{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}catch (e){
		// Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  		}catch (e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
 	}
	return xmlHttp;
}

function request(params){
	var xmlHttp;
	xmlHttp=GetXmlHttpObject();
	xmlHttp.open("GET",params,false);
	xmlHttp.send(null);
	return xmlHttp.responseText;
}

function playVideo(video){
	document.getElementById('video_wrapper').innerHTML = "<object type='application/x-shockwave-flash' data='/f/media/FLVPlayer_Progressive.swf' width='980' height='336' id='flashmovie'><param name='movie' value='/f/media/FLVPlayer_Progressive.swf' /><param name='allowScriptAcess' value='sameDomain' /><param name='quality' value='best' /><param name='bgcolor' value='#ffffff' /><param name='scale' value='noScale' /><param name='salign' value='TL' /><param name='wmode' value='transparent' /><param name='FlashVars' value='&MM_ComponentVersion=1&skinName=/f/media/Corona_Skin_2&streamName=/f/media/"+video+"&autoPlay=true&autoRewind=false' /></object>";
}
function postToHome(video)
{
	var myform=document.createElement("form");
	myform.style.display='none';
	myform.setAttribute('action','/');
	myform.setAttribute('method','post');
	var myinput=document.createElement("input");
	myinput.setAttribute('type','text');
	myinput.setAttribute('name','video');
	myinput.setAttribute('value',video);
	myform.appendChild(myinput);
	document.body.appendChild(myform);
	myform.submit();
}