function RoomStart( xiRoomControlId,
					xiRoomNoMax,
					xiRoomLabel,
					xiRoomAdultsControlId,
					xiChildControlId,
					xiChildAgeControlId,
					xiChildNoMax,
					xiRoomTypeControlId,
					xiAlternateRoomType,
					xiIsRoomType ){
					
	/*----public variables-----*/
	
	this.mRoomControlId       = xiRoomControlId;       //RoomDropDown Control Id.
	this.mRoomNo              = xiRoomNoMax;           //Room No. Max.
	this.mRoomLabelId         = xiRoomLabel;           //Room Label Id.
	this.mRoomAdultsControlId = xiRoomAdultsControlId; //Adults DropDown Id.
	this.mChildControlId      = xiChildControlId;      //ChildDropDown Id.
	this.mChildAgeControlId   = xiChildAgeControlId;   //ChildAge Control Id.
	this.mChildNo             = xiChildNoMax;          //Child No. Max.
	this.mRoomTypeControlId   = xiRoomTypeControlId;   //RoomType Control Id.
	this.mAlternateRoomType   = xiAlternateRoomType;   //RoomType Label.
	this.mIsRoomType          = xiIsRoomType;          //RoomType is True or False;

	/*---- Intial Control SetUp Start ---- */

	var lRoomControl = document.getElementById(xiRoomControlId);
	if (lRoomControl != null)
	{
		addEvent(lRoomControl,'change',RefreshRoomControl);
	}
	
	var lRoomDropDown          = document.getElementById(xiRoomControlId).selectedIndex;
	var lRoomDropDownSelected  = document.getElementById(xiRoomControlId).options[lRoomDropDown];
	
	var lCount = 0;
	for (lCount = 1 ; lCount <= xiRoomNoMax ; lCount++)
	{
		var llRoomLabelControl = document.getElementById(mRoomLabelId + lCount);
		if(llRoomLabelControl != null)
		{
			llRoomLabelControl.style.display = 'none';
		}
		
		var lRoomAdultsControl = document.getElementById(mRoomAdultsControlId + lCount);
		if(lRoomAdultsControl != null)
		{
			lRoomAdultsControl.style.display = 'none';
			addEvent(lRoomAdultsControl,'change',RefreshRoomControl);
		}
		
		var lChildControl = document.getElementById(mChildControlId + lCount);
		if(lChildControl != null)
		{
			lChildControl.style.display = 'none';
			addEvent(lChildControl,'change',RefreshRoomControl);
		}
		
		var lRoomTypeControl = document.getElementById(mRoomTypeControlId + lCount);
		if(lRoomTypeControl != null)
		{
			addEvent(lRoomTypeControl,'change',ValidationForRoomType);
		}
		
		var lChildCount = 0;
		for (lChildCount = 1 ; lChildCount <= xiChildNoMax ; lChildCount++)
		{
			var lChildAgeControl = document.getElementById(mChildAgeControlId + lCount + lChildCount );
			if (lChildAgeControl != null)
			{
				lChildAgeControl.style.display = 'none';
			}
		}
	}
	for (lCount = 1 ; lCount <= lRoomDropDownSelected.value ; lCount++)
	{
		var llRoomLabelControl = document.getElementById(mRoomLabelId + lCount);
		if (llRoomLabelControl != null)
		{
			llRoomLabelControl.style.display = '';
		}
		
		var lRoomAdultsControl = document.getElementById(mRoomAdultsControlId + lCount);
		if (lRoomAdultsControl != null)
		{
			lRoomAdultsControl.style.display = '';
		}
		
		var lChildControl = document.getElementById(mChildControlId + lCount);
		if (lChildControl != null)
		{
			lChildControl.style.display = '';
		}
		//HideAndShowRoomTypeExtra(lCount);
	}
	HideAndShowChildAgeSection();
	ShowHeader();
	if (mIsRoomType)
	{
		HideAndShowRoomType();
	}
	ValidationForRoomType();
	/* ---- Intial Control SetUp End ---- */
}

