javascript/general.js
// reads a cookie from the browser

reads a cookie from the browser
reads a cookie from the browser
function readCookie(name) {
    if (document.cookie == '') return '';
    else {
    	var firstChar, lastChar;
    	var theBigCookie = document.cookie;
    	firstChar = theBigCookie.indexOf(name);
    	if (firstChar != -1) {
    	    firstChar += name.length + 1;
    	    lastChar = theBigCookie.indexOf(';', firstChar);
    	    if (lastChar == -1) lastChar = theBigCookie.length;
    	    return unescape(theBigCookie.substring(firstChar, lastChar));
    	}
      else return '';
    }
  }
function readCookie ( name ) { if ( document . cookie == '' ) return '' ; else { var firstChar , lastChar ; var theBigCookie = document . cookie ; firstChar = theBigCookie . indexOf ( name ) ; if ( firstChar != - 1 ) { firstChar += name . length + 1 ; lastChar = theBigCookie . indexOf ( ';' , firstChar ) ; if ( lastChar == - 1 ) lastChar = theBigCookie . length ; return unescape ( theBigCookie . substring ( firstChar , lastChar ) ) ; } else return '' ; } }
reads a cookie from the browser
reads a cookie from the browser