function tabTwo(tab)
{
	if(tab==4)
	{
		document.getElementById('img4').src='http://busneeds.com/images/image_16.jpg';
	}
	else
	{
		document.getElementById('img4').src='http://busneeds.com/images/image-down_16.jpg';
	}
	if(tab==5)
	{
		document.getElementById('img5').src='http://busneeds.com/images/image-down_17.jpg';
	}
	else
	{
		document.getElementById('img5').src='http://busneeds.com/images/image_17.jpg';
	}
	if(tab==6)
	{
		document.getElementById('img6').src='http://busneeds.com/images/image-down_18.jpg';
	}
	else
	{
		document.getElementById('img6').src='http://busneeds.com/images/image_18.jpg';
	}
	if(tab==7)
	{
		document.getElementById('img7').src='http://busneeds.com/images/image-down_19.jpg';
	}
	else
	{
		document.getElementById('img7').src='http://busneeds.com/images/image_19.jpg';
	}
	for(var i=4;i<=7;i++)
	{
		if(tab==i)
		{
			document.getElementById('page'+i).style.display='';
		}
		else
		{
			document.getElementById('page'+i).style.display='none';
		}
	}
}
function cityCheck2()
{
	alert("Select a State");
}
function zipCheck2(data)
{
	if(document.getElementById('zip_'+data).value=='ZIP :')
	{
		document.getElementById('zip_'+data).value='';
	}
}
/*function stCk(val,id,company_id,total)
{
	var cb_out_name='c_set_cookie_cb'+id;
	if(document.getElementById(cb_out_name).checked==true)
	{
	var cb_name='c_set_cookie_quote'+id;
	listBusCokkie(cb_name,id,company_id,'1',total);
	}
	else
	{
	var cb_name='c_set_cookie_quote'+id;
	listBusCokkie(cb_name,id,company_id,'0',total);
	}
}
function stCkLimo(val,id,company_id,total)
{
	var cb_out_name='c_set_cookie_cb'+id;
	if(document.getElementById(cb_out_name).checked==true)
	{
	var cb_name='c_set_cookie_quote'+id;
	listLimoCokkie(cb_name,id,company_id,'1',total);
	}
	else
	{
	var cb_name='c_set_cookie_quote'+id;
	listLimoCokkie(cb_name,id,company_id,'0',total);
	}
}
*/

function searchListing2(type,pageNo,sl)
{
	if(sl=='srch')
	{
		 var nn=100;
		 clearCookie(nn);
	}
if(type=='H')
{
	var hotel4=document.getElementById('my_hotel_id_4').value;
	var state4=document.getElementById('my_state_id_4').value;
	var city4=document.getElementById('my_city_id_4').value;
	var zip4=document.getElementById('zip_4').value;
	if(hotel4=="")
	{
		alert("Select a Hotel type.");
		return false;
	}
	if(state4=="" && city4=="" && (zip4=="" || zip4=='ZIP :'))
	{
		alert("Select a State and City OR Enter a Zip Code.");
		return false;
	}
	if(state4!="" && city4=="" && (zip4=="" || zip4=='ZIP :'))
	{
		alert("Select a City.");
		return false;
	}
	if(zip4!='' && zip4!='ZIP :')
	{
		if(zip4.length!=5)
		{
			alert('Zip might be five in length.');
			return false;
		}
		document.getElementById('my_state_id_4').value='';
		document.getElementById('my_city_id_4').value='';
		//alert("With Zip");		
		listHotelWithZip(hotel4,zip4,pageNo,sl);
	}
	else
	{
		document.getElementById('zip_4').value='ZIP :';
		//alert("With Out Zip");
		listHotelWithOutZip(hotel4,state4,city4,pageNo,sl);
	}
}
if(type=='R')
{
 
	var restaurant5=document.getElementById('my_restaurant_id_5').value;
	var state5=document.getElementById('my_state_id_5').value;
	var city5=document.getElementById('my_city_id_5').value;
	var zip5=document.getElementById('zip_5').value;
	if(restaurant5=="")
	{
		alert("Select a Restaurant type.");
		return false;
	}
	if(state5=="" && city5=="" && (zip5=="" || zip5=='ZIP :'))
	{
		alert("Select a State and City OR Enter a Zip Code.");
		return false;
	}
	if(state5!="" && city5=="" && (zip5=="" || zip5=='ZIP :'))
	{
		alert("Select a City.");
		return false;
	}
	if(zip5!='' && zip5!='ZIP :')
	{
		if(zip5.length!=5)
		{
			alert('Zip might be five in length.');
			return false;
		}
		document.getElementById('my_state_id_5').value='';
		document.getElementById('my_city_id_5').value='';
		//alert("With Zip");		
		listRestaurantWithZip(restaurant5,zip5,pageNo,sl);
	}
	else
	{
		document.getElementById('zip_5').value='ZIP :';
		//alert("With Out Zip");
		listRestaurantWithOutZip(restaurant5,state5,city5,pageNo,sl);
	}

}
if(type=='C')
{
 
	var state6=document.getElementById('my_state_id_6').value;
	var city6=document.getElementById('my_city_id_6').value;
	var zip6=document.getElementById('zip_6').value;
	if(state6=="" && city6=="" && (zip6=="" || zip6=='ZIP :'))
	{
		alert("Select a State and City OR Enter a Zip Code.");
		return false;
	}
	if(state6!="" && city6=="" && (zip6=="" || zip6=='ZIP :'))
	{
		alert("Select a City.");
		return false;
	}
	if(zip6!='' && zip6!='ZIP :')
	{
		if(zip6.length!=5)
		{
			alert('Zip might be five in length.');
			return false;
		}
		document.getElementById('my_state_id_6').value='';
		document.getElementById('my_city_id_6').value='';
		//alert("With Zip");		
		listCasinoWithZip(zip6,pageNo,sl);
	}
	else
	{
		document.getElementById('zip_6').value='ZIP :';
		//alert("With Out Zip");
		listCasinoWithOutZip(state6,city6,pageNo,sl);
	}

}
if(type=='T')
{
	var tour7=document.getElementById('my_tour_id_7').value;
	var state7=document.getElementById('my_state_id_7').value;
	var city7=document.getElementById('my_city_id_7').value;
	var zip7=document.getElementById('zip_7').value;
	if(tour7=="")
	{
		alert("Select a Tour type.");
		return false;
	}
	if(state7=="" && city7=="" && (zip7=="" || zip7=='ZIP :'))
	{
		alert("Select a State and City OR Enter a Zip Code.");
		return false;
	}
	if(state7!="" && city7=="" && (zip7=="" || zip7=='ZIP :'))
	{
		alert("Select a City.");
		return false;
	}
	if(zip7!='' && zip7!='ZIP :')
	{
		if(zip7.length!=5)
		{
			alert('Zip might be five in length.');
			return false;
		}
		document.getElementById('my_state_id_7').value='';
		document.getElementById('my_city_id_7').value='';
		//alert("With Zip");		
		listTourWithZip(tour7,zip7,pageNo,sl);
	}
	else
	{
		document.getElementById('zip_7').value='ZIP :';
		//alert("With Out Zip");
		listTourWithOutZip(tour7,state7,city7,pageNo,sl);
	}
 }
}

