//
//	setCookie.js
//
//	Set a cookie to a value.
//	Expire a cookie
//
//	Author: pky
//
//	Copyright (c) ZePortal.com Ltd, 2001-2002. All Rights Reserved.
//

function setCookie(name,value,expires,path,domain,secure) {
	document.cookie = 	name + "=" + escape(value) +
						((expires)? ("; expires="+expires.toGMTString()) : "") +
						"; path="+((path)? path : "/") +
						"; domain="+((domain)? domain : document.domain) +
						((secure)? "; secure" : "");

}

function expireCookie(name) {
	var expiry = new Date();

	expiry.setFullYear(expiry.getFullYear()-1);
	setCookie(name,"?",expiry);
}