function RefreshRoomControl(evt)
{
	if (!evt) evt = event;
	ShowControl();
	HideControl();
	HideAndShowChildAgeSection();
	ShowHeader();
	if (mIsRoomType)
	{
		HideAndShowRoomType();
	}
	var lBrowName   = (navigator.appName);
	var lBrowNo     = parseInt(navigator.appVersion);
	
	if (lBrowNo <= 4)
	{
		var lEventId = evt.srcElement.id;
	}
	else
	{
		var lEventId = evt.target.id;
	}
	
	if (lEventId.search(/Adult/) != -1)
	{
		HideAndShowRoomTypeExtra(lEventId.substr(mRoomAdultsControlId.length,lEventId.length));
	}
	else if(lEventId.search(/Child/) != -1)
	{
		HideAndShowRoomTypeExtra(lEventId.substr(mChildControlId.length,lEventId.length));
	}
	/*else if(lEventId.search(/RoomDropDown/) != -1)
	{
		var lRoomDropDown          = document.getElementById(mRoomControlId).selectedIndex;
		var lRoomDropDownSelected  = document.getElementById(mRoomControlId).options[lRoomDropDown];
		if (lRoomDropDownSelected.value > 1)
		{
			HideAndShowRoomTypeExtra(lRoomDropDownSelected.value);
		}
	}*/
	ValidationForRoomType();
}

function ShowControl()
{
	var lRoomDropDown          = document.getElementById(mRoomControlId).selectedIndex;
	var lRoomDropDownSelected  = document.getElementById(mRoomControlId).options[lRoomDropDown];
	/* --- Adults,Chid,ChildAge and RoomType DropDown Display Starts Here --- */
	
	for (lCount = 1; lCount <= lRoomDropDownSelected.value; lCount++)
	{
		var llRoomLabelControl = document.getElementById(mRoomLabelId + lCount);
		if (llRoomLabelControl != null)
		{
			llRoomLabelControl.style.display = '';
		}
		
		var lRoomAdultsControl = document.getElementById(mRoomAdultsControlId + lCount);
		if (lRoomAdultsControl != null)
		{
			lRoomAdultsControl.style.display = '';
		}
		
		var lChildControl = document.getElementById(mChildControlId + lCount);
		if (lChildControl != null)
		{
			lChildControl.style.display = '';
		}
		
		var lChildDropDown          = lChildControl.selectedIndex;
		var lChildDropDownSelected  = lChildControl.options[lChildDropDown];
		
		var lChildCount = 0;
		for (lChildCount = 1; lChildCount <= lChildDropDownSelected.value; lChildCount++)
		{
			var lChildAgeControl = document.getElementById(mChildAgeControlId + lCount + lChildCount );
			if (lChildAgeControl != null)
			{
				lChildAgeControl.style.display = '';
			}
		}
	}
}

function HideControl()
{
	var lRoomDropDown          = document.getElementById(mRoomControlId).selectedIndex;
	var lRoomDropDownSelected  = document.getElementById(mRoomControlId).options[lRoomDropDown];

	var lNextCount = parseInt(lRoomDropDownSelected.value) + 1;
	for (lCount = lNextCount; lCount <= mRoomNo; lCount++)
	{
		
		var llRoomLabelControl = document.getElementById(mRoomLabelId + lCount);
		if (llRoomLabelControl != null)
		{
			llRoomLabelControl.style.display = 'none';
		}
		
		var lRoomAdultsControl = document.getElementById(mRoomAdultsControlId + lCount);
		if (lRoomAdultsControl != null)
		{
			lRoomAdultsControl.style.display = 'none';
		}
		
		var lChildControl = document.getElementById(mChildControlId + lCount);
		if (lChildControl != null)
		{
			lChildControl.style.display = 'none';
		}
	}
}

