over = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("over"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", over);


var d=document; 
 
 function SetCookie( Name, Value, Expire ) 
 { 
 document.cookie = Name + "=" + escape( Value ) ; 
 } 
 
 function WriteCookies() 
 { 
var d=document; 
SetCookie( "Country", d.getElementById('Country').value ); 
SetCookie( "Category",  d.getElementById('Category').value ); 
SetCookie( "PriceSearchRange",  d.getElementById('PriceSearchRange').value ); 
SetCookie( "No_Bedrooms",  d.getElementById('No_Bedrooms').value ); 
SetCookie( "Area",  d.getElementById('Area').value ); 
 } 
 
  
 function GetValue( Offset ) 
 { 
 var End = document.cookie.indexOf (";", Offset); 
 if( End == -1 ) 
 End = document.cookie.length; 
 return unescape( document.cookie.substring( Offset, End) ); 
 } 
  
 function GetCookie( Name ) 
 { 
 var Len = Name.length; 
  
 var i = 0; 
 while( i < document.cookie.length ) 
 { 
 var j = i + Len + 1; 
 if( document.cookie.substring( i, j) == (Name + "=") ) 
 return GetValue( j ); 



 i = document.cookie.indexOf( " ", i ) + 1; 
 if( i == 0) 
 break; 
 } 
 var a = ""; 
 return a; 

 } 
 


function GetCookies() 
 { 

 var tmpCountry = GetCookie( "Country"); 
 var tmpCategory = GetCookie( "Category" ); 
 var tmpPriceSearchRange = GetCookie("PriceSearchRange");
 var tmpNo_Bedrooms = GetCookie("No_Bedrooms"); 
var tmpArea = GetCookie("Area"); 


 if (tmpCountry) {  
 d.getElementById('Country').value = tmpCountry; 
 }

 if (tmpCategory) { 
 d.getElementById('Category').value = tmpCategory; 
 } 

 if (tmpPriceSearchRange) { 
 d.getElementById('PriceSearchRange').value = tmpPriceSearchRange; 
 } 

 if (tmpNo_Bedrooms) { 
 d.getElementById('No_Bedrooms').value = tmpNo_Bedrooms; 
 } 
   
 if (tmpArea) { 
 d.getElementById('Area').value = tmpArea; 
 } 

 }







