window.onload=showlink()
function tree(ac,it){
	xmlHttp=GetXmlHttpObject()
	url="hotelsubmit.php?stplink=1&action="+ac+"&id="+it+"&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
		document.getElementById("hotel").innerHTML=xmlHttp.responseText
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function tampil(vid,vtp){
	xmlHttp=GetXmlHttpObject()
	url="hotel.php?step=browse&gol="+vid+"&tp="+vtp+"&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
		window.location="?nav=hotel&step=browse&tp="+vtp+"&gol="+vid
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function showlink(){
	xmlHttp=GetXmlHttpObject()
	if(xmlHttp==null){
		document.getElementById("polling").innerHTML="Browser Anda tidak mendukung HTTP Request!";
		return
	}
	url="hotelsubmit.php?stplink=1&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
			document.getElementById("hotel").innerHTML=xmlHttp.responseText
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function mulai(vid,vhal,vidg){
	xmlHttp=GetXmlHttpObject()
	url="hotelp.php?id="+vid+"&hal="+vhal+"&idg="+vidg+"&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
		document.getElementById("form").innerHTML=xmlHttp.responseText
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function mulaivil(vid,vhal,vidg){
	xmlHttp=GetXmlHttpObject()
	url="villap.php?id="+vid+"&hal="+vhal+"&idg="+vidg+"&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
		document.getElementById("form").innerHTML=xmlHttp.responseText
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function bkt1(vid,vhal){
	xmlHttp=GetXmlHttpObject()
	url="hotelp.php?hal="+vhal+"&id="+vid+"&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
		document.getElementById("form").innerHTML=xmlHttp.responseText
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function bktv(vid,vhal){
	xmlHttp=GetXmlHttpObject()
	url="villap.php?hal="+vhal+"&id="+vid+"&sid="+Math.random()
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
		document.getElementById("form").innerHTML=xmlHttp.responseText
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function tkn(id){
	id.style.borderColor="#ff8080"
}
function lpas(id){
	id.style.borderColor="#DDD"
}
function lpasfu(id){
	id.style.borderColor="#654d28"
}

function GetXmlHttpObject(){
	objXMLHttp=null
	if(window.XMLHttpRequest)objXMLHttp=new XMLHttpRequest()
	else if(window.ActiveXObject)objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	return objXMLHttp
}