function HideAndShowChildAgeSection()
{
	for (lCount = 1 ; lCount <= mRoomNo ; lCount++)
	{
		var lChildControl = document.getElementById(mChildControlId + lCount);
		if(lChildControl != null)
		{
			if(lChildControl.style.display == '')
			{
				var lChildDropDown          = lChildControl.selectedIndex;
				var lChildDropDownSelected  = lChildControl.options[lChildDropDown];
				
				if(lChildDropDownSelected.value > 0)
				{
					for (lChildCount = 1 ; lChildCount <= lChildDropDownSelected.value ; lChildCount++)
					{
						var lChildAgeControl = document.getElementById(mChildAgeControlId + (lCount) + lChildCount );
						if (lChildAgeControl != null)
						{
							lChildAgeControl.style.display = '';
						}
					}
					for (lChildCount = parseInt(lChildDropDownSelected.value) + 1 ; lChildCount <= mChildNo ; lChildCount++)
					{
						var lChildAgeControl = document.getElementById(mChildAgeControlId + (lCount) + lChildCount );
						if (lChildAgeControl != null)
						{
							lChildAgeControl.style.display = 'none';
						}
					}
					
				}
				else
				{
					for (lChildCount = 1 ; lChildCount <= mChildNo ; lChildCount++)
					{
						var lChildAgeControl = document.getElementById(mChildAgeControlId + (lCount) + lChildCount );
						if (lChildAgeControl != null)
						{
							lChildAgeControl.style.display = 'none';
						}
					}
				}
			}
			else
			{
				for (lChildCount = 1 ; lChildCount <= mChildNo ; lChildCount++)
				{
					var lChildAgeControl = document.getElementById(mChildAgeControlId + (lCount) + lChildCount );
					if (lChildAgeControl != null)
					{
						lChildAgeControl.style.display = 'none';
					}
				}
			}
		}
	}
}

function HideAndShowRoomType()
{
	for (lCount = 1 ; lCount <= mRoomNo ; lCount++)
	{
		var lAdultsDropDown          = document.getElementById(mRoomAdultsControlId + lCount).selectedIndex;
		var lAdultsDropDownSelected  = document.getElementById(mRoomAdultsControlId + lCount).options[lAdultsDropDown];
	
		var lChildDropDown           = document.getElementById(mChildControlId + lCount).selectedIndex;
		var lChildDropDownSelected   = document.getElementById(mChildControlId + lCount).options[lChildDropDown];
		
		var lTotal = parseInt(lAdultsDropDownSelected.value + lChildDropDownSelected.value);
		var lRoomTypeControl            = document.getElementById(mRoomTypeControlId + lCount);
		var lAlternateRoomTypeControl   = document.getElementById(mAlternateRoomType + lCount);
		if(document.getElementById(mRoomAdultsControlId + lCount).style.display == '' ||
		 document.getElementById(mChildControlId + lCount).style.display == '')
		 {
			switch(lTotal)
			{
				case 10:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[1],mRoomTypeNames[1]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[1];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 11:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 12:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 20:
				{
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 21:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
						
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 22:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
						
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 30:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[4],mRoomTypeNames[4]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[4];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break;
				}
				case 31:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[5],mRoomTypeNames[5]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[5];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 32:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[15],mRoomTypeNames[15]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[15];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 40:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[5],mRoomTypeNames[5]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[5];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 41:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[15],mRoomTypeNames[15]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[15];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 42:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[16],mRoomTypeNames[16]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[16];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				default:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.innerHTML = '';
						lAlternateRoomTypeControl.style.display = 'none';
					}
				}
			}
		}
		else
		{
			if(lRoomTypeControl != null)
			{
				lRoomTypeControl.style.display        = 'none';
			}
			if(lAlternateRoomTypeControl != null)
			{
				lAlternateRoomTypeControl.innerHTML = '';
				lAlternateRoomTypeControl.style.display = 'none';
			}
		}
	}
}

