var xmlHttp

function goPost(module,section,data,divid,method)
{
      xmlHttp = false;

xmlHttp=GetXmlHttpObject()
if (xmlHttp.overrideMimeType) { 
xmlHttp.overrideMimeType('text/xml; charset=utf-8'); 
} 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
	var url="page.php"
	url=url+"?section="+module
	url=url+"&opt="+section
	url=url+"&howto="+method

if(module == "news"){
	var parameters = "user_nik=" + escape(document.getElementById("user_nik").value ) +
			"&user_cmt=" + escape(document.getElementById("user_cmt").value ) +
			"&story=" + escape(document.getElementById("story").value );
}

if(section == "validCom"){
	var parameters = "user_nik=" + escape(document.getElementById("user_nik").value ) +
			"&user_cmt=" + escape(document.getElementById("user_cmt").value ) +
			"&profile=" + escape(document.getElementById("profile").value );
}

	if(section == "login"){
	var parameters = "aemail=" + escape(document.getElementById("aemail").value ) +
			"&tablex=" + escape(document.getElementById("tablex").value ) +
			"&apassword=" + escape(document.getElementById("apassword").value );
	}

	if(section == "downloadSearch"){
	var parameters = "search=" + escape(document.getElementById("search").value );
	}

	if(section == "tranPoints"){
	var parameters = "servcc=" + escape(document.getElementById("servcc").value );
	}

	if(section == "tranPStep2"){
	var parameters = "servcc=" + escape(document.getElementById("servcc").value ) +
			"&ROALogin=" + escape(document.getElementById("ROALogin").value );
	}
	if(section == "TransferFinish"){
	var parameters = "servcc=" + escape(document.getElementById("servcc").value ) +
			"&yPoints=" + escape(document.getElementById("yPoints").value ) +
			"&ROALogin=" + escape(document.getElementById("ROALogin").value );
	}

	if(section == "validPass"){
	var parameters = "aemail=" + escape(document.getElementById("aemail").value ) +
			"&alogin=" + escape(document.getElementById("alogin").value ) +
			"&apassword=" + escape(document.getElementById("apassword").value ) +
			"&newPass=" + escape(document.getElementById("newPass").value ) +
			"&secAnswer=" + escape(document.getElementById("secAnswer").value ) +
			"&confirmPass=" + escape(document.getElementById("confirmPass").value );
	}

	if(section == "valMailUpd"){
	var parameters = "actualMail=" + escape(document.getElementById("actualMail").value ) +
			"&secLogin=" + escape(document.getElementById("secLogin").value ) +
			"&actualPass=" + escape(document.getElementById("actualPass").value ) +
			"&newMail=" + escape(document.getElementById("newMail").value ) +
			"&secAnswer=" + escape(document.getElementById("secAnswer").value ) +
			"&accid=" + escape(document.getElementById("accid").value ) +
			"&confMail=" + escape(document.getElementById("confMail").value );
	}

	if(section == "valPasRO"){
	var parameters = "actualMail=" + escape(document.getElementById("actualMail").value ) +
			"&secLogin=" + escape(document.getElementById("secLogin").value ) +
			"&actualPass=" + escape(document.getElementById("actualPass").value ) +
			"&newPass=" + escape(document.getElementById("newPass").value ) +
			"&secAnswer=" + escape(document.getElementById("secAnswer").value ) +
			"&accid=" + escape(document.getElementById("accid").value ) +
			"&confPass=" + escape(document.getElementById("confPass").value );
	}

	if(section == "validAccount"){
	var parameters = "email=" + escape(document.getElementById("email").value ) +
			"&idlogin=" + escape(document.getElementById("idlogin").value ) +
			"&sex=" + escape(document.getElementById("sex").value ) +
			"&GoRegRO=" + escape(document.getElementById("GoRegRO").value ) +
			"&password=" + escape(document.getElementById("password").value ) +
			"&confpass=" + escape(document.getElementById("confpass").value ) +
			"&question=" + escape(document.getElementById("question").value ) +
			"&birth_day=" + escape(document.getElementById("birth_day").value ) +
			"&birth_month=" + escape(document.getElementById("birth_month").value ) +
			"&birth_year=" + escape(document.getElementById("birth_year").value ) +
			"&answer=" + escape(document.getElementById("answer").value ) +
			"&nick=" + escape(document.getElementById("nick").value );
	}

	if(section == "recValid"){
	var parameters = "yEmail=" + escape(document.getElementById("yEmail").value ) +
			"&yLogin=" + escape(document.getElementById("yLogin").value );
	}
	if(section == "getPass"){
	var parameters = "yEmail=" + escape(document.getElementById("yEmail").value ) +
			"&secQuestion=" + escape(document.getElementById("secQuestion").value ) +
			"&yLogin=" + escape(document.getElementById("yLogin").value );
	}
	
	if(section == "SavAccount"){
	var parameters = "LoginID=" + escape(document.getElementById("LoginID").value ) +
			"&PasswID=" + escape(document.getElementById("PasswID").value ) +
			"&EmailID=" + escape(document.getElementById("EmailID").value );
	}
	
	if(section == "cheknSaveROA"){
	var parameters = "&idlogin=" + escape(document.getElementById("idlogin").value ) +
			"&sex=" + escape(document.getElementById("sex").value ) +
			"&password=" + escape(document.getElementById("password").value ) +
			"&confpass=" + escape(document.getElementById("confpass").value );
	}
	
	if(section == "zendMail"){
	var parameters = "fName=" + escape(document.getElementById("fName").value ) +
			"&lName=" + escape(document.getElementById("lName").value ) +
			"&yMail=" + escape(document.getElementById("yMail").value ) +
			"&zCode=" + escape(document.getElementById("zCode").value ) +
			"&yGender=" + escape(document.getElementById("yGender").value ) +
			"&yReason=" + escape(document.getElementById("yReason").value ) +
			"&yMessage=" + escape(document.getElementById("yMessage").value );
	}

	if(section == "RoNameSave"){
	var parameters = "newName=" + escape(document.getElementById("newName").value ) +
			"&chid=" + escape(document.getElementById("chid").value ) +
			"&accid=" + escape(document.getElementById("accid").value ) +
			"&secAnswer=" + escape(document.getElementById("secAnswer").value );
	}

	if(section == "validEdit"){
	var parameters = "displayName=" + escape(document.getElementById("displayName").value ) +
			"&userGender=" + escape(document.getElementById("userGender").value ) +
			"&yourSite=" + escape(document.getElementById("yourSite").value ) +
			"&Occupation=" + escape(document.getElementById("Occupation").value ) +
			"&userLang=" + escape(document.getElementById("userLang").value ) +
			"&userLocation=" + escape(document.getElementById("userLocation").value ) +
			"&userCountry=" + escape(document.getElementById("userCountry").value ) +
			"&yourSign=" + escape(document.getElementById("yourSign").value ) +
			"&dispAge=" + escape(document.getElementById("dispAge").value ) +
			"&yourMSN=" + escape(document.getElementById("yourMSN").value ) +
			"&yourYahoo=" + escape(document.getElementById("yourYahoo").value ) +
			"&yourICQ=" + escape(document.getElementById("yourICQ").value ) +
			"&yourAIM=" + escape(document.getElementById("yourAIM").value ) +
			"&realName=" + escape(document.getElementById("realName").value );
	}
	
	if(section == "saveROStuff"){
	var parameters = "show_details=" + escape(document.getElementById("show_details").value ) +
			"&show_build=" + escape(document.getElementById("show_build").value ) +
			"&show_hpsp=" + escape(document.getElementById("show_hpsp").value ) +
			"&show_lastm=" + escape(document.getElementById("show_lastm").value ) +
			"&show_respm=" + escape(document.getElementById("show_respm").value ) +
			"&show_guild=" + escape(document.getElementById("show_guild").value ) +
			"&show_partner=" + escape(document.getElementById("show_partner").value ) +
			"&show_party=" + escape(document.getElementById("show_party").value );
	}
	
	if(section == "addVote"){
	var parameters = "opid=" + escape(document.getElementById("opid").value ) +
			"&sid=" + escape(document.getElementById("sid").value );
	}
	
	if(section == "checkStep1"){
	var parameters = "toTransfer=" + escape(document.getElementById("toTransfer").value ) +
			"&accid=" + escape(document.getElementById("accid").value ) +
			"&chaid=" + escape(document.getElementById("chaid").value );
	}
	
	if(section == "admLogin"){
	var parameters = "adLogin=" + escape(document.getElementById("adLogin").value ) +
			"&adMail=" + escape(document.getElementById("adMail").value ) +
			"&adPass=" + escape(document.getElementById("adPass").value );
	}
	
	if(section == "selectAvatar"){
	var parameters = "gallery=" + data;
	}

if(section == "zendMail"){
var loadimg ='<div align="center"><img src="images/loadingBig.gif" width="200" height="200"></div>';
var loadtxt1 ='<div align="center"><img src="images/loadingBig1.gif" width="200" height="200"></div>';
var loadtxt2 ='<div align="center"><img src="images/loadingBig2.gif" width="200" height="200"></div>';
}else{
var loadimg ='<div align="center"><img src="images/loading.gif" width="32" height="32"></div>';
var loadtxt1 ='<div align="center"><img src="images/loading.gif" width="32" height="32"></div>';
var loadtxt2 ='<div align="center"><img src="images/loading.gif" width="32" height="32"></div>';
}

 document.getElementById(divid).innerHTML=loadimg;
xmlHttp.onreadystatechange = function () {
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 document.getElementById(divid).innerHTML=xmlHttp.responseText
 }else if(xmlHttp.readyState==1){
 document.getElementById(divid).innerHTML=loadimg;
 }else if(xmlHttp.readyState==2){
 document.getElementById(divid).innerHTML=loadtxt2;
 }else if(xmlHttp.readyState==3){
 document.getElementById(divid).innerHTML=loadtxt1;
 }else{
 document.getElementById(divid).innerHTML=loadtxt2;
 }
}

xmlHttp.open("POST",url,true)
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", parameters.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(parameters)

}
