﻿// JScript File
var xmlHttp
var xmlHttp2
function showNews(){ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null){
  		alert ("Your browser does not support AJAX!");
  		return;
  	}
	var url="/pressreleases/news.aspx";
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function showOnTheMove(){ 
	xmlHttp2=GetXmlHttpObject();
	if (xmlHttp2==null){
  		return;
  	}
	var url="/OnTheMove.asp";
	//alert(url);
	xmlHttp2.onreadystatechange=stateChanged2;
	xmlHttp2.open("GET",url,true);
	xmlHttp2.send(null);
}

function stateChanged(){
	if (xmlHttp.readyState==4){
		document.getElementById("News_Target").innerHTML = document.getElementById("News_Target").innerHTML + xmlHttp.responseText;
	}
}
function stateChanged2(){
	if (xmlHttp2.readyState==4){
		document.getElementById("News_Target").innerHTML = document.getElementById("News_Target").innerHTML + xmlHttp2.responseText;
	}
}

function GetXmlHttpObject(){
	var xmlHttp3=null;
	try{// Firefox, Opera 8.0+, Safari
  		xmlHttp3=new XMLHttpRequest();
  	}catch (e){// Internet Explorer
  		try{
			xmlHttp3=new ActiveXObject("Msxml2.XMLHTTP");
    	}catch (e){
			xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");
    	}
  	}
	return xmlHttp3;
}

