<!-- // Hide script from old browsers


function saveCookie(cookie_name,cookie_value) {

	var cookie_domain = "";
	var cookie_path = "/";
	var cookie_date = new Date();
	var cookie_secure = false;

	cookie_date.setHours(23);
	cookie_date.setMinutes(59);
	cookie_date.setSeconds(59);
	
	setCookie(cookie_name,cookie_value,cookie_date,cookie_path,cookie_domain,cookie_secure);
	return true;
	}

function setCookie(as_name, as_value, obj_expires, as_path, as_domain, ab_secure) {

	/* ======================================================================
	FUNCTION:	setCookie 
	INPUT: 		as_name (string)	: the name of the cookie to create
				as_value (string)	: the value of the cookie;
	   			obj_expires (object) 	: (optional) the date the cookie expires 
	   			as_path (string)	: (optional) the path the cookie is valid for
				as_domain (string)	: (optional) the domain the cookie is valid for
				ab_secure (boolean)	: (optional) if true cookie can only be sent via secure link
	RETURN:	Nothing
	DESC:		This function creates a cookie 
	====================================================================== */

	var ls_cookie_value = "";
	var exp = new Date();
	var nowPlusOneWeek = exp.getTime() + (7 * 24 * 60 * 60 * 1000);
	exp.setTime(nowPlusOneWeek);
	

	ls_cookie_value = as_name + "=" + escape(as_value); 
    
    //****** Not setting the expire date will expire the cookie
    //****** when the user's session ends.
    //Expiration date must be set for certain versions of IE 4.
    //When opening the Add To Cart window a new session is created
    //which requires that cookies actually be written to the user's
    //hard drive, so the session of the parent can see the cookie.
    //The code to determine which browser is running is in global.js
    if (is.ie4)
        {
	    if ((obj_expires != null) && (obj_expires != "")) {
		    ls_cookie_value = ls_cookie_value + "; expires=" + obj_expires.toGMTString();
		    }
        }
        
   	if ((obj_expires != null) && (obj_expires != "")) {
		ls_cookie_value = ls_cookie_value + "; expires=" + obj_expires.toGMTString();		
	} else {
		ls_cookie_value = ls_cookie_value + "; expires=" + exp.toGMTString();
		}
        

	if ((as_path != null) && (as_path != "")) {
		ls_cookie_value = ls_cookie_value + "; path=" + as_path;
		}

	if ((as_domain != null) && (as_domain != "")) {
		ls_cookie_value = ls_cookie_value + "; domain=" + as_domain;
		}

	if ((ab_secure != null) && (ab_secure != "") && (ab_secure == true)) {
		ls_cookie_value = ls_cookie_value + "; secure";
		}

	document.cookie = ls_cookie_value;
	return true;
	}

function getCookie(as_name) {

	/* ======================================================================
	FUNCTION: getCookie 
	INPUT: 	as_name (string)		: the name of the cookie to read
	RETURN:	(string) value of the cookie
	DESC:		This function reads a cookie
	====================================================================== */

	var ls_cookie_identifier = as_name + "=";
	var ls_cookie_value = document.cookie;
	var li_start = 0;
	var li_end = 0;
	var ls_cookie_delimeter = ";";

	if (ls_cookie_value == null) {
		ls_cookie_value = "";
		}

	if (ls_cookie_value.length > 0) {                  
		
		li_start = ls_cookie_value.indexOf(ls_cookie_identifier);       
    		
    	if (li_start != -1) {
			
			li_start = li_start + ls_cookie_identifier.length;
			li_end = ls_cookie_value.indexOf(ls_cookie_delimeter, li_start);      
			
			if (li_end == -1) {
				
				li_end = ls_cookie_value.length;
				}
     			
     			ls_cookie_value = unescape(ls_cookie_value.substring(li_start, li_end));    
				return ls_cookie_value;
			}   
		}  
	
	return "";
	}

function delCookie(as_name, as_path, as_domain) {  

	/* ======================================================================
	FUNCTION: delCookie 
	INPUT: 	as_name (string)		: the name of the cookie to read
	   		as_path (string)		: (optional) the path the cookie is valid for
				as_domain (string)	: (optional) the domain the cookie is valid for
	RETURN:	Nothing
	DESC:		This function deletes a cookie by setting the expiration date to
				a date in the past
	====================================================================== */

	if (getCookie(as_name)) {
    		
		var expires = new Date("Thu, 01-Jan-73 00:00:01 GMT");
		var value = "";
		setCookie(as_name,value,expires,as_path,as_domain);
		}
	
	return;
	}


// End hiding script from old browsers -->

