// JavaScript Document
var xmlHttp1;
var id1;

function activatetab(tab_name,siteurl){
	if(tab_name == "coupontab"){
	//	document.getElementById('notification').innerHTML = "Loading coupons .... ";
		linkme(siteurl + 'components/coupon/frontjax.php','currenttab');
		linkme1(siteurl + 'modules/popcoupons/popjax.php','compomod');
		document.title = "San Francisco Bay Area Coupons - Smog Check, Oil Change, Toyota, Pizza, Granite, Travel, Wheel, and Brake jobs in SF";
		//reset_search("Coupon Search","coupon");
//		document.getElementById('notification').innerHTML = "";
	}
	if(tab_name == "reviewtab"){
//		document.getElementById('notification').innerHTML = "Loading reviews .... ";
		linkme(siteurl + 'components/review/front.php','currenttab');
		linkme1(siteurl + 'modules/revmod/index.php','compomod');
		document.title = "Free Local Reviews - Oil change, Smog, Cell phones, Granite, Hardwood - San Francisco Bay Area - SF Advertiser";
		//reset_search("Review Search","reviews");
	//	document.getElementById('notification').innerHTML = "";
	}
	if(tab_name == "listingstab"){
		//document.getElementById('notification').innerHTML = "Loading Classifieds .... ";
		linkme(siteurl + 'components/listings/front.php','currenttab');
		linkme1(siteurl + 'modules/topclass/index.php','compomod');
		document.title = "San Francisco Classifieds –Toyota, Honda, Hauling, Handyman, Painting, Rental, Jobs, Garage Sale, Massage and More.";
		//reset_search("Classified Search","listings");
		//document.getElementById('notification').innerHTML = "";
	}
}


function linkme1(link_url,divid)
{
	var url = link_url;
	id1 = divid;
	xmlHttp1=GetXmlHttpObject(linkstateChanged1);
	xmlHttp1.open("GET", link_url , true);
	xmlHttp1.send(null);
}

function linkstateChanged1() 
{ 
if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
{ 
	document.getElementById(id1).innerHTML=xmlHttp1.responseText ;
} 
}

function reset_search(title, compo){
	//document.forms["searchform"].submit.value = title;
	//document.forms["searchform"].spriority.value = compo;
}