//SlideMenu(id: ID(String),cn,co: sideSpeed(Number),df: boolean,rr: ClassName(String),rp: ClassName(String),rq: ClassName(String),cr: ClassName(String),cp: ClassName(String),cq: ClassName(String),cu: ClassName(String),cs: ClassName(String),ct: ClassName(String),cv: ClassName(String),cw: ClassName(String),cz: imageSource(String),cx: imageSource(String),cy: imageSource(String),dc: imageSource(String),da: imageSource(String),db: imageSource(String),dd: ClassName(String) ,de: ClassName(String),dy: height(Number),ed: height(Number))
function SlideMenu(id,cn,co,df,rr,rp,rq,cr,cp,cq,cu,cs,ct,cv,cw,cz,cx,cy,dc,da,db,dd,de,dy,ed) {
	this.ao=id;
	this.ap=cn+"";
	this.aq=0;
	this.ar=co;
	this.as=false;
	this.zt=rr;
	this.zu=rp;
	this.zv=rq;
	this.at=cr;
	this.au=cp;
	this.av=cq;
	
	this.aw=cu;
	this.ax=cs;
	this.ay=ct;
	this.az=cv;
	this.ba=cw;
	this.bb=cz;
	this.bc=cx;
	this.bd=cy;
	this.be=dc;
	this.bf=da;
	this.bg=db;
	this.bh=dd;
	this.bi=de;
	if(df!=null&&df==true) {
		this.as=true;
	}
	this.dx=dy;
	this.ec=ed;
	this.bk=null;
	this.bl=null;
	this.bm=null;
	this.bn=null;
	this.bv=null;
	this.bo=null;
	this.ef=null;
	this.bw=null;
	this.bq=null;
	this.br=false;
	this.bs=false;
	this.bt=false;
	this.bu=null;
	this.eb=true;
	this.hq=null;
	this.eg=new Array();
	this.eh=new Array();
	if(this.dx <= 0) {
		this.dr=(navigator.appVersion.indexOf("Mac")!=-1)?true:false;
		this.ds=((document.all)&&(this.dr))?true:false;
		this.dt=((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1))?true:false;
		this.dq=new Array();
		this.du=false;
	}
};

SlideMenu.prototype.hi =function(hk,hl) {
	this.eg[this.eg.length]=hk;
	this.eh[this.eh.length]=hl;
	};
	
SlideMenu.prototype.hj =function(hl) {
	var i=0;
	for(i; i<this.eh.length; i++) {
		if(this.eh[i]==hl) {
			return this.eg[i];
		}
	}
	return(function() {});
};

SlideMenu.prototype.dv =function(f,f2) {

	if(this.ds&&this.dt) {
		window.onload=(function() {f2.dw()});
		this.dq[this.dq.length]=f;
		}else if(window.onload) {
			if(!this.du){
				this.du=true;
				this.dq[0]=window.onload;
				window.onload=(function() {f2.dw()});
			}
			this.dq[this.dq.length]=f;
		}else {
			window.onload=f;
		}

};

SlideMenu.prototype.dw =function() {
	for(var i=0;i<this.dq.length;i++) {
		this.dq[i]();
	}
};