function ShowHeader()
{
	var lCount      = 0;
	var lChildCount = 0;
	document.getElementById('ChildAgeHeader').style.display = 'none';
	for (lCount = 1 ; lCount <= mRoomNo ; lCount++)
	{
		for (lChildCount = 1 ; lChildCount <= mChildNo ; lChildCount++)
		{
			var lChildAgeControl = document.getElementById(mChildAgeControlId + (lCount) + lChildCount );
			if (lChildAgeControl != null)
			{
				if(lChildAgeControl.style.display == '')
				{
					document.getElementById('ChildAgeHeader').style.display = '';
				}
			}
		}
	}
}


// Add an event to the obj given
// event_name refers to the event trigger, without the "on", like click or mouseover
// func_name refers to the function callback when event is triggered
function addEvent(obj,event_name,func_name)
{
	if (obj.attachEvent)
	{
		obj.attachEvent("on"+event_name, func_name);
	}
	else if(obj.addEventListener)
	{
		obj.addEventListener(event_name,func_name,true);
	}
	else
	{
		obj["on"+event_name] = func_name;
	}
}

function ClearDropDown(xiDropDown)
{
    var lCityCount = 0;
    var lDropDownLength = xiDropDown.options.length;
    for( lCityCount = 0 ; lCityCount < lDropDownLength ; lCityCount++ )
    {
      xiDropDown.options[0] = null ;
    }
}

