



/* ---------------------------- */
/* 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 updatebranch(amount){

nocache = Math.random();

http.open('get', '/actions.cfm?action=change_searchrules_action&varname=branch&amount='+amount+'&nocache = '+nocache);
http.onreadystatechange = function() {
    getbranchpages();
};
http.send(null);
}



function getbranchpages(){
if(http.readyState == 4){ 
nocache = Math.random();
http.open('get', '/ajax.cfm?ajaxpage=branchpages&nocache = '+nocache);
http.onreadystatechange = function() {
	branchpages();
};
http.send(null);
}
}


function branchpages() {
 if(http.readyState == 4){ 
 var branchpagesresponse = http.responseText;
{
document.getElementById('branchpages_inc').innerHTML = branchpagesresponse;
}
}
}



