var settime=5000;function copyContents(a){var b="getContent.php";b+="?catelogid="+a;ajax(b)}function serverResponse(a){document.getElementById("hide_content").value=a;document.getElementById("content_id").innerHTML="Copy Record Successfully"}function format_number(a,b){if(isNaN(a)){return 0}if(a==""){return 0}var c=new String(a);var d=c.split(".");var e=parseFloat(d[0]);var f="";if(d.length>1){var g=new String(d[1]);g=String(parseFloat(d[1])/Math.pow(10,g.length-b));g=String(e+Math.round(parseFloat(g))/Math.pow(10,b));var h=g.indexOf(".");if(h==-1){g+=".";h=g.indexOf(".")}while(g.length<=h+b){g+="0"}f=g}else{var h;var g=new String(e);g+=".";h=g.indexOf(".");while(g.length<=h+b){g+="0"}f=g}return f}function alertContents(){var a=6e3;if(http_request.readyState==4){if(http_request.status==200){var b=http_request.responseText;var c=b.split("|");var d=c[0];if(d.indexOf("Save")>=0){alert("Information saved successfully!!");window.location.href=c[1]}else if(d.indexOf("callback")>=0){document.getElementById("callbackmsg").innerHTML="Our Customer representive call u soon...";setTimeout('clearDiv("callbackmsg")',+a);setTimeout("window.location.href='"+"index.php"+"'",+a)}else if(d.indexOf("frm_service_wise_att_list")>=0){alert("Details Added Successfully");window.location.href="myaccount.php"}else if(d.indexOf("add_service_order_details_admin")>=0){alert("Details Added Successfully");window.location.href=c[1]}else if(d.indexOf("signup")>=0){alert("Thank you for signing up for our newsletter!!!");setTimeout("window.location.href='"+"index.php"+"'",+a)}else if(d.indexOf("Erroralert")>=0){alert("Please enter the same value which is shown below")}else if(d.indexOf("conform")>=0){document.getElementById("lay_order").innerHTML="";document.getElementById("lay_order").innerHTML=c[1];document.getElementById("serverResponse").innerHTML="Saved Successfully."}else if(d.indexOf("view_all_reseller_client")>=0){document.getElementById("lay_order").innerHTML="";document.getElementById("lay_order").innerHTML=c[1]}else if(d.indexOf("on_select_confirm_orders")>=0){document.getElementById("span_drop1").innerHTML=c[1];document.getElementById("drop1").style.display="none"}else if(d.indexOf("service_view_details")>=0){document.getElementById("service_details_div").style.display="block";document.getElementById("work_view_details_div").style.display="block";document.getElementById("work_view_details_div").innerHTML="";document.getElementById("work_view_details_div").innerHTML=c[1];window.location.href="#bottom"}else if(d.indexOf("AlreadySUB")>=0){document.getElementById("signupmsg").innerHTML="Please know, the Email address has already been submitted. Please enter a new email address.";setTimeout('clearDiv("signupmsg")',+a);setTimeout("window.location.href='"+"index.php"+"'",+a)}else if(d.indexOf("free_web")>=0){document.getElementById("msgSuccess").innerHTML="Thank You For Filling up the details....";setTimeout('clearDiv("msgSuccess")',+a);setTimeout("clearFld('ajaxloader')",+a);setTimeout("window.location.href='" + c[1] + "'", +a)}else if(d.indexOf("free_quote")>=0){document.getElementById("msgSuccess").innerHTML="Thank You For Filling up the details....";setTimeout('clearDiv("msgSuccess")',+a);setTimeout("clearFld('ajaxloader')",+a);setTimeout("window.location.href='"+"index.php"+"'",+a)}else if(d.indexOf("reseller")>=0){document.getElementById("msgSuccess").innerHTML="Thank You For Filling up the details....";setTimeout('clearDiv("msgSuccess")',+a);setTimeout("clearFld('ajaxloader')",+a);setTimeout("window.location.href='" + c[1] + "'", +a)}else if(d.indexOf("user_feedback")>=0){document.getElementById("regi_msg").innerHTML="Thanks For Your Feedback. We will contact you soon...";setTimeout('clearDiv("regi_msg")',+a);setTimeout("clearFld('ajaxloader')",+a);setTimeout("window.location.href='"+"index.php"+"'",+a)}else if(d.indexOf("support")>=0){
a = 0; document.getElementById("msgSuccess").innerHTML="Your Request has been successfully submitted. Our SEO Specialist will be contacting you shortly...";setTimeout('clearDiv("msgSuccess")',+a);setTimeout("window.location.href='"+c[1]+"'",+a)}else if(d.indexOf("support_services")>=0){ a= 0;document.getElementById('msgSuccess').style.display = "";document.getElementById("msgSuccess").innerHTML="Your Request has been successfully submitted. Our SEO Specialist will be contacting you shortly...";setTimeout('clearDiv("msgSuccess")',+a);setTimeout("window.location.href='"+c[1]+"'",+a)}
else if(d.indexOf("Service")>=0){document.getElementById("msgSuccess").innerHTML="Added Service Successfully.....";setTimeout('clearDiv("msgSuccess")',+a);setTimeout("window.location.href='"+c[1]+"'",+a)}else if(d.indexOf("ResetPass")>=0){document.getElementById("serverResponse").innerHTML="Password Reset Successfully.";setTimeout("window.location.href='"+c[1]+"'",+a)}else if(d.indexOf("Update")>=0){document.getElementById("serverResponse").innerHTML="Profile Updated Successfully.";setTimeout("window.location.href='"+c[1]+"'",+a)}else if(d.indexOf("NotMatchOldPass")>=0){document.getElementById("serverResponse").innerHTML="Old Password does not Match";setTimeout("window.location.href='"+c[1]+"'",+a)}else if(d.indexOf("Register")>=0){document.getElementById("msg").innerHTML="Thank you for registering with us.";setTimeout("window.location.href='"+c[1]+"'",+1e3)}else if(d.indexOf("Contents")>=0){alert("Updated Successfully!!");window.location.href=c[1]}else if(d.indexOf("Cart")>=0){document.getElementById("msg").innerHTML="Your Cart Is Empty! Please Select the Service Again!";setTimeout('clearDiv("msg")',+a);window.location.href=c[1]}else if(d.indexOf("Only New Users")>=0){document.getElementById("msg").innerHTML="Your Cart Is Empty! Please Select the Service Again!";setTimeout('clearDiv("msg")',+a)}else if(d.indexOf("Success")>=0){window.location.href=c[1]}else if(d.indexOf("Mail")>=0){document.getElementById("xyz").innerHTML="Mail Sent Successfully!";setTimeout("window.location.href='"+c[1]+"'",+1e3)}else if(d.indexOf("Change")>=0){alert("Status Change Successfully");window.location.href=c[1]}else if(d.indexOf("ForgotExist")>=0){document.getElementById("xyz").innerHTML=c[1];setTimeout('clearDiv("xyz")',+a)}else if(d.indexOf("Exist")>=0){document.getElementById("msg").innerHTML=c[1];setTimeout('clearDiv("msg")',+a)}else if(d.indexOf("MSG")>=0){document.getElementById("msg2").innerHTML="Invalid User.";setTimeout('clearDiv("msg2")',+a)}else if(d.indexOf("getEmail")>=0){document.getElementById("getEmail").innerHTML="";document.getElementById("getEmail").innerHTML=c[1]}else if(d.indexOf("r1eseller_place_order")>=0){if(c[1]=="paypalcheckout"){window.location.href="reseller_paypal.php"}else{window.location.href="reseller_2checkout.php"}return false}else if(d.indexOf("reseller_withdraw")>=0){alert("You Have Successfully Withdrawn. Please Check Your Mail.");window.location.href="reseller_myaccount.php"}else if(d.indexOf("withdraw_detail")>=0){document.getElementById("lay_order").innerHTML="";document.getElementById("lay_order").innerHTML=c[1]}else if(d.indexOf("withdraw_reseller_commission")>=0){alert("You Have Successfully Withdrawn. Please Check Your Mail.");document.getElementById("withdraw_msg").innerHTML="";document.getElementById("withdraw_msg").innerHTML=c[1];window.location.href="reseller_order_history.php"}else if(d.indexOf("order_assign")>=0){alert("Order Successfully Assign to Client.");window.location.href=window.location.href}else if(d.indexOf("Pass")>=0){document.getElementById("serverResponse").innerHTML="Your Passwrod is Saved Successfully.";setTimeout("window.location.href='"+c[1]+"'",+a)}else if(d.indexOf("fail")>=0){document.getElementById("serverResponse").innerHTML=c[1];setTimeout('clearDiv("serverResponse")',+a)}else if(d.indexOf("Error_pass")>=0){document.getElementById("serverResponse").innerHTML=c[1];setTimeout('clearDiv("serverResponse")',+a)}else if(d.indexOf("vcart")>=0){document.getElementById("vcartqty").innerHTML='<a href="addtocart.php" style="color:black">Item(s):</a>'+c[1]+"  ";document.getElementById("vcartamt").innerHTML='<a href="addtocart.php" style="color:black">Total:$'+format_number(c[2],0)+"</a>";document.getElementById("vcartimg").innerHTML='<a href="addtocart.php"  style="color:black"><img src="images/cart_icon.jpg" border="0"></a>'}else if(d.indexOf("addtocart_related")>=0){if(document.getElementById("inner_div_cart_details_"+c[2]+"_"+c[3])!=null){var e="inner_div_cart_details_"+c[2]+"_"+c[3];document.getElementById("inner_div_cart_details_"+c[2]+"_"+c[3]).innerHTML=c[1];$("#"+e).show("slow");document.getElementById("sub_total").innerHTML="$"+c[4];document.getElementById("cart_total").innerHTML="$"+c[4];document.getElementById("hidden_sub_total").value=c[4];document.getElementById("hidden_total_related_service_div").value=document.getElementById("hidden_total_related_service_div").value-1;$("html, body").animate({scrollTop:150},"slow")}else{var e="inner_div_cart_details_"+c[2]+"_"+c[3];document.getElementById("div_cart_details").innerHTML+=c[1];$("html, body").animate({scrollTop:150},"slow");$("#"+e).show(1e3);document.getElementById("sub_total").innerHTML="$"+c[4];document.getElementById("cart_total").innerHTML="$"+c[4];document.getElementById("hidden_sub_total").value=c[4];document.getElementById("hidden_total_related_service_div").value=document.getElementById("hidden_total_related_service_div").value-1;document.getElementById("div_to_remove_"+c[2]+"_"+c[3]).style.display="none";document.getElementById("variable").value=c[5];var f;var g=0;var h=c[6];for(f=0;f<=h;f++){if(document.getElementById("div_to_remove_"+c[2]+"_"+f)!=null){document.getElementById("div_to_remove_"+c[2]+"_"+f).style.display="none";document.getElementById("hidden_related_services_total_div").value=document.getElementById("hidden_related_services_total_div").value-1}}if(document.getElementById("hidden_related_services_total_div").value==0){document.getElementById("interest").style.display="none";document.getElementById("interest_border").style.display="none"}else{for(j=0;j<=h;j++){if(j<3){if(document.getElementById("div_to_be_appear_"+j)!=null){document.getElementById("div_to_be_appear_"+g).style.display="block";g++}}}}}}else if(d.indexOf("emptycart")>=0){document.getElementById("vcartqty").innerHTML='<a href="addtocart.php">'+c[1]+" Item(s)</a>";document.getElementById("vcartamt").innerHTML='| <a href="addtocart.php">Total: $'+format_number(c[2],2)+"</a>";document.getElementById("vcartimg").innerHTML=""}else{serverresponse(d)}}else{alert("There was a problem with the request....")}}}function makeRequest(a,b){http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest;if(http_request.overrideMimeType){http_request.overrideMimeType("text/html")}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{http_request=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}if(!http_request){alert("Cannot create XMLHTTP instance");return false}http_request.open("POST",a,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",b.length);http_request.setRequestHeader("Connection","close");http_request.onreadystatechange=alertContents;http_request.send(b)}function get(a,b){var c="";for(i=0;i<a.elements.length;i++){if(a.elements[i].tagName=="INPUT"){if(a.elements[i].type=="text"){c+=a.elements[i].name+"="+a.elements[i].value+"&"}if(a.elements[i].type=="hidden"){c+=a.elements[i].name+"="+a.elements[i].value+"&"}if(a.elements[i].type=="button"){c+=a.elements[i].name+"="+a.elements[i].value+"&"}if(a.elements[i].type=="password"){c+=a.elements[i].name+"="+a.elements[i].value+"&"}if(a.elements[i].type=="checkbox"){if(a.elements[i].checked){c+=a.elements[i].name+"="+a.elements[i].value+"&"}else{c+=a.elements[i].name+"=&"}}if(a.elements[i].type=="radio"){if(a.elements[i].checked){c+=a.elements[i].name+"="+a.elements[i].value+"&"}}}if(a.elements[i].tagName=="TEXTAREA"){c+=a.elements[i].name+"="+encodeURIComponent(a.elements[i].value)+"&"}if(a.elements[i].tagName=="SELECT"){var d=a.elements[i];c+=d.name+"="+d.options[d.selectedIndex].value+"&"}}makeRequest(b,c)}function funSelect(){var a=document.getElementById("addids").length;for(var b=0;b<a;b++){document.getElementById("addids").options[b].selected=true}var a=document.getElementById("addids2").length;for(var b=0;b<a;b++){document.getElementById("addids2").options[b].selected=true}var a=document.getElementById("addids3").length;for(var b=0;b<a;b++){document.getElementById("addids3").options[b].selected=true}}function funDelete3(){var a=document.frmlayout.addids3.selectedIndex;document.frmlayout.addids3.remove(document.frmlayout.addids3.selectedIndex);index3=index3-1}function funDelete2(){var a=document.frmlayout.addids2.selectedIndex;document.frmlayout.addids2.remove(document.frmlayout.addids2.selectedIndex);index2=index2-1}function funAdd3(){var a=document.createElement("OPTION");a.text=document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].text+"--"+document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].value;a.value=document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].value+"#"+document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].text;document.frmlayout.addids3.options[index3]=a;index3=index3+1}function funAddSubCat2(){var a=document.createElement("OPTION");a.text=document.frmlayout.drpsubcate.options[document.frmlayout.drpsubcate.selectedIndex].text+"--"+document.frmlayout.drpsubcate.options[document.frmlayout.drpsubcate.selectedIndex].value;a.value=document.frmlayout.drpsubcate.options[document.frmlayout.drpsubcate.selectedIndex].value+"#"+document.frmlayout.drpsubcate.options[document.frmlayout.drpsubcate.selectedIndex].text;document.frmlayout.addids2.options[index2]=a;index2=index2+1;var b=document.frmlayout.drpsubcate.options[document.frmlayout.drpsubcate.selectedIndex].value;var c="getSubCatId.php";c+="?id="+b+"&requestType=2&add=adding";ajax(c)}function funAdd2(){var a=document.createElement("OPTION");a.text=document.frmlayout.catIdCombo.options[document.frmlayout.catIdCombo.selectedIndex].text+"--"+document.frmlayout.catIdCombo.options[document.frmlayout.catIdCombo.selectedIndex].value;a.value=document.frmlayout.catIdCombo.options[document.frmlayout.catIdCombo.selectedIndex].value+"#"+document.frmlayout.catIdCombo.options[document.frmlayout.catIdCombo.selectedIndex].text;document.frmlayout.addids2.options[index2]=a;index2=index2+1}function funDelete(){var a=document.frmlayout.addids.selectedIndex;document.frmlayout.addids.remove(document.frmlayout.addids.selectedIndex);index=index-1}function funAdd(){var a=document.createElement("OPTION");a.text=document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].text+"--"+document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].value;a.value=document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].value+"#"+document.frmlayout.drpprod.options[document.frmlayout.drpprod.selectedIndex].text;document.frmlayout.addids.options[index]=a;index=index+1}function funprodsajax(a){var b=new Array;var c=new Array;var d=0;var e=0;var f=0;for(var g=0;g<a.length;g++){if(a.charAt(g)=="|"){var h=a.substring(d,g);for(k=0;k<h.length;k++){if(h.charAt(k)=="#"){b[e]=h.substring(f,k);c[e]=h.substring(k+1,h.length);e=e+1}}d=g+1}}var i="<select name='drpprod' size=5>";for(var g=0;g<c.length;g++){i=i+"<option value="+c[g]+">"+b[g]+"</option>"}i=i+"</select>";document.getElementById("divproduct").innerHTML=i}function funProds(a){var b="getProds.php";b+="?id="+a+"&requestType=3";ajax(b)}function funsubcat1(a){var b="getSubCatId.php";b+="?id="+a+"&requestType=2";ajax(b)}function funsubcatajax1(a){var b=new Array;var c=new Array;var d=0;var e=0;var f=0;for(var g=0;g<a.length;g++){if(a.charAt(g)=="|"){var h=a.substring(d,g);for(k=0;k<h.length;k++){if(h.charAt(k)=="#"){b[e]=h.substring(f,k);c[e]=h.substring(k+1,h.length);e=e+1}}d=g+1}}var i="<select name='drpsubcate1' size='4' onchange='funProds(this.value)'>";for(var g=0;g<c.length;g++){i=i+"<option value="+c[g]+">"+b[g]+"</option>"}i=i+"</select>";document.getElementById("divsubcat1").innerHTML=i}function funsubcatajax(a){var b=new Array;var c=new Array;var d=0;var e=0;var f=0;for(var g=0;g<a.length;g++){if(a.charAt(g)=="|"){var h=a.substring(d,g);for(k=0;k<h.length;k++){if(h.charAt(k)=="#"){b[e]=h.substring(f,k);c[e]=h.substring(k+1,h.length);e=e+1}}d=g+1}}var i="<select name='drpsubcate' size='4' onchange='funsubcat1(this.value)'>";for(var g=0;g<c.length;g++){i=i+"<option value="+c[g]+">"+b[g]+"</option>"}i=i+"</select>";document.getElementById("divsubcat").innerHTML=i}function findPermission(a){var b="getid.php?userid="+a;ajax(b)}function GetXmlHttpObject(){var a=null;try{a=new XMLHttpRequest}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){a=new ActiveXObject("Microsoft.XMLHTTP")}}return a}function mystateChanged(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var a=xmlHttp.responseText;if(a==""){alert("Opps Some Error")}else if(a=="Change"){alert("Status Change Successfully");window.location.href="order_info.php"}else if(a=="Mail"){alert("Mail Send Successfully");window.location.href="order_info.php"}else if(a.indexOf("^")==0){var b=a.split("^");document.getElementById("process").style.visibility="hidden";document.getElementById("process").style.display="none";document.getElementById("url_get_multi").style.display="";document.getElementById("result").value=b[1]}else{serverResponse(a)}}}function ajax(a){xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("Browser does not support HTTP Request");return}xmlHttp.onreadystatechange=mystateChanged;xmlHttp.open("GET",a,true);xmlHttp.send(null)}var ajaxvar;var xmlHttp;var xmlResponse="";var ss=""
