function clearDefault(el) { if (el.value==el.value) el.value = ""; } function setCookie(name, value, expires, path) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expires); document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + exdate.toGMTString() : "") + ((path) ? "; path=" + path : ""); } function setInfinityCookie(name, value, expires, path) { var url = window.location.toString(); var infinity = url.match("infinity") if (infinity != null) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(name + "="); if (c_start==-1) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expires); document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + exdate.toGMTString() : "") + ((path) ? "; path=" + path : ""); } } } }