 sfHover = function() {
 	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
 	for (var i=0; i<sfEls.length; i++) {
 		sfEls[i].onmouseover=function() {
 			this.className+=" sfhover";
 		}
 		sfEls[i].onmouseout=function() {
 			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
 		}
 	}
 }
 if (window.attachEvent) window.attachEvent("onload", sfHover);


var d=document; 
 
 function SetCookie( Name, Value, Expire ) 
 { 
 document.cookie = Name + "=" + escape( Value ) ; 
 } 
 
 function WriteCookies() 
 { 
var d=document; 

SetCookie( "Main_Use", d.getElementById('Main_Use').value ); 
SetCookie( "Category", d.getElementById('Category').value ); 
SetCookie( "Size",  d.getElementById('Size').value ); 
SetCookie( "Colour",  d.getElementById('Colour').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 tmpMain_Use = GetCookie( "Main_Use" ); 
 var tmpCategory = GetCookie( "Category" ); 
 var tmpSize = GetCookie( "Size" ); 
 var tmpColour = GetCookie( "Colour" ); 


 
 if (tmpMain_Use) {  
 d.getElementById('Main_Use').value = tmpMain_Use; 
 }
  if (tmpCategory) { 
 d.getElementById('Category').value = tmpCategory; 
 } 
 if (tmpSize) { 
 d.getElementById('Size').value = tmpSize; 
 } 
 if (tmpColour) { 
 d.getElementById('Colour').value = tmpColour; 
 } 


   
 }

