function getCookie(theName){               //theName = theName of the cookie	var theNameLen = theName.length;    var theCookieLen = document.cookie.length;    var cookieEnd;    var i =0;        while(i < theCookieLen){        var stringPointer = i + theNameLen;                if(document.cookie.substring(i,stringPointer) == theName){            cookieEnd = document.cookie.indexOf(";",stringPointer);    	    if (cookieEnd == -1) {                                                      // end of cookie of the cookie was reached                cookieEnd = document.cookie.length;            }//if            return unescape(document.cookie.substring(stringPointer+1,cookieEnd));         // return the cookie         }//if           i++; 		}//while    return ""  ;                                                                        // theName not found}//getCookiefunction clearFirstTime(){    firstTime = true;}  //clearFirstTimefunction writeCookie(theName,theValue){ 	document.cookie = theName + "=" + theValue;}  //writeCookiefunction writeCookie2(theName,theValue){     var expiresDate = new Date();    var oneYear = expiresDate.getTime() +(365 *24*60*60*1000);  // convert 1 year to seconds    expiresDate.setTime(oneYear);        	document.cookie = theName + "=" + theValue + "; expires = " + expiresDate.toGMTString();  //convert time to greenwich }  //writeCookie