/* Cookie Functions: getCookie, setCookie, delCookie 
 * The getCookie() function is twice as fast as Bill
 * Dortch's Cookie code: It only accesses the cookie
 * once per call, increasing search time.
 */
function getCookie (name) {
var dcookie = document.cookie;
var cname = name + "=";
var clen = dcookie.length;
var cbegin = 0;
while (cbegin < clen) {
        var vbegin = cbegin + cname.length;
        if (dcookie.substring(cbegin, vbegin) == cname) {
                var vend = dcookie.indexOf (";", vbegin);
                if (vend == -1) vend = clen;
                return unescape(dcookie.substring(vbegin, vend));
        }
        cbegin = dcookie.indexOf(" ", cbegin) + 1;
        if (cbegin == 0) break;
        }
        return null;
}

function setCookie (name, value, expires) {
        if (!expires) expires = new Date();
        document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() +  "; path=/";
}

var expdate = new Date();
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 31));

function delCookie (name) {
        var expireNow = new Date();
        document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}
function showcookies() { 
//setCookie("UN","arab",expdate);
//delCookie("UN");
if (getCookie("UN") != null) 
	document.write('<td nowrap><table cellpadding=0 cellspacing=0><tr><td width=30> </td><td valign=center><span style="color: #cccccc; font-weight: bolder;">Welcome, ' + getCookie("UN") + '</span></td><td width=55 align=right><a href="http://www3.estart.com/login/logout.cfm"><img src="http://207.31.112.152/stores/images/logout.gif" border=0></a></td><td><a href="http://www3.estart.com/modify.cfm"><img src="http://207.31.112.152/stores/images/update.gif" border=0></a></td></tr></table></td>');
else 
	document.write ('<td nowrap><img src="http://207.31.112.152/stores/images/signin.gif" width="69" height="30" border="0" alt="Sign in"> </td> <form action="http://www3.estart.com/login/loginForm.cfm" method=post> <td nowrap> <input type="text" name="un" size="8" value="username"> </td> <td nowrap><img src="http://207.31.112.152/stores/images/password.gif" width="57" height="30" border="0" alt="Password"> </td> <td nowrap> <input type="password" name="pw" size="6"></td><td nowrap><input type="image" border="0" name="submit" src="http://207.31.112.152/stores/images/go.gif" width="26" height="30" align="middle" alt="Go"> </td> <td nowrap><a href="http://www3.estart.com/register.cfm"><img src="http://207.31.112.152/stores/images/join.gif" width="23" height="30" border="0" alt="Join"></a></td> <td nowrap> </td> </form>');
}