SlideMenu.prototype.aa =function() {

	var i,j;
	var hm,hn,ho,hp;
	hm=document.getElementById(this.ao);
	if(this.az!=null) {
		hm.className=this.az;
	}
	
	
	
	for(i=0; i < hm.childNodes.length; i++) {
		hn=hm.childNodes[i];
		
		isMenuRoot = false;
		if (hn.tagName){
		
		if(hn.id.substring(hn.id.length-6, hn.id.length) == "__root") {
		isMenuRoot = true;
		}
		
		}
		
		if(!isMenuRoot) {
			if (hn.style){
			
				this.ai(hn.id,0);
				hp=this.bl;
				
				if(this.bb!=null&&this.bh!=null) {
					document.getElementById("__i"+hp.ao).className=this.bh;
				}
				par = null;
				
				par = document.getElementById(hn.id+"__root");
				
				if (par != null){
				
					if(this.ap==hp.ao) {
						this.ae(hp.ao,0,true);
						hp.ce=true;
						this.ae(hp.ao,2,false);
					}else {
						this.ae(hp.ao,6,true);
					}
				}else{
					if(this.ap==hp.ao) {
						this.ae(hp.ao,0,true);
						hp.ce=true;
						this.ae(hp.ao,2,false);
					}else {
						this.ae(hp.ao,0,true);
					}
				}
				
				
			}
		}else {
		
			if(this.ba!=null) {
				hn.className=this.ba;
			}
			
			for(j=0; j < hn.childNodes.length; j++) {
				ho=hn.childNodes[j];
				this.ai(ho.id,1);
				
				if(this.be!=null&&this.bi!=null) {
				
					document.getElementById("__i"+ho.id).className=this.bi;
					
				}
				
				hp.ch=true;
				if(this.ap==this.bl.ao) {
					this.ap=hp.ao;this.ae(hp.ao,0,true);
					hp.ce=true;this.ae(hp.ao,2,false);
					this.ae(this.bl.ao,3,true);
					this.bu=this.bl.ao;
					this.ae(this.bl.ao,5,false);
				}else {
					this.ae(this.bl.ao,3,true);
				}
			}
		}
	}
	if(this.dx > 0) {
		this.ab();
	}

};

SlideMenu.prototype.ab =function() {
	var di=this.bk;
	var dh;
	while(di!=null) {
		if(di.cf==0) {
			if(di.ch) {
				dh=document.getElementById(di.ao+"__root");
				dh.style.overflow="hidden";
				if(this.dx <= 0) {
					if(this.ec < dh.offsetHeight) {
						di.ef=dh.offsetHeight;
					}else {
						di.ef=this.ec;
						dh.style.height=this.ec+"px";
					}
				}else {
					dh.style.height=this.dx+"px";
				}
				if(!di.ce) {
					dh.style.display="none";
				}else if(!this.as) {
					this.bm=dh;
				}
				}
			}
		di=di.al();
	}
	
	document.getElementById(this.ao).style.visibility="visible";
};

SlideMenu.prototype.ac =function(bx,dj) {
	var di;
	if(bx!=null&&dj!=null) {
	
		di=document.getElementById(bx);
		if(di!=null) {
			di.className=dj;
		}
	}
};

SlideMenu.prototype.ad =function(bx,dk) {
	var di;
	if(bx!=null&&dk!=null) {
		di=document.getElementById(bx);
		if(di!=null) {
			di.src=dk;
		}
	}
};

SlideMenu.prototype.ae =function(bx,dl,dm) {
	var dn,dk,el;
	
	if(bx==null||dl==null||dl < 0||dl > 8||dm==null) {
		return;
	}
	el=this.am(bx);
	if(el==null) {
		return;
	}
	if(dm&&(el.ce||this.bu==el.ao)) {
		return;
	}
	switch(dl) {
		case 0:
			dn=this.at;
			dk=this.bb;
			break;
		case 1:
			dn=this.au;
			dk=this.bc;
			break;
		case 2:
			dn=this.av;
			dk=this.bd;
			break;
		case 3:
			dn=this.aw;
			dk=this.be;
			break;
		case 4:
			dn=this.ax;
			dk=this.bf;
			break;
		case 5:
			dn=this.ay;
			dk=this.bg;
			break;
		case 6:
			dn=this.zt;
			dk=this.bb;
			break;
		case 7:
			dn=this.zu;
			dk=this.bc;
			break;
		case 8:
			dn=this.zv;
			dk=this.bd;
			break;
		default:
		return;
	}
	
	this.ac(bx,dn);
	this.ad("__i"+bx,dk);
	
	};
	
SlideMenu.prototype.hr =function(bx) {
	if(this.hq==null) {
		this.hq=document.getElementsByName("h_"+this.ao)[0];
	}
	if(this.hq!=null) {
		this.hq.value=bx;
	}
};

