
// Cookie read/write functions
function setBasket (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
};
function getCookieVal(offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1) endstr = document.cookie.length;
   return unescape (document.cookie.substring(offset, endstr));
};

function countCookieItems (name) {
	var content = getCookieByName(name);
	if (null==content) {
		return 0;
	} else {
		var items = content.split("\t");
		return items.length;
	}
}

function getCookie(name) {
	return document.cookie;
	var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
	if ( results )
		return ( unescape ( results[2] ) );
		else
	return null;
}

function getCookieByName(name) {
  var arg = name + "=";
  var argLen = arg.length;
  var cookieLen = document.cookie.length;
  var ii = 0;
  while (ii < cookieLen) {
    var jj = ii + argLen;
    if (document.cookie.substring(ii, jj) == arg) {
      return getCookieVal (jj);
	}
    ii = document.cookie.indexOf(" ", ii) + 1;
    if (ii == 0) {
    	break;
    } 
  }
  return null;
};

function jsmenu() {
	document.getElementById('go').style.display = 'none';
};

function toggleColor(obj) {
	if (obj.className=='normalb') {
		obj.className='focusb';
	} else {
		obj.className='normalb';
	}
};



