// Heartland Siding - Main Navigation - Horizontal Top - Section Function

days_expire = 100;

function set_section(value) {
	// This really should have come from the db.
	switch(value)
	{
	case "homeowner":
	  contacttypeID = 1;
	  break;
	case "distributor":
	  contacttypeID = 2;
	  break;
	case "remodeler":
	  contacttypeID = 3;
	  break;
	case "builder":
	  contacttypeID = 4;
	  break;
	case "architect":
	  contacttypeID = 6;
	  break;
	case "international":
	  contacttypeID = 11;
	  break;
	default:
	  // this should never happen.
	}

	var date = new Date();
	date.setTime(date.getTime()+(days_expire*24*60*60*1000));
	var expires = "expires="+date.toGMTString();

	document.cookie = "section="+value+"; "+expires+"; path=/";
	document.cookie = "contacttypeID="+contacttypeID+"; "+expires+"; path=/";
	//alert("section="+value+"; "+expires+"; path=/");
}