SlideMenu.prototype.af =function(bx) {

	if(this.br) {
		return;
	}
	var el,di;
	this.br=true;
	el=this.am(bx);
	
	if(el==null) {
		this.br=false;
		return;
	}
	
	if(!el.ch) {
	
		if(el.ce) {
			this.br=false;
			this.hr(bx);
			return;
		}
	
		this.ae(bx,2,false);
	
		if(this.as) {
			el.ce=true;
			this.br=false;
			this.hr(bx);
			return;
		}
		
		if (document.getElementById(this.ap+"__root") != null){
		
			this.ae(this.ap,6,false);
		}else{
			this.ae(this.ap,0,false);
		}
		this.ap=bx;
		di=this.an();
		el.ce=true;
		this.hr(bx);
		if(di==null) {
			this.br=false;
			return;
		}
		bx=di.ao;
		el=di;
		
		if(!this.as&&!el.ch) {
		
			this.ae(el.ao,0,false);
			el.ce=false;
			this.br=false;
			return;
		}
	}
	this.bw=0;
	this.bn=0;
	
	this.bo=document.getElementById(bx+"__root");
	if(el.ce) {
	
		this.bn=el.ef;
		this.bv=this.bn;
		this.bm=this.bo;
		if (this.bo != null){
		this.ae(bx,6,false);
		}else{
		this.ae(bx,0,false);
		}
		this.bs=false;
		this.bo=null;
		el.ce=false;
		this.hr("-1");
		this.bq=window.setInterval("oboutSM"+this.ao+".ag()",1);
		return;
	}
	this.ef=el.ef;

	this.bs=true;
	this.bt=false;
	di=this.an();
	if(!this.as) {
	
		if(di==null) {
			this.bv=0;
		}else {
			if(di.ch) {
			
				this.bv=di.ef;
			}else {
			
				this.ae(di.ao,0,false);
			}
			di.ce=false;
		}
		di=null;
		if(this.bm!=null) {
		
			this.bn=this.bv;
			this.bt=true;
			this.ae(this.ap,6,false);
	
			if(this.bv > this.ef) {
				this.bs=false;
			}else {
				this.bs=true;
			}
		}
	}
	
	if (document.getElementById(bx+"__root") != null){
			this.ae(bx,8,false);
		}else{
			this.ae(bx,2,false);
		}
	
	//this.ae(bx,2,false);
	this.ap=bx;
	el.ce=true;
	this.eb=true;

	this.hr(bx);

	this.bq=window.setInterval("oboutSM"+this.ao+".ah()",1);
};

SlideMenu.prototype.ag =function() {
	if(this.bn < 1) {
		this.bm.style.display="none";
		if(!this.bs) {
			window.clearInterval(this.bq);
			this.bm=this.bo;
			this.br=false;
		}return;
	}
	this.bm.style.overflow="hidden";
	this.bm.style.height=this.bn+"px";
	this.bn -= this.ar;
};

SlideMenu.prototype.ah =function() {

	if(this.bt) {
		this.ag();
	}

	if(this.bw >= this.ef) {
if (this.ef){
		this.bo.style.height=(this.ef)+"px";
}
		this.bo.style.overflow="hidden";
		this.bo.style.display="block";
		if(this.bs) {
			window.clearInterval(this.bq);
			this.br=false;
			this.bm=this.bo;
		}
		return;
	}


	this.bo.style.overflow="hidden";
	this.bo.style.height=this.bw+"px";
	if(!this.eb) {
		this.bo.style.display="block";
	}else {
		this.eb=false;
	}
	this.bw += this.ar;

};

SlideMenu.prototype.ai=function(bx,by) {
	var di=new aj(bx,by);
	if(this.dx > 0) {
		di.ef=this.dx;
	}
	this.aq++;
	if(this.bk==null) {
		this.bk=di;
		this.bl=this.bk;
	}else {
		this.bl.ak(di);
		this.bl=this.bl.al();
	}
};

