//For setting car location before submiting form
function selectLocationOk(index,updUrl){
	var ObjPickUpLoc	= document.getElementById('PickUpLocation_' + index);
	if (ObjPickUpLoc.options[ObjPickUpLoc.selectedIndex].value == -1){
		alert ("You most select a pick up location.");
		ObjPickUpLoc.focus();
		return false;
	}
	var ObjDropUpLoc	= document.getElementById('DropUpLocation_' + index);
	if (ObjDropUpLoc.options[ObjDropUpLoc.selectedIndex].value == -1){
		alert ("You most select a Drop up location.");
		ObjDropUpLoc.focus();
		return false;
	}		
	if (updUrl == true){
		//update locations in url
		pickUpLocation 	= document.getElementById('PickUpLocation_' + index);
		dropUpLocation 	= document.getElementById('DropUpLocation_' + index);
		vPickLocation	= pickUpLocation.options[pickUpLocation.selectedIndex].value;
		vDropLocation	= dropUpLocation.options[dropUpLocation.selectedIndex].value;
		
		locations	 	= document.getElementById('locations');
		locations.value	= vPickLocation + vDropLocation;
		//var url 	 	= document.getElementById(nameUrl);
		//var vUrl		= url.value;
		//var Pos1 	 	= vUrl.indexOf('<LOCATIONS>') + 11;
		//var Pos2 	 	= vUrl.indexOf('</LOCATIONS>');
		//url.value 		= vUrl.substring (0, Pos1) + vPickLocation + vDropLocation + vUrl.substring(Pos2);	
	}
	return true;
}
