function createRequestObject(){
  var request_;
  var browser = navigator.appName;
  if(browser == "Microsoft Internet Explorer"){
    request_ = new ActiveXObject("Microsoft.XMLHTTP");
  }
  else
  {
    request_ = new XMLHttpRequest();
  }
  return request_;
}
var http = createRequestObject();


function menu(menu){
  http.open('get', '../scripts/menu.php?subcategory_id=' +menu);
  http.onreadystatechange = handleInfo;
  http.send(null);
}

function jobs(job){
  http.open('get', '../scripts/jobs.php?category_id=' +job);
  http.onreadystatechange = handleInfo;
  http.send(null);
}

function ajaxContent(page){
  http.open('get', '../scripts/ajaxContent.php?page=' +page);
  http.onreadystatechange = handleInfo;
  http.send(null);
}

function showForm(form){
  http.open('get', '../forms/' + form + '.php');
  http.onreadystatechange = handleInfo;
  http.send(null);
}

function handleInfo(){
  if(http.readyState == 1){
    document.getElementById('columnRight').innerHTML = 'loading...';
  }
  if(http.readyState == 4){
    var response = http.responseText;
	document.getElementById('columnRight').innerHTML = response;
	
	//cealrs the slideshow intervals--otherwise the slideshop will try to call tags hat dont exsit after the ajax innherhtml replace
	clearInterval(ss_fi);
	clearInterval(ss_fo);
  }
}