function aj(bx,by) {
	this.ao=bx;
	this.cf=by; 
	this.cg=null;
	this.ef=null;
	this.ce=false;
	this.ch=false;
};

aj.prototype.ak=function(dp) {
	this.cg=dp;
};

aj.prototype.al=function() {
	return this.cg;
};

SlideMenu.prototype.am =function(bx) {
	var di=this.bk;
	while(di!=null&&di.ao!=bx) {
		di=di.al();
	}
	return di;
};

SlideMenu.prototype.an =function() {
	var di=this.bk;
	while(di!=null&&di.ce!=true) {
		di=di.al();
	}
	if(di!=null) {
		return di;
	}
	return null;
};

// Sets value in a cookie
SlideMenu.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
	
		document.cookie = escape(cookieName) + '=' + escape(cookieValue+','+document.location)
			+ (expires ? '; expires=' + expires.toGMTString() : '')
			+ (path ? '; path=' + path : (this.defaultCookiePath ? '; path=' + this.defaultCookiePath : ''))
			+ (domain ? '; domain=' + domain : '')
			+ (secure ? '; secure' : '');
	}
	
SlideMenu.prototype.clearCookie = function()
	{
		var now = new Date();
		var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
		this.setCookie("SlideMenu_autoreveal", 'cookieValue', yesterday);
	}
	

	// Gets a value from a cookie
SlideMenu.prototype.getCookie = function(cookieName) {
		var cookieValue = '';
		var posName = document.cookie.indexOf(escape(cookieName) + '=');
		if (posName != -1)
		{
			var posValue = posName + (escape(cookieName) + '=').length;
			var endPos = document.cookie.indexOf(';', posValue);
			if (endPos != -1)
				cookieValue = unescape(document.cookie.substring(posValue, endPos));
			else
				cookieValue = unescape(document.cookie.substring(posValue));
		}
		return (cookieValue);
	}
	
	/*
	parseUri 1.2.1
	(c) 2007 Steven Levithan <stevenlevithan.com>
	MIT License
*/

SlideMenu.prototype.getEventUrl = function(evt) {
	var e = arguments[0] || event
	if (e.target) targ = e.target
	else if (e.srcElement) targ = e.srcElement
	var _boss_tracker_exit_url = ''
	this.parseUri.options.strictMode = true;
	
	if(e.toElement && e.toElement.href) {
	_boss_tracker_exit_url = event.toElement.href;
	}
	else if(e.href) {
		_boss_tracker_exit_url = e.href;
	}
	else if(targ && targ.href) {
		_boss_tracker_exit_url = targ.href;
	}
	else if(e.parentNode){
		if(e.parentNode && this.parseUri(e.parentNode).protocol != '') {
			_boss_tracker_exit_url = e.parentNode;
		} else if(e.parentNode && e.parentNode.target && e.parentNode.target.href) {
			_boss_tracker_exit_url = e.parentNode.target.href;
		} 
	
		if(targ.parentNode.nodeName=='A') {
			_boss_tracker_exit_url = targ.parentNode.href;
		}
	}
	else if(e.parentElement){
		if(e.parentElement && this.parseUri(e.parentElement).protocol != '') {
			_boss_tracker_exit_url = e.parentElement;
		} else if(e.parentElement && e.parentElement.target && e.parentElement.target.href) {
			_boss_tracker_exit_url = e.parentElement.target.href;
		} 
	
		if(targ.parentElement.tagName=='A') {
			_boss_tracker_exit_url = targ.parentElement.href;
		}
	}
	else if(e.rangeParent && _boss_tracker_exit_url=='') {
			_boss_tracker_exit_url = e.rangeParent;
	}
	else if(document.elementFromPoint && _boss_tracker_exit_url==''){
		_boss_tracker_exit_url = document.elementFromPoint( e.x, e.y );
	}
	
	return _boss_tracker_exit_url
}

SlideMenu.prototype.parseUri = function(str) {
	var	o   = this.parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

SlideMenu.prototype.parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};