function HideAndShowRoomTypeExtra(xiCount)
{
	//for (lCount = 1 ; lCount <= mRoomNo ; lCount++)
	//{
		var lCount = xiCount;
		var lAdultsDropDown          = document.getElementById(mRoomAdultsControlId + lCount).selectedIndex;
		var lAdultsDropDownSelected  = document.getElementById(mRoomAdultsControlId + lCount).options[lAdultsDropDown];
	
		var lChildDropDown           = document.getElementById(mChildControlId + lCount).selectedIndex;
		var lChildDropDownSelected   = document.getElementById(mChildControlId + lCount).options[lChildDropDown];
		
		var lTotal = parseInt(lAdultsDropDownSelected.value + lChildDropDownSelected.value);
		var lRoomTypeControl           = document.getElementById(mRoomTypeControlId + lCount);
		
		var lAlternateRoomTypeControl   = document.getElementById(mAlternateRoomType + lCount);
		if(document.getElementById(mRoomAdultsControlId + lCount).style.display == '' ||
		 document.getElementById(mChildControlId + lCount).style.display == '')
		 {
			switch(lTotal)
			{
				case 10:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[1],mRoomTypeNames[1]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[1];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 11:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
						
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option('Select','0');
						lRoomTypeControl.options[1] = new Option(mRoomTypeNames[3],mRoomTypeNames[3]);
						lRoomTypeControl.options[2] = new Option(mRoomTypeNames[12],mRoomTypeNames[18]);
						lRoomTypeControl.options[3] = new Option(mRoomTypeNames[13],mRoomTypeNames[15]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 12:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
						
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option('Select','0');
						lRoomTypeControl.options[1] = new Option(mRoomTypeNames[4],mRoomTypeNames[4]);
						lRoomTypeControl.options[2] = new Option(mRoomTypeNames[14],mRoomTypeNames[16]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 20:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
						
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option('Select','0');
						lRoomTypeControl.options[1] = new Option(mRoomTypeNames[2],mRoomTypeNames[2]);
						lRoomTypeControl.options[2] = new Option(mRoomTypeNames[3],mRoomTypeNames[3]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 21:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
						
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option('Select','0');
						lRoomTypeControl.options[1] = new Option(mRoomTypeNames[12],mRoomTypeNames[18]);
						lRoomTypeControl.options[2] = new Option(mRoomTypeNames[11],mRoomTypeNames[17]);
						lRoomTypeControl.options[3] = new Option(mRoomTypeNames[4],mRoomTypeNames[4]);
						lRoomTypeControl.options[4] = new Option(mRoomTypeNames[13],mRoomTypeNames[15]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 22:
				{
					if (lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = '';
					
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option('Select','0');
						lRoomTypeControl.options[1] = new Option(mRoomTypeNames[5],mRoomTypeNames[5]);
						lRoomTypeControl.options[2] = new Option(mRoomTypeNames[14],mRoomTypeNames[16]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = 'none';
					}
					break
				}
				case 30:
				{
					if (lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[4],mRoomTypeNames[4]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[4];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break;
				}
				case 31:
				{
					if (lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[5],mRoomTypeNames[5]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[5];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 32:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[15],mRoomTypeNames[15]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[15];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 40:
				{
					if (lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[5],mRoomTypeNames[5]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[5];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 41:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[15],mRoomTypeNames[15]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[15];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				case 42:
				{
					if(lRoomTypeControl != null)
					{
						lRoomTypeControl.style.display = 'none';
						lRoomTypeControl.options[0] = new Option(mRoomTypeNames[16],mRoomTypeNames[16]);
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.style.display = '';
						lAlternateRoomTypeControl.innerHTML = mRoomTypeNames[16];
					}
					else
					{
						lRoomTypeControl.style.display = '';
					}
					break
				}
				default:
				{
					if(lRoomTypeControl != null)
					{
						ClearDropDown(lRoomTypeControl);
						lRoomTypeControl.style.display = 'none';
					}
					if(lAlternateRoomTypeControl != null)
					{
						lAlternateRoomTypeControl.innerHTML = '';
						lAlternateRoomTypeControl.style.display = 'none';
					}
				}
			}
		}
		else
		{
			if(lRoomTypeControl != null)
			{
				ClearDropDown(lRoomTypeControl);
				lRoomTypeControl.style.display        = 'none';
			}
			if(lAlternateRoomTypeControl != null)
			{
				lAlternateRoomTypeControl.innerHTML = '';
				lAlternateRoomTypeControl.style.display = 'none';
			}
		}
}

function ValidationForRoomType()
{
	var lRoomDropDown          = document.getElementById(mRoomControlId).selectedIndex;
	var lRoomDropDownSelected  = document.getElementById(mRoomControlId).options[lRoomDropDown];
	var element = document.forms[0]['lHiddenFieldRoomType'];
	if (element) 
	{
		element.value = '';
	}
	
	for (var lCount = 1 ; lCount <= lRoomDropDownSelected.value ; lCount++)
	{
		var lRoomTypeDropDownControl = document.getElementById(mRoomTypeControlId + lCount);
		if (lRoomTypeDropDownControl.style.display == '')
		{
			var lRoomTypeDropDown          = lRoomTypeDropDownControl.selectedIndex;
			if (lRoomTypeDropDown > -1)
			{
				var lRoomTypeDropDownSelected  = lRoomTypeDropDownControl.options[lRoomTypeDropDown];
				
				if (lRoomTypeDropDownSelected.value == '0')
				{
					element.value = 'Please Select Room Type';
				}
			}
			else
			{
				element.value = 'Please Select Room Type';
			}
		}
	}
}

var mRoomTypeNames = new Array();
mRoomTypeNames[1]="Single";
mRoomTypeNames[2]="Double";
mRoomTypeNames[3]="Twin";
mRoomTypeNames[4]="Triple";
mRoomTypeNames[5]="Quad";
mRoomTypeNames[6]="Studio";
mRoomTypeNames[7]="One bed suite";
mRoomTypeNames[8]="Two bed suite";
mRoomTypeNames[9]="Three bed suite";
mRoomTypeNames[10]="Single";
mRoomTypeNames[11]="Twin + Child";
mRoomTypeNames[12]="Double + Child";
mRoomTypeNames[13]="Family Room";
mRoomTypeNames[14]="Family Room";
mRoomTypeNames[15]="FamilyRoomOneChild";
mRoomTypeNames[16]="FamilyRoomTwoChildren";
mRoomTypeNames[17]="TwinWithChild";
mRoomTypeNames[18]="DoubleWithChild";
