// {literal}
// ^ tag added for Smarty Engine compat - 08.06.04 - keith@pi dash squared.co.za
//cookie script

	function setCookie(name, value, expire)
	// CREATE COOKIE STRING WITH NAME, VALUE, AND EXPIRY PERIOD (in seconds)
	{
	//variables
	var cookie_today = new Date();
	var expires = new Date();
	 expires.setTime(cookie_today.getTime() + 1000*expire);
	 document.cookie = name + '=' + escape(value) + '; path=/; expires=' + expires.toGMTString();
	}
	
	function getCookie(Name,deflt)
	// RETRIEVE COOKIES FROM BROWSER, SET deflt DEFAULT VALUE IF IT IS NOT FOUND
	{
	 var search = Name + '=';
	 if (document.cookie.length > 0)
	 {
	  offset = document.cookie.indexOf(search);
	  if (offset != -1)
	  {
	   offset += search.length;
	   end = document.cookie.indexOf(';', offset);
	   if (end == -1)
	   { end = document.cookie.length; }
	   valueout = unescape(document.cookie.substring(offset, end));
	   return valueout;
	  }
	  else
	   return deflt;
	 }
	 else
	  return deflt;
	}
//end cookie script
// {/literal}

