var home_url = 'http://hostingreviewscript.scriptfactory.org'; var home_dir = ''; dochref = document.location.href.substr(document.location.href.search('/')+2, 1000); if(dochref.search('/') == -1){ $thisurl = document.location.href.substr(0,document.location.href.search('/')+2) + dochref; } else { $thisurl = document.location.href.substr(0,document.location.href.search('/')+2) + dochref.substr(0, dochref.search('/')); } $thisurl = $thisurl + ''; var xmlhttp /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlhttp=new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") } catch (E) { xmlhttp=false } } @else xmlhttp=false @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest (); } catch (e) { xmlhttp = false} } function myXMLHttpRequest () { var xmlhttplocal; try { xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")} catch (e) { try { xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")} catch (E) { xmlhttplocal = false; } } if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') { try { var xmlhttplocal = new XMLHttpRequest (); } catch (e) { var xmlhttplocal = false; } } return (xmlhttplocal); } var mnmxmlhttp = Array (); var xvotesString = Array (); var mnmPrevColor = Array (); var responsestring = Array (); var myxmlhttp = Array (); var responseString = new String; function ShowHide(id) { element = document.getElementById(id); if (element.style.display == 'none') element.style.display = ''; else element.style.display = 'none' } function ShowElement(id) { element = document.getElementById(id); element.style.display = ''; } function HideElement(id) { element = document.getElementById(id); element.style.display = 'none'; } function ActionConfirm(url) { if (confirm('Are you sure you want to do this action?')) window.location.href= url; } function RemoveArticle(url) { if (confirm('Are you sure you want to remove this article?')) window.location.href= url; } function ApproveReview(id) { if (xmlhttp) { url = "/admin_comments.php"; content = "id=" + id + "&action=approve"; target = document.getElementById("adminlinks-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function RemoveReview(id) { if (xmlhttp) { url = "/admin_comments.php"; content = "id=" + id + "&action=remove"; target = document.getElementById("adminlinks-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function ApproveSite(id) { if (xmlhttp) { url = "/admin_sites.php"; content = "id=" + id + "&action=approve"; target = document.getElementById("siteapprove-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function RemoveSite(id) { if (confirm('Are you sure you want to remove this site?')) if (xmlhttp) { url = "/admin_sites.php"; content = "id=" + id + "&action=remove"; target = document.getElementById("siteremove-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function RemoveCoupon(id) { if (confirm('Are you sure you want to remove this coupon?')) if (xmlhttp) { url = "/admin_coupons.php"; content = "id=" + id + "&action=remove"; target = document.getElementById("adminlinks-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function RemoveExpiredCoupons() { if (confirm('Are you sure you want to remove all expired coupons?')) if (xmlhttp) { url = "/admin_coupons.php"; content = "action=removeexpired"; target = document.getElementById("removeexpired"); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function ApproveCoupon(id) { if (xmlhttp) { url = "/admin_coupons.php"; content = "id=" + id + "&action=approve"; target = document.getElementById("adminlinks-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function RateCoupon(id, value) { if (xmlhttp) { url = "/rate_coupon.php"; content = "id=" + id + "&value=" + value; target = document.getElementById("ratecoupon-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } } function SaveLanguage(lang, word, translation) { //alert('a'); if (xmlhttp) { //alert('a'); url = "/admin_languages.php"; content = "action=save&lang=" + lang + "&word=" + word + "&translation=" + translation; //target = document.getElementById("translate-0"); //target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; //target.innerHTML = result; //alert('a'); } } } } } function RemoveStaticpage(id) { if (confirm('Are you sure you want to remove this page?')) if (xmlhttp) { url = "/admin_staticpages.php"; content = "id=" + id + "&action=remove"; target = document.getElementById("staticpageremove-"+id); target.innerHTML = "wait..."; mnmxmlhttp[0] = new myXMLHttpRequest (); if (mnmxmlhttp) { mnmxmlhttp[0].open ("POST", url, true); mnmxmlhttp[0].setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); mnmxmlhttp[0].send(content); mnmxmlhttp[0].onreadystatechange = function () { if (mnmxmlhttp[0].readyState == 4) { result = mnmxmlhttp[0].responseText; target.innerHTML = result; } } } } }