function clear_this(f){
	f.value="";
}

function toggleEdit(){
	if(document.getElementById('edit').style.display=='none' || document.getElementById('edit').style.display=='')
		document.getElementById('edit').style.display="block";
	else
		document.getElementById('edit').style.display="none";
}

var http=createRequestObject();

function createRequestObject(){
	var request_o; //declare the variable to hold the object.
	var browser = navigator.appName; //find the browser name
	if(browser == "Microsoft Internet Explorer"){
		/* Create the object using MSIE's method */
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		/* Create the object using other browser's method */
		request_o = new XMLHttpRequest();
	}
	return request_o; //return the object
}

function vote(val, vid){
	http.open('get', 'http://video.gotgame.com/index.php/video/vote/'+val+'/'+vid);
	http.onreadystatechange = handleVote;
	http.send(null);
}

function handleVote(){
	if(http.readyState == 4){
		if(parseInt(http.responseText)==0){
			document.getElementById("notgame").innerHTML=parseInt(document.getElementById("notgame").innerHTML)+1;
			alert("Thanks for voting.");
		}
		else if (parseInt(http.responseText)==1){
			document.getElementById("gotgame").innerHTML=parseInt(document.getElementById("gotgame").innerHTML)+1;
			alert("Thanks for voting!");
		}
		else{
			alert("Hey, Florida.  Go back to 2000.  You only get one vote on this ballot.");
		}
	}
}

function search_this(f){
	f.action='http://video.gotgame.com/index.php/filter/search/'+f.s.value;
}
loadjscssfile("http://redir.adap.tv/redir/javascript/adaptvAdPlayer.js", "js");


