// JavaScript Document
var xmlHttp
var tmp
var tmp0
var tmp1

function getTwo(what, where, v){
	tmp00=where
	url00="server2.php?what="+what+"&v="+v
	xmlHttp00=GetXmlHttpObject()
	if (xmlHttp00==null) {
		alert ("Browser does not support HTTP Request")
		return
	}
	 
	xmlHttp00.onreadystatechange=stateChanged00
	xmlHttp00.open("GET",url00,true)
	xmlHttp00.send(null)
}

function fillDat(str0, str1, type) {
	tmp=str0
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="server.php?str0="+str0+"&str1="+str1+"&type="+type
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function Play(tvid, player, url){
	if(player=="nw"){
		window.open(url, 'window')
		//return
	}
	tmp1="maPlayer"
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="server11.php?tvid="+tvid
	xmlHttp.onreadystatechange=stateChanged1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
	
function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById(tmp).innerHTML=xmlHttp.responseText 
	} 
}
function stateChanged00() { 
	if (xmlHttp00.readyState==4 || xmlHttp00.readyState=="complete") {
		document.getElementById(tmp00).innerHTML=xmlHttp00.responseText;
	} 
}
function stateChanged01() { 
	if (xmlHttp01.readyState==4 || xmlHttp01.readyState=="complete") {
		document.getElementById(tmp01).innerHTML=xmlHttp01.responseText;
	} 
}
function stateChanged02() { 
	if (xmlHttp02.readyState==4 || xmlHttp02.readyState=="complete") {
		document.getElementById(tmp02).innerHTML=xmlHttp02.responseText;
	} 
}
function stateChanged1() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		document.getElementById(tmp1).innerHTML=xmlHttp.responseText;
	} 
}


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;
}
