function get_id(id){ var obj = null; if(document.getElementById){ obj = document.getElementById(id); }else if(document.all){ obj = document.all[id]; } return obj; } var req=new Array; var The_ID=new Array; function sR(url,params,HttpMethod,anyID){ if (!HttpMethod) { HttpMethod="POST"; } req.push(initXMLHTTPRequest()); The_ID.push(anyID); i=parseInt(req.length)-1; if (req[i]){ req[i].open(HttpMethod,url,true); req[i].onreadystatechange=onReadyState; req[i].setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); req[i].send(params); } } function initXMLHTTPRequest(){ var xRequest=null; if (window.XMLHttpRequest) { xRequest=new XMLHttpRequest(); } else if (window.ActiveXObject) { xRequest=new ActiveXObject("Microsoft.XMLHTTP"); } else { } return xRequest; } function getobjbyid(id){ var obj = null; if(document.getElementById){ obj = document.getElementById(id); }else if(document.all){ obj = document.all[id]; } return obj; } function loadscript(path_to_file) { var oScript = document.createElement("script"); oScript.src = path_to_file; document.body.appendChild(oScript); } var sr_sign1=false; var sr_sign2=false; var sr_sign3=false; function onReadyState(){ for (i=0;i -1 ){ var dta=data.split("[SCRIPT2]"); script_toload=dta[0]; data=dta[1]; dta=null; } if(data.indexOf("[SEARCH_RESULTS]")>-1) { if(data.indexOf("BASIC[SEARCH_RESULTS]")>-1)var hrf="basic_search_portion"; else var hrf="company_results" data=data.replace("ADVANCED[SEARCH_RESULTS]",""); data=data.replace("BASIC[SEARCH_RESULTS]",""); toConsole(data,pass_ID); location.href="#"+hrf; } else if(data.indexOf("[MSGBOX]")>-1) { alert(data.replace("[MSGBOX]","")); if(data.indexOf("Your password was sent")>-1){ location.href="./"; } } else if(data.indexOf("[SCRIPT]")>-1) { eval(data.replace("[SCRIPT]","")); } else if(data.indexOf("[VALIDATE]")>-1) { data=data.replace("[VALIDATE]",""); var splitted=data.split(":"); if(splitted[0]=="good"){ if(splitted[2].indexOf("Username")!=-1){ sr_sign1=true; splitted[1]="username_company_valid"; } else if(splitted[2].indexOf("Email")!=-1){ sr_sign2=true; splitted[1]="email_company_valid"; } else if(splitted[2].indexOf("Company")!=-1){ sr_sign3=true; splitted[1]="company_name_company_valid"; } //set("good",splitted[1]); get_id(splitted[1]).innerHTML=good+splitted[2]; }else{ if(splitted[2].indexOf("Username")!=-1) sr_sign1=false; else if(splitted[2].indexOf("Email")!=-1) sr_sign2=false; else if(splitted[2].indexOf("Company")!=-1) sr_sign3=false; //set("bad",splitted[1]); get_id(splitted[1]).innerHTML=bad+splitted[2]; } } else if(data.indexOf("[NULL]")>-1) { } else if((data.indexOf("[OPENURL]")>-1)) { //alert(data.replace("[OPENURL]","")); } else{ toConsole(data,pass_ID); } if(script_toload!=""){ var scripts= script_toload.split(','); for(var i=0; i-1){ change=change.replace("_contact_"+MAX+"","_contact_"+NEW_MAX+""); } TBODY.rows[TBODY.rows.length-1].cells[i].innerHTML=change; } MAX++; } function tgl(OBJECT,img_ID) { if(img_ID && get_id(img_ID)) { var img_source=get_id(img_ID).src.toString(); } var obj=get_id(OBJECT); if (obj.style.display=="" || obj.style.display=="block") { hide_now(OBJECT); if(img_ID && get_id(img_ID))get_id(img_ID).src=img_source.replace("up","down"); }else{ show_now(OBJECT); if(img_ID && get_id(img_ID))get_id(img_ID).src=img_source.replace("down","up"); } if(get_id("page")){ get_id("page").style.top="500px"; } } function get_id(id){ var obj = null; if(document.getElementById){ obj = document.getElementById(id); }else if(document.all){ obj = document.all[id]; } return obj; } var z=new Array(); var thespeed=20; function hide_now(obj_here) { x=get_id(obj_here); ht=x.offsetHeight; thespeed=parseInt(parseInt(ht)/5)+1; get_id(obj_here).style.height=parseInt(ht)+"px"; decrz(obj_here); } function show_now(obj_here,extra) { if(!extra)extra=0; x=get_id(obj_here); x.style.display="block"; x.style.overflow="visible"; x.style.height=""; ht=x.offsetHeight; thespeed=parseInt(parseInt(ht)/5)+2; x.style.overflow="hidden"; x.style.height="0px"; x.style.display="block"; incrz(ht,obj_here,z.length,extra); } function decrz(obj_here,IndexOFz,extraOPTION){ if(!extraOPTION)extraOPTION=0; x.style.overflow='hidden'; x=get_id(obj_here); ht=x.style.height; if (parseInt(ht)>(thespeed-1)) { ht=parseInt(ht)-thespeed; if(extraOPTION==1){ x.style.top=(parseInt(x.style.top)+thespeed)+"px"; } x.style.height=parseInt(ht)+"px"; if(!IndexOFz){ var IndexOFz=z.length; } z[IndexOFz]=setTimeout("decrz('"+obj_here+"',"+IndexOFz+","+extraOPTION+")",30); } else { x.style.height=0+"px"; x.style.display="none"; clearTimeout(z[IndexOFz]); } } function incrz(hx,obj_here,IndexOFz,extraOPTION){ IndexOFz=0; if(!extraOPTION)extraOPTION=0; var x=get_id(obj_here); x.style.overflow='hidden'; ht=x.style.height; if (parseInt(ht)<(parseInt(hx)-(thespeed-1))) { ht=parseInt(ht)+thespeed; x.style.height=parseInt(ht)+"px"; z[IndexOFz]=setTimeout("incrz("+hx+",'"+obj_here+"',"+IndexOFz+","+extraOPTION+")",30); if(extraOPTION==1){ x.style.top=(parseInt(x.style.top)-thespeed)+"px"; } } else { x.style.height=""; x.style.overflow='visible'; clearTimeout(z[IndexOFz]); x.style.visibility='visible'; } } function delete_row(row_name){ row_name=parseInt(row_name.replace("row__","")); var TBODY=get_id('contact_tbody'); for(i=0;i