function delCookie (NameOfCookie) {
	  if (getCookie(NameOfCookie)) {
	  document.cookie = NameOfCookie + "=" +
	   "; expires=Thu, 01-Jan-70 00:00:01 GMT";
	  }
}
function getCookie(NameOfCookie) {
	if (document.cookie.length > 0) {
		begin = document.cookie.indexOf(NameOfCookie+"=");
		if (begin != -1) {
			begin += NameOfCookie.length+1;
			end = document.cookie.indexOf(";", begin);
			if (end == -1) end = document.cookie.length;
			return unescape(document.cookie.substring(begin, end));
		}
	}
	return null;
}
function setCookie(NameOfCookie, value, expireminutes) {
	 var ExpireDate = new Date ();
	 ExpireDate.setTime(ExpireDate.getTime() + (expireminutes * 60 * 1000));
	 document.cookie = NameOfCookie + "=" + escape(value) + "; expires=" + ExpireDate.toGMTString();
}
function addCatNoCookie () {
	var cookieStr='' ;
	var i = 0 ;
	while( eval('document.multiProductForm.catnum' + i ) ) {
		cookieStr += eval('document.multiProductForm.catnum' + i + '.value') + '|';
		i++ ;
	}
	setCookie('orderFormVals',cookieStr,10);
}
function get_cookie(Name) {
	var search = Name + "="
    var returnvalue = "";
    if (document.cookie.length > 0) {
    	offset = document.cookie.indexOf(search)

        if (offset != -1) { // if the cookie exists
            offset += search.length
            end = document.cookie.indexOf(";", offset); 
      
            if (end == -1) {
                end = document.cookie.length;
            }

            returnvalue=unescape(document.cookie.substring(offset, end))
        }
    }       
    return returnvalue;
}