Pair of Vintage Old School Fru
\n") printWin.document.write("\n") printWin.document.write(output) printWin.document.write("\n") printWin.document.write("\n") printWin.document.close() } // ********** Pass the data to the cookie ********** function saveMemo(){ // added function var expdate = new Date (); expdate.setTime (expdate.getTime() + (expDays*24*60*60*1000)) // expiry date path=null // path="/" = top directory, path=null this documents root directory data=document.f1.the_pad.value // string going to cookie if(data.length==0){return} // if no data do not save setCookie(cookieName,data,expdate,path) // this cookie is using dir root path } // Cookie functions // An adaptation of Dorcht's function for getting a cookie. function getCookie(name) { var arg = name + "=" var alen = arg.length var clen = document.cookie.length var i = 0; while (i < clen) { var j = i + alen if (document.cookie.substring(i, j) == arg){ return getCookieVal (j); } i = document.cookie.indexOf(" ", i) + 1 if (i == 0){ break } } return null } function getCookieVal(num) { var endstr = document.cookie.indexOf (";", num) if (endstr == -1) endstr = document.cookie.length return unescape(document.cookie.substring(num, endstr)) } // An adaptation of Dorcht's function for setting a cookie. function setCookie(name, value, expires, path, domain, secure) { if (!expires){expires = new Date()} document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : "; expires=" + expires.toGMTString()) + ((path == null) ? "" : "; path=" + path) + ((domain == null) ? "" : "; domain=" + domain) + ((secure == null) ? "" : "; secure") } // An adaptation of Dorcht's function for deleting a cookie. function deleteCookie(name,path,domain) { // deletes cookie document.cookie = name + "=" + ((path == null) ? "" : "; path=" + path) + ((domain == null) ? "" : "; domain=" + domain) + "; expires=Thu, 01-Jan-00 00:00:01 GMT" } // hide or show CONFIRM div function showHide(layerid){ if (document.getElementById(layerid).style.visibility != "hidden"){ document.getElementById(layerid).style.visibility = "hidden" }else{ document.getElementById(layerid).style.visibility = "visible" } } window.onload=initMemo; window.onunload=saveMemo;