var _w = window;
var _d = document;
_d.gtn_ = _d.getElementsByTagName;
_d.gid_ = _d.getElementById;
_d.ce_ = _d.createElement;
var is = new z1Browser();

_d.cookies = {write:function (name, value, days) {
	var d, e;
	if (days){
		d = new Date();
		d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000));
		e = ";expires=" + d.toGMTString();
	}else{
		e = "";
	}
	_d.cookie = name + "=" + value + e + ";path=/";
}, read:function (name) {
	var nameEQ = name + "=", ca = _d.cookie.split(";"), i, c;
	for (i = 0; i < ca.length; i++) {
		c = ca[i];
		while (c.charAt(0) == " ") {
			c = c.substring(1, c.length);
		}
		if (c.toUpperCase().indexOf(nameEQ.toUpperCase()) == 0) {
			return c.substring(nameEQ.length, c.length);
		}
	}
	return null;
}, remove:function (name) {
	z1API.cookies.write(name, "", -1);
}};

/**
 * function z1Browser
 */
 
function z1Browser() {
	var b = navigator.appName;
	if (b.indexOf("Netscape") != -1) {
		this.b = "ns";
	} else {
		if (b == "Opera" || (navigator.userAgent.indexOf("Opera") > 0)) {
			this.b = "opera";
		} else {
			if (b == "Microsoft Internet Explorer") {
				this.b = "ie";
			}
		}
	}
	if (!b) {
		alert("Unidentified browser.\nThis browser is not supported!");
	}
	this.version = navigator.appVersion;
	this.fv = parseFloat(this.version);
	this.v = parseInt(this.version);
	this.ns = (this.b == "ns" && this.v >= 4);
	this.ns4 = (this.b == "ns" && this.v == 4);
	this.ns6 = (this.b == "ns" && this.v == 5);
	this.ns7 = (navigator.userAgent.indexOf("Netscape/7") > 0);
	this.ie = (this.b == "ie" && this.v >= 4);
	this.ie4 = (this.version.indexOf("MSIE 4") > 0);
	this.ie5 = (this.version.indexOf("MSIE 5") > 0);
	this.ie55 = (this.version.indexOf("MSIE 5.5") > 0);
	this.ie6 = (this.version.indexOf("MSIE 6.0") > 0);
	if (this.ie) {
		this.iev = parseInt(this.version.substring(this.version.indexOf("MSIE ") + 5));
		this.ieFixed = (navigator.appMinorVersion.split(";").length > 3) || (navigator.userAgent.indexOf("NT 5.1") > 0);
	}
	this.opera = (this.b == "opera");
	this.dom = (_d.ce_ && _d.appendChild && _d.gtn_) ? true : false;
	this.def = (this.ie || this.dom);
	this.dyn = (this.dom || this.ie || this.ns4);
	var ua = navigator.userAgent.toLowerCase();
	if (ua.indexOf("win") > -1) {
		this.platform = "win32";
	} else {
		if (ua.indexOf("mac") > -1) {
			this.platform = "mac";
		} else {
			this.platform = "other";
		}
	}
}