<!--
// Swap Image
function swapImage(picPath)
{
	document.images['Image'].src = picPath;
}

// Open JS Window
function showImage()
{
	Window = window.open(document.images['Image'].src, '', 'scrollbars=yes,resizable=yes,toolbar=no,menubar=no,width=600,height=400,left=50,top=50');
	Window.focus();
}

// Check min and max price values
function changeMaxQS(myObj,myVar)
{
   if (document.forms[myVar].QuickSearch_PriceMin && document.forms[myVar].QuickSearch_PriceMax) 
   {
   	minAmount = document.forms[myVar].QuickSearch_PriceMin.selectedIndex;
   	maxAmount = document.forms[myVar].QuickSearch_PriceMax.selectedIndex;	
   	intMaximum = (document.forms[myVar].QuickSearch_PriceMin.length)
   	
   	if (maxAmount > 0){
   		if (minAmount >= maxAmount){
      // this copes with the exception where they choose the maximum amount possible for the minimum price
   			if (minAmount == intMaximum){
   				document.forms[myVar].QuickSearch_PriceMax.selectedIndex = 0;
   			}
   			else {
   				document.forms[myVar].QuickSearch_PriceMax.selectedIndex = (minAmount);
   			}
   		}
   	}
   }
}

function changeMinQS(myObj,myVar)
{
   if (document.forms[myVar].QuickSearch_PriceMin && document.forms[myVar].QuickSearch_PriceMax) {
   	minAmount = document.forms[myVar].QuickSearch_PriceMin.selectedIndex;
   	maxAmount = document.forms[myVar].QuickSearch_PriceMax.selectedIndex;
   	if (maxAmount > 0){
   		if (maxAmount <= minAmount){
   			document.forms[myVar].QuickSearch_PriceMin.selectedIndex = (maxAmount);
   		}
   	}
   }
}

// Check min and max price values
function changeMaxAS(myObj,myVar)
{
   if (document.forms[myVar].PriceMin && document.forms[myVar].PriceMax) 
   {
   	minAmount = document.forms[myVar].PriceMin.selectedIndex;
   	maxAmount = document.forms[myVar].PriceMax.selectedIndex;	
   	intMaximum = (document.forms[myVar].PriceMin.length)
   	
   	if (maxAmount > 0){
   		if (minAmount >= maxAmount){
      // this copes with the exception where they choose the maximum amount possible for the minimum price
   			if (minAmount == intMaximum){
   				document.forms[myVar].PriceMax.selectedIndex = 0;
   			}
   			else {
   				document.forms[myVar].PriceMax.selectedIndex = (minAmount);
   			}
   		}
   	}
   }
}

function changeMinAS(myObj,myVar)
{
   if (document.forms[myVar].PriceMin && document.forms[myVar].PriceMax) {
   	minAmount = document.forms[myVar].PriceMin.selectedIndex;
   	maxAmount = document.forms[myVar].PriceMax.selectedIndex;
   	if (maxAmount > 0){
   		if (maxAmount <= minAmount){
   			document.forms[myVar].PriceMin.selectedIndex = (maxAmount);
   		}
   	}
   }
}

// Check min and max price values
function changeBedsMaxQS(myObj,myVar)
{
   if (document.forms[myVar].QuickSearch_BedroomsMin && document.forms[myVar].QuickSearch_BedroomsMax) 
   {
   	minAmount = document.forms[myVar].QuickSearch_BedroomsMin.selectedIndex;
   	maxAmount = document.forms[myVar].QuickSearch_BedroomsMax.selectedIndex;	
   	intMaximum = (document.forms[myVar].QuickSearch_BedroomsMin.length)
   	
   	if (maxAmount > 0){
   		if (minAmount >= maxAmount){
      // this copes with the exception where they choose the maximum amount possible for the minimum price
   			if (minAmount == intMaximum){
   				document.forms[myVar].QuickSearch_BedroomsMax.selectedIndex = 0;
   			}
   			else {
   				document.forms[myVar].QuickSearch_BedroomsMax.selectedIndex = (minAmount);
   			}
   		}
   	}
   }
}

function changeBedsMinQS(myObj,myVar)
{
   if (document.forms[myVar].QuickSearch_BedroomsMin && document.forms[myVar].QuickSearch_BedroomsMax) {
   	minAmount = document.forms[myVar].QuickSearch_BedroomsMin.selectedIndex;
   	maxAmount = document.forms[myVar].QuickSearch_BedroomsMax.selectedIndex;
   	if (maxAmount > 0){
   		if (maxAmount <= minAmount){
   			document.forms[myVar].QuickSearch_BedroomsMin.selectedIndex = (maxAmount);
   		}
   	}
   }
}

// Check min and max price values
function changeBedsMaxAS(myObj,myVar)
{
   if (document.forms[myVar].BedroomsMin && document.forms[myVar].BedroomsMax) 
   {
   	minAmount = document.forms[myVar].BedroomsMin.selectedIndex;
   	maxAmount = document.forms[myVar].BedroomsMax.selectedIndex;	
   	intMaximum = (document.forms[myVar].BedroomsMin.length)
   	
   	if (maxAmount > 0){
   		if (minAmount >= maxAmount){
      // this copes with the exception where they choose the maximum amount possible for the minimum price
   			if (minAmount == intMaximum){
   				document.forms[myVar].BedroomsMax.selectedIndex = 0;
   			}
   			else {
   				document.forms[myVar].BedroomsMax.selectedIndex = (minAmount);
   			}
   		}
   	}
   }
}

function changeBedsMinAS(myObj,myVar)
{
   if (document.forms[myVar].BedroomsMin && document.forms[myVar].BedroomsMax) {
   	minAmount = document.forms[myVar].BedroomsMin.selectedIndex;
   	maxAmount = document.forms[myVar].BedroomsMax.selectedIndex;
   	if (maxAmount > 0){
   		if (maxAmount <= minAmount){
   			document.forms[myVar].BedroomsMin.selectedIndex = (maxAmount);
   		}
   	}
   }
}
//-->
