
net=document.layers
iexp=document.all
var var1=0
var var2=1
var var3=""
var temp = ""
var formindex = ""
	
function RegChange()
{ 
		
	if (document.layers)
	{
		formindex=document.frmProperty_Listing.SubCategory.selectedIndex;
		if (formindex > 0)
			temp=document.frmProperty_Listing.SubCategory.options[formindex].value;
	}
	else 
	{
		temp=document.frmProperty_Listing.SubCategory.value;
	}
			
	if (temp.toLowerCase()=="rpg:paying guest")
	{
		showChoice("choice2");
	}
	else if((temp.toLowerCase()=="rap:apartment") || (temp.toLowerCase()=="rbv:bungalow/villa") || (temp.toLowerCase()=="rrh:row house"))
	{
		showChoice("choice1");
	}
		
	else
	{
		showChoice("choice3");						
	}
	type=document.frmProperty_Listing.Category.value;
	if (type != "residential")
	{
		
	}
}

function showChoice(aa)
{
				
	if(aa=="choice1" && iexp)				
	{
		var1=1
		document.frmProperty_Listing.txtNoOfBedroom.disabled=false
		document.frmProperty_Listing.cbPGPref.disabled=true																
	}
	
					
	if(aa=="choice2" && iexp)				
	{
		var1=1
		document.frmProperty_Listing.cbPGPref.disabled=false
		document.frmProperty_Listing.txtNoOfBedroom.disabled=true		
	}
	if(aa=="choice3")
	{
		document.frmProperty_Listing.txtNoOfBedroom.disabled=true
		document.frmProperty_Listing.cbPGPref.disabled=true
	}
	
					
					
	//For Netscape
	if(aa=="choice1" && net)				
	{		
		var2=0							
		var3="choice1"																				
	}					
	if(aa=="choice2" && net)				
	{
		var2=0
		var3="choice2"
	}
	if(aa=="choice3" && net)				
	{	
		var2=0
		var3="choice3"
	}
}					
function EnbaleCtl()
{
	if(iexp && var1==0)
	{	
		document.frmProperty_Listing.txtNoOfBedroom.disabled=true	
		document.frmProperty_Listing.cbPGPref.disabled=true		
	}
	
	//Netscape
					
	if(net && var2==0)
	{
		 if(var3=="choice1")
		 {
			document.frmProperty_Listing.cbPGPref.blur()
			
		 }
		 if(var3=="choice2")
		 {
			document.frmProperty_Listing.txtNoOfBedroom.blur()
			
		 }
		 if(var3=="choice3")
		 {
			document.frmProperty_Listing.txtNoOfBedroom.blur()
			document.frmProperty_Listing.cbPGPref.blur()
		 }
	}
	else
	{
		document.frmProperty_Listing.txtNoOfBedroom.blur()
		 document.frmProperty_Listing.cbPGPref.blur()
		 
	}
}


// mod 2

function valueGetter()	
{
	var checkedButton = ""
   for (var i = 0; i < document.frmProperty_Listing.rdTransaction.length; i++) 
   {
    if (document.frmProperty_Listing.rdTransaction[i].checked=="1") 
    
		{
         checkedButton=document.frmProperty_Listing.rdTransaction[i].value
		
		
			if (checkedButton == "1")
			{
				//alert("eunice" + checkedButton );
		for (var i = 0; i < document.frmProperty_Listing.rdIntGroup.length; i++) 
			{
				document.frmProperty_Listing.rdIntGroup[0].checked = 0 
				document.frmProperty_Listing.rdIntGroup[0].disabled = true
				document.frmProperty_Listing.rdIntGroup[1].disabled = false
				//alert("eunice" + document.frmProperty_Listing.rdIntGroup[i].value + "<-->" + i );
			}
			}
			else if(checkedButton == "0")
			
			{
				//alert("tasneem" + checkedButton );
				
		for (var i = 0; i < document.frmProperty_Listing.rdIntGroup.length; i++) 
			{	
				//alert("tasneem" + checkedButton + "<-->" + i );
				document.frmProperty_Listing.rdIntGroup[1].checked = 0   
				document.frmProperty_Listing.rdIntGroup[0].disabled = false
				document.frmProperty_Listing.rdIntGroup[1].disabled = true
				
				//alert("tasneem" + document.frmProperty_Listing.rdIntGroup[i].value + "<-->" + i );
				
				 
			}
			}
		}
   }
	
}

