/* Assign default values for backend variables. */ if (typeof ctNocache === 'undefined') { ctNocache.set_cookies_flag = true; ctNocache.ajaxurl = '/wp-admin/admin-ajax.php'; } function sendRequest(url,callback,postData) { var req = createXMLHTTPObject(); if (!req) return; var method = (postData) ? "POST" : "GET"; var protocol = location.protocol; if (protocol === 'https:') { url = url.replace('http:', 'https:'); } else { url = url.replace('https:', 'http:'); } req.open(method,url,true); if (postData) req.setRequestHeader('Content-type','application/x-www-form-urlencoded'); req.onreadystatechange = function () { if (req.readyState != 4) return; if (req.status != 200 && req.status != 304) { // alert('HTTP error ' + req.status); return; } callback(req); }; if (req.readyState == 4) return; req.send(postData); } var XMLHttpFactories = [ function () {return new XMLHttpRequest()}, function () {return new ActiveXObject("Msxml2.XMLHTTP")}, function () {return new ActiveXObject("Msxml3.XMLHTTP")}, function () {return new ActiveXObject("Microsoft.XMLHTTP")} ]; function createXMLHTTPObject() { var xmlhttp = false; for (var i=0;i