function doClear(theText)
{
   theText.value = ""
}

function vote()
{
 var VOTER= document.forms.vote_now;
 var obj=VOTER.rating;
 var flag = -1;

 for (var k = 0; k < obj.length; k++)
{
   if (obj[k].checked)
  {
   flag = k;
  }
}

var rate = obj[flag].value;

if (window.XMLHttpRequest)
{ // Mozilla, Safari, ...
  request = new XMLHttpRequest();
}
else if (window.ActiveXObject)
 { // IE
    request = new ActiveXObject("Msxml2.XMLHTTP");
 }

 request.open("GET",'/video/vote.php?rating='+rate+'&video_id='+VOTER.video_id.value);
 request.send(null);

 hideObj("no_vote");
 unhideObj("voted");
 return false;
}



function hideObj(id){
      var obj = document.getElementById(id);
      obj.style.visibility = "hidden";
      obj.style.display = "none";
}
function unhideObj(id){
      var obj = document.getElementById(id);
      obj.style.visibility = "visible";
      obj.style.display = "block";
}


function doSubmit(control, status_text)
{
 if (oneClick == 1)
  {
   oneClick = 0;
   document.getElementById(control).value = status_text;
   //setTimeout('oneClick=1;', 8000);
	//var winl = (screen.width) / 2;
   //var wint = (screen.height) / 2;
	//moveTo(winl,wint);
  	//resizeTo(500,500 );

	}
 return true;


}