
function createQueryString() {
var Etitle   = document.getElementById("Etitle").value;
var Eplace   = document.getElementById("Eplace").value;
var dt       = document.getElementById("dt").value;
var Estart   = document.getElementById("Estart").value;
var Eend     = document.getElementById("Eend").value;
var Eevent   = document.getElementById("Eevent").value;
var Eperson  = document.getElementById("Eperson").value;
var Eemail   = document.getElementById("Eemail").value;
var Eoffer   = document.getElementById("Eoffer").value;
var Admn   = document.getElementById("admn").value;
var Eemaile   = document.getElementById("Eemaile").value;
var Eurl   = document.getElementById("Eurl").value;

var queryString = "Etitle=" + Etitle + "&Eplace=" + Eplace + "&dt=" + dt + "&Estart=" + Estart + 
"&Eend=" + Eend + "&Eevent=" + Eevent + "&Eperson=" + Eperson + "&Eemail=" + Eemail + "&Eoffer=" + Eoffer + "&admn" + Admn 
+ "&Eemaile=" + Eemaile + "&Eurl=" + Eurl ;
return queryString;
}
//////////////////////////////////////////////////////////





////////////////////////////////////////////////////////////////
// BY Bruce
function createRequestObject() {
   var req;
   if(window.XMLHttpRequest){
      req = new XMLHttpRequest();
   } else if(window.ActiveXObject) {
      req = new ActiveXObject("Microsoft.XMLHTTP");
   } else {
      alert('eroro');
   }
   return req;
}

var http = createRequestObject();
function createRequestObject(){
    var request_;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        request_ = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else{
        request_ = new XMLHttpRequest();
    }
    return request_;
}

