function ShowLinks()
{
document.write("the Show links")
}
var please_wait = null;
//var
waitinText = "
Loading ...Please Wait
";
waiting = "
"+ waitinText +"
";
function response(url, target) {
if (link.readyState == 4) {
document.getElementById(target).innerHTML = (link.status == 200) ? link.responseText : "Ooops!! A broken link! Please contact the webmaster of this website ASAP and give him the fallowing errorcode: " + link.status;
}
}
function set_loading_message(msg) {
please_wait = msg;
}
//--------------------------------------------------
//var please_wait = null;
function manage(url,target,action) {
var xmlhttp=false;
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
var theForm = document.forms[0];
mylength = theForm.elements.length;
mystring = "";
mycounter = 0;
tmpcounter = 0;
while ( mycounter < mylength ) {
mytype = theForm.elements[mycounter].type;
myvalue = theForm.elements[mycounter].value;
if ( mytype != 'button' ) {
myname = theForm.elements[mycounter].name;
myvalue = theForm.elements[mycounter].value;
if ( tmpcounter == 0 ) {
myvalue = myvalue.replace(/&/g,"zzz");
mystring = myname + "=" + myvalue;
} else {
myvalue = myvalue.replace(/&/g,"zzz");
mystring = mystring + "&" + myname + "=" + myvalue+"&action="+action;
}
tmpcounter = tmpcounter + 1;
}
mycounter = mycounter + 1;
}
ajaxURL= "coms/com_"+url+".php?"+ mystring;
document.getElementById(target).innerHTML =waiting;
xmlhttp.open("GET", ajaxURL, true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
if ( xmlhttp.responseText == "" ) {
} else {
ajaxResponse = xmlhttp.responseText;
document.getElementById(target).innerHTML = ajaxResponse;
}
}
}
xmlhttp.send(null);
}