/* ---------------------------- */
/* XMLHTTPRequest Enable */
/* ---------------------------- */

function createObject() {
var request_type;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
request_type = new ActiveXObject("Microsoft.XMLHTTP");
}else{
request_type = new XMLHttpRequest();
}
return request_type;
}
var http = createObject();
var nocache = 0;
function insert() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('real_response').innerHTML = "Wait..."
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var site_url= encodeURI(document.getElementById("zipsz").value);
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'second_select.php?site_url='+site_url+'&nocache = '+nocache);
http.onreadystatechange = insertReply;
http.send(null);
}
function insertReply() {
if(http.readyState == 4){ 
var response = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById('real_response').innerHTML = ''+response;
}
}


function createObjecty() {
var request_typey;
var browsery = navigator.appName;
if(browsery == "Microsoft Internet Explorer"){
request_typey = new ActiveXObject("Microsoft.XMLHTTP");
}else{	
request_typey = new XMLHttpRequest();
}
return request_typey;
}
var http = createObjecty();

var nocachey = 0;
function insertx() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('third_response').innerHTML = "Just a second...";
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var my_cat_idw= encodeURI(document.getElementById("zipsr").value);
var my_cat_idx= encodeURI(document.getElementById("cats_ido").value);
var tempe = encodeURI(document.getElementById("temp_subcatName").value);

// Set te random number to add to URL request
nocachey = Math.random();
// Pass the login variables like URL variable
http.open('get', 'edit_subs.php?my_cat_idw='+my_cat_idw+'&my_cat_idx='+my_cat_idx+'&temp_ubcatName='+tempe+'&nocachey = '+nocachey);
http.onreadystatechange = insertReplyy;
http.send(null);
}
function insertReplyy() {
if(http.readyState == 4){
var responsey = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById('third_response').innerHTML = ''+responsey;
}
}


function createObjectr() {
var request_typer;
var browserr = navigator.appName;
if(browserr == "Microsoft Internet Explorer"){
request_typer = new ActiveXObject("Microsoft.XMLHTTP");
}else{	
request_typer = new XMLHttpRequest();
}
return request_typer;
}
var http = createObjectr();

var nocacher = 0;
function show_cats() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('cat_display').innerHTML = "Wait...";
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var option_x= encodeURI(document.getElementById("option_x").value);
// Set te random number to add to URL request
nocacher = Math.random();
// Pass the login variables like URL variable
http.open('get', 'choose_cats.php?option_x='+option_x+'&nocacher = '+nocacher);
http.onreadystatechange = insertReplyr;
http.send(null);
}
function insertReplyr() {
if(http.readyState == 4){
var responser = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById('cat_display').innerHTML = ''+responser;
}
}

function createObjectgn() {
var request_typegn;
var browsergn = navigator.appName;
if(browsergn == "Microsoft Internet Explorer"){
request_typegn = new ActiveXObject("Microsoft.XMLHTTP");
}else{	
request_typegn = new XMLHttpRequest();
}
return request_typegn;
}
var http = createObjectgn();

var nocachegn = 0;
function show_subcats() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('subcat_display').innerHTML = "Wait...";
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var category_value= encodeURI(document.getElementById("category_value").value);
// Set te random number to add to URL request
nocachegn = Math.random();
// Pass the login variables like URL variable
http.open('get', 'choose_subcats.php?category_value='+category_value+'&nocachegn = '+nocachegn);
http.onreadystatechange = insertReplygn;
http.send(null);
}
function insertReplygn() {
if(http.readyState == 4){
var responsegn = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById('subcat_display').innerHTML = ''+responsegn;
}
}


function createObjectqw() {
var request_typeqw;
var browserqw = navigator.appName;
if(browserqw == "Microsoft Internet Explorer"){
request_typeqw = new ActiveXObject("Microsoft.XMLHTTP");
}else{	
request_typeqw = new XMLHttpRequest();
}
return request_typeqw;
}
var http = createObjectqw();

var nocacheqw = 0;
function agree_catalogue() {
// Optional: Show a waiting message in the layer with ID login_response
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var checkme= encodeURI(document.getElementById("checkme").value);
// Set te random number to add to URL request
nocacheqw = Math.random();
// Pass the login variables like URL variable
http.open('get', 'browse_user.php?checkme='+checkme+'&nocacheqw = '+nocacheqw);
http.onreadystatechange = insertReplyqw;
http.send(null);
}
function insertReplyqw() {
if(http.readyState == 4){
var responseqw = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById("lipton").innerHTML = ''+responseqw;
}
}