function getInfo2(){

var V = '';

      http.open('post', 'test.php?ct=addcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

////////////////////////////////////////
///////////////////////////////////////
function addnewlocation(){

var B="" ;
      http.open('post', 'jndex.php?CT=addnewlocation',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewlocations(){

var V=document.getElementById("location").value;
var V2=document.getElementById("location2").value;
var V3=document.getElementById("location3").value;
var B="location=" + V + "&location2=" + V2 + "&location3=" + V3 ;
      http.open('post', 'jndex.php?CT=addnewlocation',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}

function managelocation(){

var V = '';

      http.open('post', 'jndex.php?CT=managelocation',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}


function Editlocation(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=editlocation',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function Editlocation2(B){
 
 var D=document.getElementById("location").value;
 var D2=document.getElementById("location2").value;
 var D3=document.getElementById("location3").value;

var V = "idd=" + B + "&location=" + D + "&location2=" + D2 + "&location3=" + D3;

      http.open('post', 'jndex.php?CT=editlocation',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function deletelocation(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=deletelacotion',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
<!--  the end of manage location section --!>////////////////////////////////////////
///////////////////////////////////////
// area
///////////////////////////////////////
function addnewarea(){

var B="" ;
      http.open('post', 'jndex.php?CT=addnewarea',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewareas(){

var V=document.getElementById("location").value;
var V2=document.getElementById("location2").value;
var V3=document.getElementById("location3").value;
var B="location=" + V + "&location2=" + V2 + "&location3=" + V3 ;
      http.open('post', 'jndex.php?CT=addnewarea',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}

function managearea(){

var V = '';

      http.open('post', 'jndex.php?CT=managearea',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}


function Editarea(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=editarea',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function Editarea2(B){
 
 var D=document.getElementById("location").value;
 var D2=document.getElementById("location2").value;
 var D3=document.getElementById("location3").value;

var V = "idd=" + B + "&location=" + D + "&location2=" + D2 + "&location3=" + D3;

      http.open('post', 'jndex.php?CT=editarea',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function deletearea(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=deletearea',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
<!--  the end of manage location section --!>


////////////////////////////////////////
// fore Poperty Status  
/////////////////////////////////////
function addnewstatus(){

var B="" ;
      http.open('post', 'jndex.php?CT=addnewstatus',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewstatuss(){

var V=document.getElementById("status").value;
var B="status=" + V ;
      http.open('post', 'jndex.php?CT=addnewstatus',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}

function managestatus(){

var V = '';

      http.open('post', 'jndex.php?CT=managestatus',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}


function Editstatus(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=editstatus',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function Editstatus2(B){
 
 var D=document.getElementById("status").value;

var V = "idd=" + B + "&status=" + D;

      http.open('post', 'jndex.php?CT=editstatus',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function deletestatus(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=deletestatus',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
<!--  the end of manage type section --!>


////////////////////////////////////////
// fore Poperty Type 
///////////////////////////////////////
function addnewtype(){

var B="" ;
      http.open('post', 'jndex.php?CT=addnewtype',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewtypes(){

var V=document.getElementById("type").value;
var V2=document.getElementById("type2").value;
var V3=document.getElementById("type3").value;
var B="type=" + V + "&type2=" + V2 + "&type3=" + V3;
      http.open('post', 'jndex.php?CT=addnewtype',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}

function managetype(){

var V = '';

      http.open('post', 'jndex.php?CT=managetype',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}


function Edittype(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=edittype',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function Edittype2(B){
 
 var D=document.getElementById("type").value;
 var D2=document.getElementById("type2").value;
 var D3=document.getElementById("type3").value;

var V = "idd=" + B + "&type=" + D + "&type2=" + D2 + "&type3=" + D3;

      http.open('post', 'jndex.php?CT=edittype',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function deletetype(B){
 

var V = "idd=" + B ;

      http.open('post', 'jndex.php?CT=deletetype',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
<!--  the end of manage Status section --!>



function Managecity(){

var V = '';

      http.open('post', 'test.php?ct=Manegcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function Editcity(B){
 

var V = "cityid=" + B ;

      http.open('post', 'test.php?ct=editcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function Editcity2(B){
 
 var D=document.getElementById("Fcity").value;

var V = "cityid=" + B + "&Fcity=" + D;

      http.open('post', 'test.php?ct=editcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function deletecity(B){
 

var V = "cityid=" + B ;

      http.open('post', 'test.php?ct=deletecity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
///////////////////////////////////////
///////////////////////////////////////
////////////////////////////////////////
///////////////////////////////////////
////////////////////////////////////////
///////////////////////////////////////
function getev(B){

var V = "adm=" + B ;

      http.open('post', 'test.php?ct=addev',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function AddEv(){

var V=document.getElementById("Fcity").value;
var B="Fcity=" + V ;
      http.open('post', 'test.php?ct=addcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function ManageEv(){

var V = '';

      http.open('post', 'test.php?ct=Manegcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function EditEv(B){
 

var V = "cityid=" + B ;

      http.open('post', 'test.php?ct=editcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function EditEv2(B){
 
 var D=document.getElementById("Fcity").value;

var V = "cityid=" + B + "&Fcity=" + D;

      http.open('post', 'test.php?ct=editcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function deleteEv(B){
 

var V = "cityid=" + B ;

      http.open('post', 'test.php?ct=deletecity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
///////////////////////////////////////
///////////////////////////////////////
////////////////////////////////////////
///////////////////////////////////////
function getInfo2(){

var V = '';

      http.open('post', 'test.php?ct=addcity',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function getmsg(){

var V = '';

      http.open('post', 'test.php?ct=addmsg',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function AddMsg(){

var Mtitl = document.getElementById("Mtitl").value;
var Mmsg  = document.getElementById("Mmsg").value;
var Mlang =  document.getElementById("Mlang").value;
var B= "Mtitl=" + Mtitl +  "&Mmsg=" + Mmsg + "&Mlang=" + Mlang ;
      http.open('post', 'test.php?ct=addmsg',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function ManageMsg(){

var V = '';

      http.open('post', 'test.php?ct=managemsg',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function EditMsg(B){
 

var V = "Msgid=" + B ;

      http.open('post', 'test.php?ct=editmsg',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function EditMsg2(B){
 
var Mtitl =  document.getElementById("Mtitl").value;
var Mmsg  =  document.getElementById("Mmsg").value;
var Mlang =  document.getElementById("Mlang").value;
var V="Msgid=" + B + "&Mtitl=" + Mtitl + "&Mmsg=" + Mmsg + "&Mlang=" + Mlang ;

      http.open('post', 'test.php?ct=editmsg',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function DeleteMsg(B){
 

var V = "msgid=" + B ;

      http.open('post', 'test.php?ct=deletemsg',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
///////////////////////////////////////
///////////////////////////////////////
function getInfo3(){

var queryString = createQueryString();

      http.open('post', 'test.php?ct=addev',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(queryString);
}
function handleInfo(){
    if(http.readyState == 1){
        document.getElementById('mydiv').innerHTML = '<br><br><div align="center"><img src="lo.gif"></div><br><br>';
    }
    if(http.readyState == 4){
        var response = http.responseText;
        document.getElementById('mydiv').innerHTML = response;
    }
}
function checkForm2(){
	var A = document.forms[1];
	var err = "";
	var urr = "";

	if (!document.getElementById("Etitle").value){
		err += "\n- Name of the Event.\n";}

	if (!document.getElementById("Eplace").value){
		err += "\n- Place.\n";}

	if (!document.getElementById("dt").value){
		err += "\n- Date.\n";}

	if (!document.getElementById("Estart").value){
		err += "\n- Start Time.\n";}

	if (!document.getElementById("Eend").value){
		err += "\n- End Time.\n";}
	if (!document.getElementById("Eperson").value){
		err += "\n- Contact Name.\n";}
     if (!document.getElementById("Eemail").value){
		err += "\n- Contact Email.\n";}


	if (err){
		urr = "Missing:\n\n";
		urr += err;
		alert(urr);

		} 
		else {
getInfo3();
	}
}

function getInfo(X,D,M,Y,C){
var X;
var D;
var M;
var Y;
var C;

    http.open('post', 'test.php?ct=' + X + '&D=' + D + '&M=' + M + '&Y=' + Y + '&C=' + C);
    http.onreadystatechange = handleInfo;
	http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
    http.send(C);
}
////////////////////////////////////////
///////////////////////////////////////
function addcatclaasified(){

var Ctitle=document.getElementById("Ctitle").value;
var Catdes=document.getElementById("Catdes").value;
var B="Ctitle=" + Ctitle +"&Catdes=" + Catdes +  "&filename=" + filename;
      http.open('post', 'test.php?ct=addcat',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function Managecatclaasified(){

var V = '';

      http.open('post', 'test.php?ct=Manegcat',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function Editcatclaasified(B){
 

var V = "cityid=" + B ;

      http.open('post', 'test.php?ct=editcat',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function Editcatclaasified2(B){
 
 var Ctitle=document.getElementById("Ctitle").value;
var Catdes=document.getElementById("Catdes").value;
var D="Ctitle=" + Ctitle +"&Catdes=" + Catdes + "&Catid=" + B ;

      http.open('post', 'test.php?ct=editcat',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(D);
}
function deletecatclaasified(B){
 

var V = "cityid=" + B ;

      http.open('post', 'test.php?ct=deletecat',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function adcat(){

var V = '';

      http.open('post', 'test.php?ct=addcat',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
///////////////////////////////////////
//////////////////////////////////////
function MyClass()
{
        this.UpdateEditorFormValue = function()
        {
                for ( i = 0; i < parent.frames.length; ++i )
                        if ( parent.frames[i].FCK )
                                parent.frames[i].FCK.UpdateLinkedField();
        }
}
// instantiate the class
var MyObject = new MyClass();

function getunprof(X){

var V = '';

      http.open('get', 'test.php?ct=unprof&dd=' + X,true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

//////////////////////////////////////////////////
/// manage classified
/////////////

function editclassified(X)
{
	var V = '';

      http.open('post', 'test.php?ct=editclassi&dd=' + X,true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function editclassified2(X)
{
var Mtitl =  document.getElementById("Mtitl").value;
var Mmsg  =  document.getElementById("Mmsg").value;
var ctalist =  document.getElementById("ctalist").value;
var V="Msgid=" + X + "&Mtitl=" + Mtitl + "&Mmsg=" + Mmsg + "&ctalist=" + ctalist ;

      http.open('post', 'test.php?ct=editclassi&dd=' + X,true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}










/////////////////////////////////////////////////

////////////////////////////


/////////////////////////////////


///////////////////////////////////////////////////////////////////
function addnewtonform(){


var B="";
      http.open('post', 'jndex.php?CT=addton',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewton(){

var tt=document.getElementById("tt").value;
var tp=document.getElementById("tp").value;
var ph=document.getElementById("ph").value;
var pw=document.getElementById("pw").value;


var B="tt=" + tt + "&tp=" + tp + "&ph=" + ph + "&pw=" + pw ;
      http.open('post', 'jndex.php?CT=addton',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function managetone(){

var V = '';

      http.open('post', 'jndex.php?CT=managetone',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function edittonep(B){
 

var V = "tonid=" + B ;

      http.open('post', 'jndex.php?CT=editton',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function edittonep2(B){
 

var tt=document.getElementById("tt").value;
var tp=document.getElementById("tp").value;
var ph=document.getElementById("ph").value;
var pw=document.getElementById("pw").value;
var D="tt=" + tt +"&tp=" + tp +"&ph=" + ph +"&pw=" + pw + "&tonid=" + B ;

      http.open('post', 'jndex.php?CT=editton',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(D);
}
function deletetonp(B){
 

var V = "tonid=" + B ;

      http.open('post', 'jndex.php?CT=deleteton',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

/////////////////////////////////


///////////////////////////////////////////////////////////////////
function addnewpapertform(){


var B="";
      http.open('post', 'jndex.php?CT=addpapert',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewpapert(){

var pt=document.getElementById("pt").value;
var pw=document.getElementById("pw").value;


var B="pt=" + pt + "&pw=" + pw  ;
      http.open('post', 'jndex.php?CT=addpapert',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function managepapert(){

var V = '';

      http.open('post', 'jndex.php?CT=managepapert',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function editpapert(B){
 

var V = "papertid=" + B ;

      http.open('post', 'jndex.php?CT=editpapert',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function editpapert2(B){
 

var pt=document.getElementById("pt").value;
var pw=document.getElementById("pw").value;
var D="pt=" + pt + "&pw=" + pw + "&papertid=" + B ;

      http.open('post', 'jndex.php?CT=editpapert',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(D);
}
function deletepapert(B){
 

var V = "papertid=" + B ;

      http.open('post', 'jndex.php?CT=deletepapert',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

/////////////////////////////////


///////////////////////////////////////////////////////////////////
function addnewpaptform(){


var B="";
      http.open('post', 'jndex.php?CT=addpapt',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewpapt(){

var pt=document.getElementById("pt").value;
var ps=document.getElementById("ps").value;
var pc=document.getElementById("pc").value;
var tt=document.getElementById("tt").value;


var B="pt=" + pt + "&ps=" + ps + "&pc=" + pc + "&tt=" + tt ;
      http.open('post', 'jndex.php?CT=addpapt',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function managepapt(){

var V = '';

      http.open('post', 'jndex.php?CT=managepapt',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function editpapt(B){
 

var V = "paptid=" + B ;

      http.open('post', 'jndex.php?CT=editpapt',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function editpapt2(B){
 

var pt=document.getElementById("pt").value;
var ps=document.getElementById("ps").value;
var pc=document.getElementById("pc").value;
var tt=document.getElementById("tt").value;
var D="pt=" + pt + "&ps=" + ps +  "&pc=" + pc +  "&tt=" + tt + "&paptid=" + B ;

      http.open('post', 'jndex.php?CT=editpapt',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(D);
}
function deletepapt(B){
 

var V = "paptid=" + B ;

      http.open('post', 'jndex.php?CT=deletepapt',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

/////////////////////////////////
//
// preparation
///////////////////////////////////////////////////////////////////
function addnewpreform(){


var B="";
      http.open('post', 'jndex.php?CT=addpre',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewpre(){

var pn=document.getElementById("pn").value;
var pc=document.getElementById("pc").value;
var pp=document.getElementById("pp").value;


var B="pn=" + pn + "&pc=" + pc  + "&pp=" + pp ;
      http.open('post', 'jndex.php?CT=addpre',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function managepre(){

var V = '';

      http.open('post', 'jndex.php?CT=managepre',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function editpre(B){
 

var V = "preid=" + B ;

      http.open('post', 'jndex.php?CT=editpre',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function editpre2(B){
 

var pn=document.getElementById("pn").value;
var pc=document.getElementById("pc").value;
var pp=document.getElementById("pp").value;
var D="pn=" + pn + "&pc=" + pc + "&pp=" + pp +  "&preid=" + B ;

      http.open('post', 'jndex.php?CT=editpre',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(D);
}
function deletepre(B){
 

var V = "preid=" + B ;

      http.open('post', 'jndex.php?CT=deletepre',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

/////////////////////////////////
// supplies
//
///////////////////////////////////////////////////////////////////
function addnewsupform(){


var B="";
      http.open('post', 'jndex.php?CT=addsup',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function addnewsup(){

var pn=document.getElementById("pn").value;
var pc=document.getElementById("pc").value;
var pp=document.getElementById("pp").value;


var B="pn=" + pn + "&pc=" + pc  + "&pp=" + pp ;
      http.open('post', 'jndex.php?CT=addsup',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(B);
}
function managesup(){

var V = '';

      http.open('post', 'jndex.php?CT=managesup',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}

function editsup(B){
 

var V = "supid=" + B ;

      http.open('post', 'jndex.php?CT=editsup',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
function editsup2(B){
 

var pn=document.getElementById("pn").value;
var pc=document.getElementById("pc").value;
var pp=document.getElementById("pp").value;
var D="pn=" + pn + "&pc=" + pc + "&pp=" + pp + "&supid=" + B ;

      http.open('post', 'jndex.php?CT=editsup',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(D);
}
function deletesup(B){
 

var V = "supid=" + B ;

      http.open('post', 'jndex.php?CT=deletesup',true);
      http.onreadystatechange = handleInfo;
      http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
      http.send(V);
}
