// Style sheet platform check

if ((navigator.userAgent.indexOf("Mac") != -1)) {
    document.write("<link rel='stylesheet' href='http://www.tongsville.com/bank/externals/m.css' type='text/css'>");
}
if (navigator.userAgent.indexOf('Win') != -1){
    if (navigator.appName.indexOf('Netscape') != -1) {
        document.write("<link rel='stylesheet' href='http://www.tongsville.com/bank/externals/n.css' type='text/css'>")
    }
   else {
        document.write("<link rel='stylesheet' href='http://www.tongsville.com/bank/externals/i.css' type='text/css'>")
   }
}



// Get and set cookies

function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
    if (dc.length > 0) {
    begin = dc.indexOf(cname);
        if (begin != -1) {
        begin += cname.length;
        end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
            return unescape(dc.substring(begin, end));
        }
    }
return null;
}

function reloadmain() {
	setTimeout("parent.linkmain.location.href='http://www.tongsville.com/bank/main.html'",1000);
}

function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) + "; path=/" +
((expires == null) ? "" : "; expires=" + expires.toGMTString());
}
function delCookie(name) {
document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}
function getValue(element) {
var value = getCookie(element.name);
    if (value != null) element.value = value;
}
function setValue(element) {
setCookie(element.name, element.value, exp);
}
var exp = new Date();
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 31));

// Prefill forms

	function prefill() {
	     getValue(reply.name);
	}

