//This file sets the navigation preferences in cookies on the users hard drive.
//The homePage variable should be set to whatever url the navigation exists at, so that
//the script can reload the navigation page after preferences have been changed

var homePage = "http://www.ddb.com/index.html"


//Function to set cookies when called from the form
function set_cookies(){
 
 //Setting a date well in the future to make sure the cookies don't expire between sessions
 var expiry = new Date("January 1, 3000");
 expiry = expiry.toGMTString();
 
 //Get the boolean values from appropriate form elements
 var Link = new Array()
 for (var i=0; i <= document.navPrefs.elements.length-1;i++)
 {Link[i] = document.navPrefs.elements[i].checked}

 //Write the cookies and the expiry dates
 
 for(i in linkStatus)
 {
 document.cookie = "Link"+ i +"="+ Link[i] + "; expires=" + expiry;
 }

 //Reload the window to allow navigation changes to load
 window.location.href = homePage;
}
//ends set cookies()


