//-----------------------------------------Begin------------------------------------------//
	
	/*		
	===================================================================
	NAME: cookieFunctions.js
	TYPE: javascript (User Defined Functions)
	VERSION: 1.05.10.22
	CREATED ON: 10/20/05
	AUTHOR: Dean Dal Bozzo, dean@pagefx.com
	===================================================================	

	DESIGNED FOR: When you need to use cookies in a web page.

	DESCRIPTION: Three functions: setCookie, getCookie and deleteCookie

	NOTES: None.

	USAGE: 
		
	ATTRIBUTES: See functions
		
	OUTPUT: 
	
	EXAMPLES:
		setCookie('color','#333333');	Sets the cookie named "color" to the value of "#333333"
		getCookie('color');				Returns the value "#333333" of the cookie named "color". 
		deleteCookie('color');			Set the expires date of the cookie in the past (1/1/70) which will delete the cookie.

	UPDATES: None
	===================================================================
	*/


//--[Set the cookie]--------------------------//
function setCookie(name,value,expires,path,domain,secure){	
	if(expires){
		expiresDte 	= new Date(expires);
		expiresStr	= '; expires=' + expiresDte.toGMTString();
	}else{
		expiresStr	= '';
	}
	
	pathStr		= ((path == null) ? '' : ('; path=' + path));
	domainStr	= ((domain == null) ? '' : ('; domain=' + domain)); 
	secureStr	= ((secure == null) ? '' : ('; secure')); 
		
	document.cookie = name + '=' + escape(value) + expiresStr + pathStr + domainStr + secureStr;
}

//--[Get the cookie]--------------------------//
function getCookie(name){
	var output 		= null;
	var cks			= ' ' + document.cookie + ';';
	var matchCk		= ' ' + name + '=';
	var startPos	= cks.indexOf(matchCk);	
	var endPos;
	if(startPos != -1){
		startPos   += matchCk.length;
		endPos		= cks.indexOf(';', startPos);
		output 		= unescape(cks.substring(startPos, endPos));		
	}
	return output;
}

//--[Delete the cookie]--------------------------//
function deleteCookie(name){
	document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT';
}
//----------------------------------End All-----------------------------------------------//