//------------------------------------------------------------------------
 function selectCharterRoom(RoomCat)
 {
 	//alert("Start");
 	//frm=document.forms[2];
 	frm=document.RoomCat;

 	//alert("forms length " + document.forms.length); 
	//alert("length " + frm.RADIOVAL.length); 	 	
 	radiochk = false;
	
	//if (typeof(document.airHotelSelection.XDB.length) == "undefined")
	if(typeof(frm.RADIOVAL.length) == "undefined")
	{
		// Isolate the n'th radio button
    	el = frm.RADIOVAL;
		
    	// See if it was selected
    	radiochk = radiochk || el.checked;
	}
	else
	{
		
		for ( n = 0; n < frm.RADIOVAL.length; n++ ) {

	
    		// Isolate the n'th radio button
    		el = frm.RADIOVAL[n];
			//alert("e1 " + el);
    		// See if it was selected
    		radiochk = radiochk || el.checked;

		}
	
		if(radiochk)
		frm.submit();
	}
  if ( !radiochk ) {
    alert("Please select a hotel to check for available room categories.");
    return false;
  }
  else
  	frm.submit();
  //alert("radiochk " + radiochk);
 	return radiochk;
 }

//---------------------------------------------------------------------------
 
 function clearRadios(RoomCat) {
 	//alert("clearing mines");
 	frm=document.forms[2];
 	try{
	for (i = 0; i < frm.RADIOVAL.length; i++) {
		frm.RADIOVAL[i].checked = false;
	}
	}catch(Exp){}
}
//---------------------------------------------------------------------------
  function checkCompare(COMPARE){
  	//alert("Compare");
	frm=document.COMPARE;
	var bCheck = false;
 	try{
 		if(document.COMPARE.ALTER_DATES.checked)
 			bCheck=true;
 		
	for (i = 0; i < frm.ALTER_DATES.length; i++) {
		if(frm.ALTER_DATES[i].checked == true){
			bCheck =  true;
			break;
		}
	}
	}catch(Exp){}
		if(bCheck== false){
			alert("Please select the dates to compare");
			return false;
		}
 /*
    if(frm.duration6.length == undefined)
  	{
  		//alert("only 1 option");
  		if(frm.duration6.checked == true){
			bCheck =  true;
		}
  	}
  	else
  	{
  		
		try{
		for (i = 0; i < frm.duration6.length; i++) {
			if(frm.duration6[i].checked == true){
				bCheck =  true;
			}
		}
		}catch(Exp){}
	}
	if(frm.duration5.length == undefined)
  	{
  		//alert("only 1 option");
  		if(frm.duration5.checked == true){
			bCheck =  true;
		}
  	}
  	else
  	{
  		
		try{
		for (i = 0; i < frm.duration5.length; i++) {
			if(frm.duration5[i].checked == true){
				bCheck =  true;
			}
		}
		}catch(Exp){}
	}	
	*/
  	return bCheck;
}




//---------------------------------------------------------------------------
	function submitDetail(paramValue){
 	frm=document.RoomCat;

	
	//alert(paramValue);
	frm.action="QQRoomSelection?element="+paramValue;
	frm.submit();	
		
	}
//---------------------------------------------------------------------------
	function submitAirOnly(paramValue){
		frm=document.RoomCat;
		//alert(paramValue);
	//	re = /\~/i;
	//	str = "@";

	//	newstr=paramValue.replace(re, str);
		//alert(newstr);
		frm.action=paramValue;
		frm.submit();
		
	}
