function ShowCookie(){
window.document.forms[0].txtCurrentCookie.value = GetCookie('CookieName');
}
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){
var endstr = document.cookie.indexOf(";",j);
if (endstr==-1){
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(j,endstr));
}
i = document.cookie.indexOf(" ",i) +1;
if (i==0) break;
}
return null;
}
function AutoComplete(obj,value){
var CookieValue = GetCookie('CookieName');
var cursorKeys =";37;38;39;40;33;34;35;36;45;";
if (cursorKeys.indexOf(";"+event.keyCode+";") == -1) {
if (value.length>0){
if (CookieValue.toUpperCase().substring(0,value.length)==value.toUpperCase()){
obj.value = CookieValue;
obj.select();
}
}
}
}
window.onload = ShowCookie;