function newsletter(a) {
document.getElementById("newsletter").innerHTML="signing up moment ..";	
var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("POST","/newsletter.php",true,handlenewsletter,data);	
return true;
}

function handlenewsletter() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("newsletter").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}

function showHelp(a) {
document.getElementById("help").innerHTML="loading help item number .. " + a;	
//encode post values
// var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("GET","/help.php?id=" + a,true,handlehelp);	
return true;	
}

function handlehelp() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("help").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}


function getDetails(a) {
document.getElementById("content").innerHTML="loading domain id .. " + a;	
//encode post values
// var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("GET","/details.php?id=" + a,true,handledetails);	
return true;
}

function handledetails() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}

function showbid(a) {
document.getElementById("content2").innerHTML="loading domain id .. " + a;	
//encode post values
// var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("GET","/makeanoffer.php?id=" + a,true,handleshowbid);	
return true;
}

function handleshowbid() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content2").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}


function bid(a) {
var emailaddress = a.elements["email"].value;
var name = a.elements["name"].value;
var id = a.elements["id"].value;
var todo = a.elements["do"].value;
var ammount = a.elements["ammount"].value;
document.getElementById("content2").innerHTML="loading domain id .. ";
// encode post values
// var data = encodePOST(a);
var data = "do="+todo+"&email="+emailaddress+"&id="+id+"&ammount="+ammount+"&name="+name;
// all forms handled now post the request	
httpRequest("POST","/makeanoffer.php",true,handlebid,data);	
return true;
}

function handlebid() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content2").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}

function viewbid(a) {
document.getElementById("content").innerHTML="loading domain id .. " + a;	
//encode post values
// var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("GET","/viewbid.php?id=" + a,true,handleviewbid);	
return true;
}

function handleviewbid() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}

function delbid(a) {
document.getElementById("content").innerHTML="deletin bid(s) .. ";	
//encode post values
var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("POST","/viewbid.php",true,handledelbid,data);	
return true;
}

function handledelbid() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}


function contact(a) {
document.getElementById("content").innerHTML="submitting contact form .. ";	
//encode post values
var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("POST","/contactus.php",true,handlecontact,data);	
return true;
}

function handlecontact() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}

function signup(a) {
document.getElementById("error").innerHTML="submitting signup form .. ";	
//encode post values
var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("POST","/signup.php",true,handlesignup,data);	
return true;
}

function handlesignup() {
var regexp1 = /ERROR:/g;	
	if (request.readyState == 4) {
		if (request.status == 200) {
        if (request.responseText.match(regexp1)) {
			  document.getElementById("error").innerHTML=request.responseText;
		    } else {
			  document.getElementById("rightbody").innerHTML=request.responseText;
        }
		  } else {
		  alert("problem with page returned " + request.status);
		}
	}
}


function adddomains(a) {
document.getElementById("error").innerHTML="submitting domains form .. ";	
//encode post values
var data = encodePOST(a);
// all forms handled now post the request	
httpRequest("POST","/adddomain.php",true,handleadddomains,data);	
return true;
}

function handleadddomains() {
var regexp1 = /ERROR:/g;	
	if (request.readyState == 4) {
		if (request.status == 200) {
        if (request.responseText.match(regexp1)) {
			  document.getElementById("error").innerHTML=request.responseText;
		    } else {
			  document.getElementById("rightbody").innerHTML=request.responseText;
        }
		  } else {
		  alert("problem with page returned " + request.status);
		}
	}
}



function actionbid(a) {
document.getElementById("content").innerHTML="submitting form .. ";	
// all forms handled now post the request
httpRequest("GET","/actionbid.php?" + a,true,handleactionbid);	
return true;
}

function handleactionbid() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}


function actionbidform(a) {
var todo = a.elements["do"].value;
var action = a.elements["action"].value;
var id = a.elements["id"].value;
var message = a.elements["message"].value;

document.getElementById("content").innerHTML="submitting form .. ";	
//encode post values
var data = "do="+todo+"&action="+action+"&id="+id+"&message="+message;
// all forms handled now post the request	
httpRequest("POST","/actionbid.php",true,handleactionbidform,data);	
return true;
}

function handleactionbidform() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			document.getElementById("content").innerHTML=request.responseText;
      } else {
		  alert("problem with page returned " + request.status);
	 			}
	 }
}
