//Save My Password
function setPw(strPw, boolDoIt)
{
	var expDays = 1000; // number of days the cookie should last
  var expDate = new Date();
  expDate.setTime(expDate.getTime() +  (24 * 60 * 60 * 1000 * expDays)); 
	
  if(boolDoIt){
	  SetCookie('pw', strPw, expDate);
  }
  return true;
}
function getPw(){
	return GetCookie('pw');
}
function RememberCookies(){
	var ca=GetCookie("usrinfo");
	var ps=GetCookie("passinfo");
	var rm=GetCookie("reminfo");

	if ((ca!=null)&&(ps!=null)){
		document.Form1.account.value = ca;
		document.Form1.dsipassword.style.display='none';
		document.Form1.password.value=ps;
		document.Form1.password.style.display='inline';
		document.Form1.remeber.checked=rm
		document.Form1.password.focus();
	}
	else{
		document.Form1.account.value = "Account #";
		document.Form1.password.value="";
		document.Form1.remeber.checked=false;
	  }
}
// Get Cookie Value function
function getCookieVal(offset) {
	 var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1) endstr = document.cookie.length;
   return unescape (document.cookie.substring(offset, endstr));
}
// Get Cookie function
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 remember() {
	var expires = new Date ();
	//alert(document.Form1.remeber.checked);
	if(document.Form1.remeber.checked){
        expires.setTime (expires.getTime() + (1000 * 60 * 60 * 24 * 31));
		document.cookie = "usrinfo="+document.Form1.account.value+"; expires=" + expires.toGMTString() +"; path=/";
		document.cookie = "passinfo="+document.Form1.password.value+"; expires=" + expires.toGMTString() +"; path=/";
		document.cookie = "reminfo="+document.Form1.remeber.checked+"; expires=" + expires.toGMTString() +"; path=/";
	}
	else{
		delete_cookie("usrinfo","/");
		delete_cookie("passinfo","/");
		delete_cookie("reminfo","/");
	}
}
function delete_cookie (name, path)
{
	// Build expiration date string:
	var expiration_date = new Date ();
	expiration_date . setYear (expiration_date . getYear () - 1);
	expiration_date = expiration_date . toGMTString ();

	// Build set-cookie string:
	var cookie_string = escape (name) + "=; expires=" + expiration_date;
	if (path != null)
		cookie_string += "; path=" + path;

	// Delete the cookie:
	document . cookie = cookie_string;
}
function Submit1_onclick() {
	//remember();
}

