function searchIn(path)
{
	if (path == null)
		path="./";
	document.write('<tr>	<form name="LinkFrm"><td align="right" bgcolor="#075180" height=30 class="search" colspan="2">');
	document.write('	<b>Search In:</b>');
	document.write('	&nbsp;');
	document.write('	<select name="lstSearch" onchange="changeDetails(this)" class="flat">');
	document.write('		<option value="NA" selected>--------- Select ---------');
	document.write('		<option value="inbound">Inbound Tours');
	document.write('		<option value="outbound">Outbound Tours');
	document.write('		<option value="domestic">Domestic Packages');
	document.write('		<option value="hotels">Hotels in India');
	document.write('		<option value="airtickets">Air Tickets');
	//document.write('		<option value="submitsite">Submit Site');
	document.write('	</select>');
	document.write('	&nbsp;	&nbsp;');
	document.write('	<b>Options:</b>');
	document.write('');
	document.write('	<select name="lstDetails" onfocus="noOpt()" onchange="linkTo(this.value,\''+path+'\')" class="flat">');
	document.write('		<option value="NA" selected>- Select -</option>');
	document.write('	</select>&nbsp;&nbsp;');
	document.write('	</font>	</td></form>	</tr>');
	document.write('  <tr> <td bgcolor="#C0C0C0" height="25" align="center" class="links" colspan="2"><a href="'+path+'index.html" class=links title="Travelers Hub"><b>Home</b></a> |  <a href="'+path+'india-travel-tips.html" class=links title="Travel Tips"><b>Travel Tips</b></a> |  <a href="'+path+'why-india-travel.html" class=links title="Why Travel India with Travelers Hub!"><b>Why       Travel India with Travelers Hub!</b></a> | <a href="http://palaceonwheels.travelershub.com/online-booking.html" class=links title="Online Reservation for Palace on Wheels" target="_blank"><b>Online  Reservation for Palace on Wheels Train in India</b></a></td></tr>');
}

function noOpt()
{
	if (document.LinkFrm.lstSearch.value == "NA")
	{
		alert("Please Select Some Option to Proceed!!");
		document.LinkFrm.lstSearch.focus();
	}
}

/*		function toggleSelectBoxes(arg) {
		var n = document.getElementsByTagName('select');
		for(var i=0;i<n.length;i++) n[i].style.visibility = (arg=='hide') ? 'hidden' : 'visible';
		} */

var _aDetails = new Array(
	new Array("InBound", new Array("Adventure Tours","Wildlife Tours","Art and Culture Tours","Festival Tours","Group Tours","Heritage Tours","City and State Stopovers","Tours To India"), new Array("inbound/adventure-tours.html","inbound/wild-life.html","inbound/art-culture-tours.html","inbound/festival-tours.html","inbound/group-tours.html","inbound/heritage-tours.html","inbound/city-stopovers.html","inbound/itineraries/index.html")),new Array("OutBound", new Array("World Tour","Holiday in Europe","Trip to America","Holiday in South East Asia","Asia Tours","Africa Tours","Australia Tours","Caribbean Tours","Central America Tours","Middle East Tours","North America Tours","South America Tours", "South Pacific Tours", "Central Asia Tour", "Russia Tour"/*,"Featured Links"*/), new Array("outbound/index.html","outbound/holiday-in-europe.html","outbound/trip-to-america.html","outbound/holiday-in-south-east-asia.html","outbound/asia-tour.html","outbound/africa-tour.html","outbound/australia-tour.html","outbound/caribbean-tour.html","outbound/central-america-tour.html","outbound/middle-east-tour.html","outbound/north-america.html","outbound/south-america-tour.html","outbound/south-pacific.html","outbound/central-asia-tour.html","outbound/russia.html"/*,"outbound/Featured Links"*/)),new Array("Domestic", new Array("Adventure Escapades","Health Retreats","Nature Breaks","Serene Holidays","Weekend Getaways","Historical Places in India"/*,"Featured Links"*/), new Array("domestic/adventure-escapades.html","domestic/health-retreats.html","domestic/nature-breaks.html","domestic/serene-holiday.html","domestic/weekend-gateways.html","domestic/historical-places-in-india.html"/*,"Featured Links"*/)),new Array("Hotels", new Array("Hotels in Delhi", "Hotels in Mumbai", "Hotels in Chennai", "Hotels in Kolkata", "Hotels in Agra-Taj Mahal", "Hotels in Bangalore","Hotels in Goa","Hotels in Kerala", "Hotels in Jaipur", "more..."/*,"Featured Links"*/), new Array("hotels/delhi/index.html", "hotels/mumbai/index.html", "hotels/chennai/index.html", "hotels/kolkata/index.html", "hotels/agra/index.html", "hotels/bangalore/index.html", "hotels/goa/index.html", "hotels/kerala/index.html", "hotels/jaipur/index.html", "hotels/hotels-in-india.html"/*,"Featured Links"*/)),new Array("AirTickets", new Array("Flights to Goa", "Flights to Delhi", "Flights to Mumbai", "Flights to Kolkata","Flights to Bangalore India", "International Flights"/*,"Featured Links"*/), new Array("air-tickets/flights-to-goa.html", "air-tickets/flights-to-delhi.html", "air-tickets/flights-to-mumbai.html", "air-tickets/flights-to-kolkata.html","air-tickets/flights-to-bangalore.html", "air-tickets/international-flights.html"/*,"Featured Links"*/)), new Array("SubmitSite", new Array("Submit Site"),new Array("submit-site.html")), new Array("Others", new Array("")));

function changeDetails(objState)
{
	var _strStateToSearch = objState.value.toUpperCase();
	//alert(objState.value.toUpperCase());
	
	if ( _strStateToSearch == "OTHER" ){
		  //window.document.forms[0].txiStateOther.focus();
	}else{
		for (var i=0;i<_aDetails.length;i++){
			if ( _strStateToSearch == _aDetails[i][0].toUpperCase() ){
					window.document.forms[0].lstDetails.length=0;
					addToList(window.document.forms[0].lstDetails,"- Select -","NA");
					for (var k=0;k<_aDetails[i][1].length;k++)
					{
						addToList(window.document.forms[0].lstDetails,_aDetails[i][1][k],_aDetails[i][1][k]); 
					}
					//addToList(window.document.forms[0].lstDetails,"Other","Other"); 
					break;
			}
		}
	}
}

//generic function to add items to a drop down list box.
function addToList(listField, newText, newValue) {
var Found = false;
		for (var f=0;f<listField.length ;f++) {
				if (newValue == listField[f].value) {
					Found = true;
					break;
				}
		}
		if (!Found) {
		  var len = listField.length++; 
		  listField.options[len].value = newValue;
		  listField.options[len].text = newText;
		  listField.selectedIndex = 0; 
		}
}

function linkTo(strValueToSearch,path)
{
	if (path==null)	path="./";
	for (var i=0;i<_aDetails.length;i++)
	{
		for (var j=0;j<_aDetails[i][1].length;j++)
		{
			if (strValueToSearch == _aDetails[i][1][j])
			{
				window.location = path + _aDetails[i][2][j]
			}	//addToList(window.document.forms[0].lstDetails,_aDetails[i][1][k],_aDetails[i][1][k]); 
		}
			//addToList(window.document.forms[0].lstDetails,"Other","Other"); 					
			//break;
	}
}


