function fetch(){
var xmlHttpReq = false;
var self = this;
var txt=encodeURI(document.getElementById("per").value);
var WriteURI = 'fetch.php?action=search&text='+txt;
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', WriteURI, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.send('');
//document.getElementById("txt").innerHTML = "<img src=\"images/wait.gif\">";
document.getElementById("txt").innerHTML = "Checking...";
self.xmlHttpReq.onreadystatechange = handleResponse;
return false;
}
function fixit(){
var xmlHttpReq = false;
var self = this;
var txt=encodeURI(document.getElementById("per").value);
var niil=encodeURI(document.getElementById("upnl").value);
var WriteURI = 'fetch.php?action=register&url99i5='+niil+'&sub='+txt;
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', WriteURI, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.send('');
document.getElementById("fir").innerHTML = "<table width=\"680\" height=\"120\" cellspacing=\"2\" align=center bgcolor=\"#FFFFFF\" style=\"border: #66CC00 2px solid;\"><TR><TD width=100% valign=top colspan=2 align=center style=\"padding-top:10px;\">Please wait while making your short domain</TD></TR><TR height=\"88\"><TD width=100% colspan=2 align=center><BR><img src=\"images/wait.gif\"><BR><BR></TD></TR></Table>";
self.xmlHttpReq.onreadystatechange = handleResponse1;
return false;
}
function handleResponse1() {
if(xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200){
var response = xmlHttpReq.responseText;
if(response) {
document.getElementById("fir").innerHTML = response;
}
}
}

function handleResponse() {
if(xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200){
var response = xmlHttpReq.responseText;
if(response) {
document.getElementById("txt").innerHTML = response;
}
}
}