function listTourWithZip(tour7,zip7,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListTour.php?tour7='+tour7+'&zip7='+zip7+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listTourWithOutZip(tour7,state7,city7,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListTour.php?tour7='+tour7+'&state7='+state7+'&city7='+city7+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listTourCokkie(cb_name,id,company_id,ts,total)
{	
	passingUrl='http://busneeds.com/ajaxListTourCokkie.php?cb_name='+cb_name+'&id='+id+'&ts='+ts+'&total='+total+'&company_id='+company_id+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	httpB1.onreadystatechange = handleDeleteB2;
	httpB1.send(null);	
}

function listHotelWithZip(hotel4,zip4,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListHotel.php?hotel4='+hotel4+'&zip4='+zip4+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listHotelWithOutZip(hotel4,state4,city4,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListHotel.php?hotel4='+hotel4+'&state4='+state4+'&city4='+city4+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listHotelCokkie(cb_name,id,company_id,ts,total)
{	
	passingUrl='http://busneeds.com/ajaxListHotelCokkie.php?cb_name='+cb_name+'&id='+id+'&ts='+ts+'&total='+total+'&company_id='+company_id+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	httpB1.onreadystatechange = handleDeleteB2;
	httpB1.send(null);	
}

function listRestaurantWithZip(restaurant5,zip5,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListRestaurant.php?restaurant5='+restaurant5+'&zip5='+zip5+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listRestaurantWithOutZip(restaurant5,state5,city5,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListRestaurant.php?restaurant5='+restaurant5+'&state5='+state5+'&city5='+city5+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listRestaurantCokkie(cb_name,id,company_id,ts,total)
{	
	passingUrl='http://busneeds.com/ajaxListRestaurantCokkie.php?cb_name='+cb_name+'&id='+id+'&ts='+ts+'&total='+total+'&company_id='+company_id+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	httpB1.onreadystatechange = handleDeleteB2;
	httpB1.send(null);	
}
function listCasinoWithZip(zip6,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListCasino.php?zip6='+zip6+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listCasinoWithOutZip(state6,city6,pageNo,sl)
{	
	passingUrl='http://busneeds.com/ajaxListCasino.php?state6='+state6+'&city6='+city6+'&pageNo='+pageNo+'&sl='+sl+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	document.getElementById('listing').innerHTML='<img src="http://busneeds.com/images/loading2.gif" border="0"/>';
	httpB1.onreadystatechange = handleDeleteB1;
	httpB1.send(null);	
}
function listCasinoCokkie(cb_name,id,company_id,ts,total)
{	
	passingUrl='http://busneeds.com/ajaxListCasinoCokkie.php?cb_name='+cb_name+'&id='+id+'&ts='+ts+'&total='+total+'&company_id='+company_id+'&sid='+Math.random();
	httpB1.open('get', passingUrl);
	httpB1.onreadystatechange = handleDeleteB2;
	httpB1.send(null);	
}
/*function checkQuote(val)
{
	if(val=='2')
	{
		if(document.getElementById('companyCount').value=='0')
		{
			alert("No Search Result found. Please go with another Search");
			return false;
		}
		if(document.getElementById('quoteCount_2').value=='0')
		{
			alert("No Company selected for Quoting. Please select atleast One Company.");
			return false;
		}
		return true;
	}
	if(val=='1')
	{
		if(document.getElementById('companyCount').value=='0')
		{
			alert("No Search Result found. Please go with another Search");
			return false;
		}
		if(document.getElementById('quoteCount').value=='0')
		{
			alert("No Company selected for Quoting. Please select atleast One Company from listing.");
			return false;
		}
		return true;
	}
}*/
