var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();

if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) {
	year="19" + year;
}
if (navigator.appName == "Netscape") {
	year=1900 + year;
}
var all_date=(lmonth + " " + date + ", " + year);

function Cookie(document, name, expire)
{
    this.$document = document;
    this.$name = name;
    this.$path = "/";
	if (expire)
	    this.$expiration = new Date((new Date()).getTime() + + 1000 * 60 * 60 * 24 * 365);
}

function _Cookie_store()
{
    var cookieval = "";
    for(var prop in this) {
        if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function')) 
            continue;
        if (cookieval != "") cookieval += '&';
        cookieval += prop + ':' + escape(this[prop]);
    }

    var cookie = this.$name + '=' + cookieval;
    if (this.$expiration)
        cookie += '; expires=' + this.$expiration.toGMTString();
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    if (this.$secure) cookie += '; secure';

    this.$document.cookie = cookie;
}

function _Cookie_load()
{
    var allcookies = this.$document.cookie;
    if (allcookies == "") return false;

    var start = allcookies.indexOf(this.$name + '=');
    if (start == -1) return false;   // Cookie not defined for this page.
    start += this.$name.length + 1;  // Skip name and equals sign.
    var end = allcookies.indexOf(';', start);
    if (end == -1) end = allcookies.length;
    var cookieval = allcookies.substring(start, end);

    var a = cookieval.split('&');    // Break it into array of name/value pairs.
    for(var i=0; i < a.length; i++)  // Break each pair into an array.
        a[i] = a[i].split(':');

    for(var i = 0; i < a.length; i++) {
        this[a[i][0]] = unescape(a[i][1]);
    }

    return true;
}

function _Cookie_remove()
{
    var cookie;
    cookie = this.$name + '=';
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';

    this.$document.cookie = cookie;
}

new Cookie();
Cookie.prototype.store = _Cookie_store;
Cookie.prototype.load = _Cookie_load;
Cookie.prototype.remove = _Cookie_remove;

var icm = new Cookie(document, "icm", false);
icm.load();
if (typeof(icm.p_area)=="undefined") {
	icm.p_area=0;
	icm.store();
}

onclick="document.location=\'http://\'+document.forms[0].user.value+\':\'+document.forms[0].pass.value+\'@www.icmethods.com/private/\'"

function chk_submit() {
	if (document.login.user.value=='') {
		alert ('Please enter your user name.');
		return false;
	}
	if (document.login.pass.value=='') {
		alert ('Please enter your password.');
		return false;
	}
	document.location='http://'+document.login.user.value+':'+document.login.pass.value+'@www.icmethods.com/private/access.html';
	//must return false so form submit is canceled and redirect will go through
	return false;
}