

// JavaScript Document
var reqObj = null;
function createRequest(){
	try {
	   reqObj = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (err)	{
	   try {
		reqObj = new ActiveXObject("Microsoft.XMLHTTP");
	   }
	   catch (err2) {
		try {
		   reqObj = new XMLHttpRequest();
		}
		catch (err3) {
		   reqObj = null;
		}
	   }
	}
	return reqObj;
}
var now_tan = 1;
/* old function 
function loadfrm_ajx(str, imgid){
	now_tan = imgid;
	for(i=1;i<6;i++){
		var j = i+1;
		if(imgid == i)
			document.getElementById('tabimg'+i).style.backgroundImage = 'url(http://vv2/first/buypropertyanywhere/images/button_in_0'+j+'.jpg)';
		else
			document.getElementById('tabimg'+i).style.backgroundImage = 'url(http://vv2/first/buypropertyanywhere/images/button_out_0'+j+'.jpg)';
	}
	
	xmlhttp = createRequest();
	if(xmlhttp != null)
	{
		// call open with GET or POST, the URL, and true for asynchronous
		xmlhttp.open("GET",str+"&rand="+Math.random(1,10), true);
		xmlhttp.onreadystatechange = calltextvalue;
		xmlhttp.send(null);
	}	
}
*/
/* New Function starts here */
function loadfrm_ajx(str){
	xmlhttp = createRequest();
	if(xmlhttp != null)
	{
		// call open with GET or POST, the URL, and true for asynchronous
		xmlhttp.open("GET",str+"&rand="+Math.random(1,10), true);
		xmlhttp.onreadystatechange = calltextvalue;
		xmlhttp.send(null);
	}	
}
/* New Function Ends here */
function loadProgress()
{
	document.getElementById("tabs").innerHTML = "<div align=center class='text' align=left><img src=\"http://vv2/first/buypropertyanywhere/images/loading_m.gif\" border=\"0\"></div>";	
}

function calltextvalue(){
	loadProgress();
	if (xmlhttp.readyState == 4) {
	  if (xmlhttp.status == 200) {
			var text1  = xmlhttp.responseText;
			document.getElementById('tabs').innerHTML = text1;
	  }
	}
}

function out_tab_img(id){
	var j = id+1;
	if(now_tan != id)
		document.getElementById('tabimg'+id).style.backgroundImage = 'url(http://vv2/first/buypropertyanywhere/images/button_out_0'+j+'.jpg)';

}