var awmec=0,d1,s1,m1;
var awmui=null;
var awmd;
var awmim=false;
var awmtc=0;
var awmsd=false;
var awmdrx=0;
var awmdry=0;
var awmlsx,awmLastScrollY,awmcsx,awmcsy,awmud,awmdt;
var awmsdx="right";
var NS4=(document.layers)?1:0;
var IEMac=0;
var marko_x_keskelt = -280;
var marko_x_servast = 20;
var marko_x_static_after = 300;

if ((navigator.appVersion.indexOf("Mac") != -1) && !NS4)
	IEMac=1;
var IEver4=0;
if (document.all) {
	var vers=navigator.appVersion;
	if (vers.substring(0,1)=="4" && vers.indexOf("5.")==-1) 
		IEver4=1;
}
var IEMac4=0;
if ((IEMac==1) && (IEver4==1)) 
	IEMac4=1;
var NS6=0;
if (!NS4 && !IEver4) 
	NS6=(document.getElementsByTagName("*") && !document.all)?1:0;
if (!NS4) {
	window.onresize = awmier;
	document.onmousemove=awmodmm;
	document.onmouseup=awmodmu;
}
if (NS4 || NS6) {
	var awmvt=window.pageYOffset;
	var awmvl=window.pageXOffset;
	var awmvb=awmvt+window.innerHeight;
	var awmvr=awmvl+window.innerWidth;
}
function awmcgl() {
	return (NS4)?this.l.left:((NS6)?this.x:this.l.offsetLeft);
}
function awmcgt() {
	return (NS4)?this.l.top:((NS6)?this.y:this.l.style.pixelTop);
}
function awmcgw() {
	return (NS4)?this.l.clip.width:((NS6)?this.w:this.l.style.pixelWidth);
}
function awmcgh() {
	return (NS4)?this.l.clip.height:((NS6)?this.h:this.l.style.pixelHeight);
}
function awmpc() {
	var vt=(NS4 || NS6)?awmvt:document.body.scrollTop;
	var vl=(NS4 ||NS6)?awmvl:document.body.scrollLeft;
	var vb=(NS4 || NS6)?awmvb:document.body.scrollTop+document.body.clientHeight;
	var vr=(NS4 || NS6)?awmvr:document.body.scrollLeft+document.body.clientWidth;
	if (this.ind==0) {
		if (this.pm.cfp==0) {
			this.pm.x=this.pm.dix;
			this.pm.y=this.pm.diy;
		}
		if (this.pm.cfp==1) {
			this.pm.x=vr-this.gw()-this.pm.dix;
			this.pm.y=this.pm.diy;
		}
		if (this.pm.cfp==2) {
			this.pm.x=vr-this.gw()-this.pm.dix;
			this.pm.y=vb-this.gh()-this.pm.diy;
		}
		if (this.pm.cfp==3) {
			this.pm.x=this.pm.dix;
			this.pm.y=vb-this.gh()-this.pm.diy;
		}
		if (this.pm.cfp==4) {
			this.pm.x=this.pm.dix;
			this.pm.y=vt+(vb-vt-this.h)/2;
			if (this.pm.y<0) 
				this.pm.y=0;
		}
		if (this.pm.cfp==5) {
			this.pm.x = (vl+(vr-vl-this.w)/2);
			if (this.pm.x<0) 
				this.pm.x=0;
			this.pm.y=this.pm.diy;
		}
		if (this.pm.cfp==6) {
			this.pm.x=vr-this.gw()-this.pm.dix;
			this.pm.y=vt+(vb-vt-this.h)/2;
			if (this.pm.y<0) 
				this.pm.y=0;
		}
		if (this.pm.cfp==7) {
			this.pm.x=vl+(vr-vl-this.w)/2;
			if (this.pm.x<0) 
				this.pm.x=0;
			this.pm.y=vb-this.gh()-this.pm.diy;
		}
		if (this.pm.dr) {
			this.pm.x+=awmlsx;
			this.pm.y+=awmLastScrollY;
		}
		/* ============== Marko osa :) menu initsialiseerimisel tema asukoha määramine		*/
		if(this.pm.x >= marko_x_static_after){
			this.movTo(this.pm.x+marko_x_keskelt, this.pm.y);
		}else{
			this.movTo(marko_x_servast, this.pm.y);
		}
		/*							======== Marko osa lõpp ============					*/
	} else {
		var left,top,lt1,lt2,altt;
		if (this.pi.pc.ih) {
			left=this.pi.pc.gl()+this.pi.gl();
			if (left+this.gw()>vr) 
				left=vr-this.gw();
			top=this.pi.pc.gt()+this.pi.gh()+2*this.pi.pc.bw;
			if (top+this.gh()>vb) 
				altt=this.pi.pc.gt()-this.gh();
			if (altt>=vt) {
				top=altt;
				awmud="up";
			} else 
				awmud="down";
		} else {
			lt1=this.pm.dbs+this.pi.pc.gl()+this.pi.gw()+2*this.pi.pc.bw;
			lt2=this.pi.pc.gl()-this.gw()-this.pm.dbs;
			left=lt1;
			if (this.pi.pc.ind==0) 
				awmsdx="right";
			if (this.pi.pc.pm.ih) 
				if (this.pi.pc.pi.pc.ind==0) 
					awmsdx="right";
			if (awmsdx =="right" && lt1+this.gw()>vr) 
				awmsdx="left";
			if (awmsdx =="left" && lt2<vl) 
				awmsdx="right";
			if (awmsdx == "left") 
				left=lt2;
			if (this.tit!="" && this.it.length>0 && !this.ih) 
				var th=(NS4)?this.tl.clip.height+this.dbi:((NS6)?0:this.tl.offsetHeight+this.dbi); 
			else 
				var th=0;
			top=((NS6)?this.pi.pc.gt()-th-this.bw:this.pi.pc.gt())+this.pi.gt()-th-this.bw;
			if (top+this.gh()>vb) 
				altt=vb-this.gh()-10;
			if (altt>=vt) 
				top=altt;
			awmud=awmsdx;
		}
		if (this.pm.ih && top<this.pm.y && top+this.gh()>this.pm.y && this.pi.gt()+((NS6)?0:this.pi.pc.gt())<this.pm.y && !this.pi.pc.ih) 
			top=this.pm.y-this.gh()-10;
		this.movTo(left,top);
		this.x=left;
		this.y=top;
		this.w=this.gw();
		this.h=this.gh();
	}
}
function awmuf(ind,x,y,w,h) {
	if (awmuc>10) {
		clearInterval (awmui);
		return;
	}
	if (NS4) {
		if (awmud=="right") {
			awmm[0].cont[ind].l.left=x-w+Math.round(awmuc/10*w);
			awmm[0].cont[ind].l.clip.left=w-Math.round(awmuc/10*w);
		} else if (awmud=="left") {
			awmm[0].cont[ind].l.left=x+w-Math.round(awmuc/10*w);
			awmm[0].cont[ind].l.clip.right=Math.round(awmuc/10*w);
		} else if (awmud=="up") {
			awmm[0].cont[ind].l.top=y+h-Math.round(awmuc/10*h);
			awmm[0].cont[ind].l.clip.bottom=Math.round(awmuc/10*h);
		} else if (awmud=="down") {
			awmm[0].cont[ind].l.top=y-h+Math.round(awmuc/10*h);
			awmm[0].cont[ind].l.clip.top=h-Math.round(awmuc/10*h);
		}
	} else {
		var tmp;
		var tmp1;
		if (awmud=="right") {
			tmp=x-w+Math.round(awmuc/10*w);
			if (NS6) 
				awmm[0].cont[ind].l.style.left=tmp;
			else 
				awmm[0].cont[ind].l.style.pixelLeft=tmp;
			awmm[0].cont[ind].l.style.clip='rect(0,'+w+','+h+','+(w-Math.round(awmuc/10*w))+')';
		} else if (awmud=="left") {
			tmp=x+w-Math.round(awmuc/10*w);
			if (NS6 && (tmp+awmm[0].cont[ind].l.offsetWidth>window.scrollX+window.innerWidth)) 
				tmp=window.scrollX+window.innerWidth-awmm[0].cont[ind].l.offsetWidth-50;
			if (NS6) 
				awmm[0].cont[ind].l.style.left=tmp;
			else 
				awmm[0].cont[ind].l.style.pixelLeft=tmp;
			awmm[0].cont[ind].l.style.clip='rect(0,'+(Math.round(awmuc/10*w))+','+h+',0)';
		} else if (awmud=="up") {
			tmp=y+h-Math.round(awmuc/10*h);
			if (NS6 && (tmp+awmm[0].cont[ind].l.offsetHeight>window.scrollY+window.innerHeight)) 
				tmp=window.scrollY+window.innerHeight-awmm[0].cont[ind].l.offsetHeight-50;
			if (NS6) 
				awmm[0].cont[ind].l.style.top=tmp;
			else 
				awmm[0].cont[ind].l.style.pixelTop=tmp;
			awmm[0].cont[ind].l.style.clip='rect(0,'+w+','+(Math.round(awmuc/10*h))+',0)';
		} else if (awmud=="down") {
			tmp=y-h+Math.round(awmuc/10*h);
			if (NS6) 
				awmm[0].cont[ind].l.style.top=tmp;
			else 
				awmm[0].cont[ind].l.style.pixelTop=tmp;
			awmm[0].cont[ind].l.style.clip='rect('+(h-Math.round(awmuc/10*h))+','+w+','+h+',0)';
		}
		awmm[0].cont[ind].l.style.visibility="inherit";
	}
	awmuc+=2;
}
function awmcuf() {
	var x=this.gl();
	var y=this.gt();
	var w=this.gw();
	var h=this.gh();
	if (NS4) {
		if (awmud=="left") 
			this.l.clip.right=0;
		else if (awmud=="right") 
			this.l.clip.left=w;
		else if (awmud=="up") 
			this.l.clip.height=0;
		else if (awmud=="down") 
			this.l.clip.top=h;
	} else 
		this.l.style.clip='rect(0,0,0,0)';
	if (NS4) 
		this.l.visibility="inherit";
	awmuc=0;
	awmui=setInterval("awmuf("+this.ind+","+x+","+y+","+w+","+h+")",30);
}
function awmcd() {
	if (this.it.length>0) {
		if (this.it[0].l[0].offsetWidth==0) 
			setTimeout("awmm[0].cont["+this.ind+"].del()",0);
		else {
			this.dasd1();
			this.dasd2();
			this.ae();
			this.pco();
			this.arng=1;
		}
	} else {
		this.dasd1();
		this.dasd2();
		this.ae();
		this.pco();
		this.arng=1;
	}
}
function awmcs(sf) {
	if (sf) {
		if (!this.arng) {
			if (this.ind==0 && !NS4 && !IEMac && !NS6);
			else {
				if (this.it.length<=12 && !NS4 && !IEMac && !NS6) 
					this.dasd1();
				if (this.it.length<=12 && !NS4 && !IEMac) 
					this.dasd2();
				this.ae();
				this.arng=1;
			}
		}
		this.an();
		this.pco();
	}
	if (sf && this.uef && this.ind>0 && !IEMac4) {
		this.unfold();
	} else {
		if (NS4) 
			this.l.visibility=(sf)?"inherit":"hide";
		else 
			this.l.style.visibility=(sf)?"visible":"hidden";
	}if (!sf && NS4) {
		this.l.clip.left=0;
		this.l.clip.top=0;
		if (this.arng) {
			this.l.clip.width=this.w;
			this.l.clip.height=this.h;
		}
	}
}
function awmcmt(x,y) {
	if (NS4) 
		this.l.moveTo(x,y);
	else if (NS6) {
		this.x=this.l.style.left=x;
		this.y=this.l.style.top=y;
	} else {
		this.l.style.pixelLeft=x;
		this.l.style.pixelTop=y;
	}
}
function awmcan() {
	var p;
	for (p=0; p<this.it.length; p++) 
		this.it[p].shn();
}
function awmht(flag) {
	var p;
	for (p=0; p<this.it.length; p++) {
		if (this.it[p].sm!=0) 
			this.it[p].sm.ht(0);
	}
	if (arguments.length==1) 
		this.sh(false);
}
function awmocmo() {
	if (this.pc.ind>0) {
		this.pc.movTo(this.pc.x,this.pc.y);
		if (NS4) {
			this.clip.left=0;
			this.clip.top=0;
			this.clip.width=this.pc.w;
			this.clip.height=this.pc.h;
		} else 
			this.style.clip='rect(0,'+this.pc.w+','+this.pc.h+',0)';
		if (!NS4 && this.pc.imo) 
			return;
	}
	if (this.pc.ind!=0) {
		if (this.pc.pm.ssoh) 
			this.pc.pi.shh();
		else 
			this.pc.pi.shp();
	}
	this.pc.pm.iom=true;
	this.pc.imo=true;
}
function awmocmot(e) {
	if (!NS4) {
		var x1=this.offsetLeft;
		var x2=x1+this.offsetWidth;
		var y1=this.offsetTop;
		var y2=y1+this.offsetHeight;
	}
	if (NS4 || (!NS6 && !NS4 && (event.x<x1+2 || event.x>x2 || event.y<y1+2 || event.y>y2)) || NS6) {
		status="";
		this.pc.imo=false;
		this.pc.pm.iom=false;
		//=======================================================================//

		var awmhm=setTimeout ("awmhm(0)",1000); 

		//=======================================================================//
	}
}
function awmlr(x,y) {
	if (NS4) 
		this.resizeTo(x,y);
	else if (NS6) {
		this.style.width=x;
		this.style.height=y;
	} else {
		this.style.pixelWidth=x;
		this.style.pixelHeight=y;
	}
}
function awmotmd(e) {
	if (NS4) {
		this.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
		awmdrx=e.pageX;
		awmdry=e.pageY;
	} else if (NS6) {
		awmdrx=e.clientX;
		awmdry=e.clientY;
	} else {
		awmdrx=event.clientX;
		awmdry=event.clientY;
	}
	awmsd=true;
	awmdt=this;
	clearInterval(awmd);
}
function awmotmm(e) {
	if (awmsd) {
		if (awmdrx!=0) {
			this.pc.l.left+=e.pageX-awmdrx;
			this.pc.l.top+=e.pageY-awmdry;
		}
		awmdrx=e.pageX;
		awmdry=e.pageY;
		this.pc.pm.x=this.pc.gl();
		this.pc.pm.y=this.pc.gt();
	}
}
function awmotmu() {
	if (NS4) {
		this.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP);
		document.layers['AWMFOCUS0'].document.forms['AWMFOCUS1'].elements[0].focus();
		window.scrollTo(awmcsx,awmcsy);
	} else if (!NS6) 
		document.selection.empty();
	awmsd=false;
	this.pc.pm.rep=true;
	awmd=setInterval ("awmDriftMenus()",100);
}
function awmotmo() {
	this.pc.pm.iom=true;
	this.pc.ht();
	this.pc.an();
}
function awmodmm(e) {
	if (awmsd) {
		if (NS6) {
			awmdt.pc.x=awmdt.pc.l.style.left=awmdt.pc.l.offsetLeft+e.clientX-awmdrx;
			awmdt.pc.y=awmdt.pc.l.style.top=awmdt.pc.l.offsetTop+e.clientY-awmdry;
		} else {
			awmdt.pc.l.style.pixelLeft+=event.clientX-awmdrx;
			awmdt.pc.l.style.pixelTop+=event.clientY-awmdry;
		}if (!NS6) 
			e=event;
		awmdrx=e.clientX;
		awmdry=e.clientY;
		awmdt.pc.pm.x=awmdt.pc.gl();
		awmdt.pc.pm.y=awmdt.pc.gt();
	}
}
function awmodmu() {
	if (awmsd) {
		if (!NS4) 
			document.body.focus();
		awmsd=false;
		awmdt.pc.pm.rep=true;
		awmd=setInterval ("awmDriftMenus()",100);
	}
}
function awmisn() {
	this.l[0].sh(true);
	if (this.sts!=1 && this.sts!=4) 
		this.l[1].sh(false);
	if (this.sts>3) 
		this.l[2].sh(false);
}
function awmish() {
	if (this.sts==1 || this.sts==4)
		this.l[0].sh(true);
	else {
		this.l[0].sh(false);
		this.l[1].sh(true);
	}if (this.sts>3) 
		this.l[2].sh(false);
}
function awmisp() {
	if (this.sts<3) 
		this.l[0].sh(true);
	else 
		this.l[0].sh(false);
	if (this.sts==3) 
		this.l[1].sh(true);
	else if (this.sts!=1 && this.sts!=4) 
		this.l[1].sh(false);
	if (this.sts>3) 
		this.l[2].sh(true);
}
function awmimt(x,y) {
	var q,stt;
	for (stt=0; stt<this.star.length; stt++) {
		q=this.star[stt];
		if (NS4) 
			this.l[q].moveTo(x,y);
		else if (NS6) {
			this.x=this.l[q].style.left=x;
			this.y=this.l[q].style.top=y;
		} else {
			this.l[q].style.pixelLeft=x;
			this.l[q].style.pixelTop=y;
		}
	}
	if (NS4) 
		this.el.moveTo(x,y);
	else if (NS6) {
		this.el.style.left=x;
		this.el.style.top=y;
	} else {
		this.el.style.pixelLeft=x;
		this.el.style.pixelTop=y;
	}
}
function awmigl() {
	return (NS4)?this.l[0].left:((NS6)?this.x:this.l[0].offsetLeft);
}
function awmigt() {
	return (NS4)?this.l[0].top:((NS6)?this.y:this.l[0].offsetTop);
}
function awmigw() {
	return (NS4)?this.l[0].clip.width:((NS6)?this.w:this.l[0].style.pixelWidth);
}
function awmigh() {
	return (NS4)?this.l[0].clip.height:((NS6)?this.h:this.l[0].style.pixelHeight);
}
function awmils(sf) {
	if (NS4) 
		this.visibility=(sf)?"inherit":"hide";
	else 
		this.style.visibility=(sf)?"inherit":"hidden";
}
function awmoimo() {
	if (NS4) 
		this.captureEvents(Event.MOUSEUP);
	if (this.pi.pc.ind!=0) {
		if (this.pi.pc.pm.ssoh) 
			this.pi.pc.pi.shh();
		else 
			this.pi.pc.pi.shp();
	}
	status=this.pi.sbt;
	this.pi.pc.ht();
	this.pi.pc.an();
	this.pi.pc.iom=true;
	this.pi.pc.pm.iom=true;
	this.pi.shh();
	if (this.pi.pc.pm.ssoh) {
		if (this.pi.sm!=0) {
			this.pi.sm.sh(true);
		}
	}
}
function awmoimot() {
	clearInterval(awmui);
	status="";
	this.pi.shn();
}
function awmoimd() {
	if (NS4) 
		this.captureEvents(Event.MOUSEUP);
	this.pi.shp();
	if (!this.pi.pc.pm.ssoh) {
		if (this.pi.sm!=0) 
			this.pi.sm.sh(true);
	}
	if (this.pi.jc!=null) 
		eval(this.pi.jc);
	if (this.pi.url!=null) {
		if (NS4) {
			this.pi.shn();
			this.releaseEvents(Event.MOUSEUP);
			document.layers['AWMFOCUS0'].document.forms['AWMFOCUS1'].elements[0].focus();
			window.scrollTo(awmcsx,awmcsy);
		}
		if (this.pi.tf==null) 
			window.location=this.pi.url;
		else if (this.pi.tf=="new") 
			window.open(this.pi.url);
		else if (this.pi.tf=="top") 
			window.top.location=this.pi.url;
		else 
			eval("window.top."+this.pi.tf+".location=this.pi.url");
	}
}
function awmoimu() {
	if (!NS6) 
		document.selection.empty();
}
function awmodlmo() {
	this.pc.an();
	this.pc.ht();
}
function awmcttai() {
	var p,q,w,h,i,item;
	var str="";
	if (this.tit!="") 
		str+="<DIV ID=TT CLASS='"+this.tsid+"'><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 VALIGN=MIDDLE "+this.tit+"</DIV>";
	for (p=0; p<this.it.length; p++) {
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			str+="<DIV ID=T"+p+"-"+q+" CLASS='"+this.it[p].sid[q]+"'><TABLE BORDER=0 CELLSPACING=0 WIDTH=1 CELLPADDING=0 VALIGN=MIDDLE "+this.it[p].innerTextNS[q]+"</DIV>";
		}
	}
	document.write(str);
	if (this.it.length==0) 
		this.dbi=0;
	if (this.tit!="") {
		document.writeln ("<DIV ID=T CLASS='"+this.tsid+"'><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 VALIGN=MIDDLE "+this.tit+"</DIV>");
		this.mw=document.layers['TT'].clip.width;
		this.mh=document.layers['TT'].clip.height;
		this.tow=this.mw+this.dbi;
		this.toh=this.mh+this.dbi;
		this.ws[0]=this.mw;
		this.hs[0]=this.mh;
	} else {
		this.ws[0]=0;
		this.hs[0]=0;
	}
	for (p=0; p<this.it.length; p++) {
		w=0;
		h=0;
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			item=document.layers['T'+p+"-"+q];
			w=Math.max(w,item.clip.width);
			h=Math.max(h,item.clip.height);
		}
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			this.ws[p*3+q+1]=w;
			this.hs[p*3+q+1]=h;
		}
		this.tow+=w;
		this.toh+=h;
		if (p>0) {
			this.tow+=this.dbi;
			this.toh+=this.dbi;
		}
		this.mw=Math.max(this.mw,w);
		this.mh=Math.max(this.mh,h);
	}
	if (this.tit!="") {
		if (this.eiw) {
			this.ws[0]=this.mw;
			this.tow=this.ws[0]+this.dbi;
		}
		if (this.eih) {
			this.hs[0]=this.mh;
			this.toh=this.hs[0]+this.dbi;
		}
	}
	if (this.eiw) {
		this.tow+=this.mw*this.it.length+this.dbi*(this.it.length-1);
		for (p=0; p<this.it.length; p++) {
			for (stt=0; stt<this.it[p].star.length; stt++) {
				q=this.it[p].star[stt];
				this.ws[p*3+q+1]=this.mw;
			}
		}
	}
	if (this.eih) {
		this.toh+=this.mh*this.it.length+this.dbi*(this.it.length-1);
		for (p=0; p<this.it.length; p++) {
			for (stt=0; stt<this.it[p].star.length; stt++) {
				q=this.it[p].star[stt];
				this.hs[p*3+q+1]=this.mh;
			}
		}
	}
	if (this.ih) {
		if (this.imb) {
			var ww=(NS4)?window.innerWidth-2*this.bw:document.body.clientWidth;
			this.tow=Math.max(this.tow,ww);
		}
		this.toh=this.mh;
	} else 
		this.tow=this.mw;
}
function awmdasd1() {
	var p,q;
	if (this.tit!="") {
		this.tl.w=this.mw=this.tl.offsetWidth;
		if (IEMac4 || NS6) 
			this.mw+=this.tbw*2;
		this.tl.h=this.mh=this.tl.offsetHeight;
		if (IEMac4 || NS6) 
			this.mh+=this.tbw*2;
		this.tow=this.mw;
		this.toh=this.mh;
	}
	for (p=0; p<this.it.length; p++) {
		this.it[p].w=0;
		this.it[p].h=0;
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			mca=(IEMac4 || NS6)?this.it[p].bw[q]*2:0;
			this.it[p].w=Math.max(this.it[p].w,this.it[p].l[q].offsetWidth+mca);
			this.it[p].h=Math.max(this.it[p].h,this.it[p].l[q].offsetHeight+mca);
		}
	}
}
function awmdasd2() {
	var p, q, mca;
	for (p=0; p<this.it.length; p++) {
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			if (NS6) 
				this.it[p].itid[q]=document.getElementById(this.it[p].itid[q]);
			else 
				this.it[p].itid[q]=this.l.all[this.it[p].itid[q]];
			if (!this.eiw) {
				if (NS6) {
					this.it[p].l[q].style.width=this.it[p].w-2*this.it[p].bw[q];
					this.it[p].itid[q].style.width=this.it[p].w-2*this.it[p].bw[q];
				} else {
					this.it[p].l[q].style.pixelWidth=this.it[p].w;
					this.it[p].itid[q].style.pixelWidth=this.it[p].w-2*this.it[p].bw[q];
				}
			}
			if (!this.eih) {
				if (NS6) {
					this.it[p].l[q].style.height=this.it[p].h-2*this.it[p].bw[q];
					this.it[p].itid[q].style.height=this.it[p].h-2*this.it[p].bw[q];
				} else {
					this.it[p].l[q].style.pixelHeight=this.it[p].h;
					this.it[p].itid[q].style.pixelHeight=this.it[p].h-2*this.it[p].bw[q];
				}
			}
		}
		this.mw=Math.max(this.it[p].w,this.mw);
		this.mh=Math.max(this.it[p].h,this.mh);
		this.tow+=this.dbi+this.mw;
		this.toh+=this.dbi+this.mh;
	}
	if (this.eiw) {
		this.tow=this.mw*this.it.length+this.dbi*(this.it.length-1);
		if (this.tit!="") 
			this.tow+=this.mw+this.dbi;
	}
	if (this.eih) {
		this.toh=this.mh*this.it.length+this.dbi*(this.it.length-1);
		if (this.tit!="") 
			this.toh+=this.mh+this.dbi;
	}
	if (this.tit!="") {
		mca=(NS6)?this.tbw*2:0;
		if (this.eiw) 
			if (NS6) 
				this.tl.w=this.tl.style.width=this.mw-mca;
			else 
				this.tl.style.pixelWidth=this.mw;
		if (this.eih) 
			if (NS6) 
				this.tl.h=this.tl.style.height=this.mh-mca;
			else 
				this.tl.style.pixelHeight=this.mh;
	}
	for (p=0; p<this.it.length; p++) {
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			mca=(IEMac4 || NS6)?this.it[p].bw[q]*2:0;
			if (this.eiw) {
				if (NS6) {
					this.it[p].w=this.it[p].l[q].style.width=this.mw-mca;
					this.it[p].itid[q].style.width=this.mw-2*this.it[p].bw[q];
				} else {
					this.it[p].l[q].style.pixelWidth=this.mw-mca;
					this.it[p].itid[q].style.pixelWidth=this.mw-2*this.it[p].bw[q];
				}
			}
			if (this.eih) {
				if (NS6) {
					this.it[p].h=this.it[p].l[q].style.height=this.mh-mca;
					this.it[p].itid[q].style.height=this.mh-2*this.it[p].bw[q];
				} else {
					this.it[p].l[q].style.pixelHeight=this.mh-mca;
					this.it[p].itid[q].style.pixelHeight=this.mh-2*this.it[p].bw[q];
				}
			}
		}
	}
}
function awmae() {
	var nl=this.bw;
	var nt=this.bw;
	var x,y,p,q,stt,mca;
	if (this.it.length==0) 
		this.dbi=0;
	if (this.tit!="") {
		var dx=dy=this.bw;
		if (this.ih) 
			dy=2*dy;
		else 
			dx=2*dx;
		if (NS4) {
			this.tel.rs(this.tl.clip.width+dx,this.tl.clip.height+dy);
			this.tl.visibility="inherit";
			this.tl.moveTo (nl,nt);
			nl+=this.tl.clip.width;
			nt+=this.tl.clip.height;
		} else {
			mca=(IEMac==1 && IEMac4==0)?0:2*this.tbw;
			if (NS6) {
				document.getElementById(this.ttid).style.width=this.tl.w-mca;
				document.getElementById(this.ttid).style.height=this.tl.h-mca;
			} else {
				document.all[this.ttid].style.pixelWidth=this.tl.style.pixelWidth-mca;
				document.all[this.ttid].style.pixelHeight=this.tl.style.pixelHeight-mca;
			}
			dx+=(this.eiw)?this.mw:((NS6)?this.tl.w:this.tl.offsetWidth);
			dy+=(this.eih)?this.mh:((NS6)?this.tl.h:this.tl.offsetHeight);
			this.tel.rs(dx,dy);
			if (NS6) {
				this.tel.dg.style.width=dx;
				this.tel.dg.style.height=dy;
				this.tl.style.left=nl;
				this.tl.style.top=nt;
			} else {
				this.tel.dg.style.pixelWidth=dx;
				this.tel.dg.style.pixelHeight=dy;
				this.tl.style.pixelLeft=nl;
				this.tl.style.pixelTop=nt;
			}
			this.tl.style.visibility="inherit";
			nl+=(this.eiw)?this.mw:((NS6)?this.tl.w:this.tl.offsetWidth);
			nt+=(this.eih)?this.mh:((NS6)?this.tl.h:this.tl.offsetHeight);
		}
		if (this.ih) 
			nl+=this.dbi;
		else 
			nt+=this.dbi;
	}
	if (this.ih) 
		nt=this.mh+this.bw;
	else 
		nl=this.mw+this.bw;
	for (p=0; p<this.it.length; p++) {
		x=this.bw;
		y=this.bw;
		if (p>0) {
			if (this.ih) 
				nl+=this.dbi;
			else 
				nt+=this.dbi;
		}
		if (this.ih) 
			x=nl; 
		else 
			y=nt;
		this.it[p].moveTo(x,y);
		if (NS4) 
			this.it[p].el.moveTo(this.it[p].gl(),this.it[p].gt());
		else {
			if (NS6) {
				this.it[p].el.dg.style.width=this.it[p].w;
				this.it[p].el.dg.style.height=this.it[p].h;
			} else {
				this.it[p].el.style.pixelLeft=this.it[p].gl();
				this.it[p].el.style.pixelTop=this.it[p].gt();
				this.it[p].el.dg.style.pixelWidth=this.it[p].gw();
				this.it[p].el.dg.style.pixelHeight=this.it[p].gh();
			}
		}
		this.it[p].el.rs(((NS6)?this.it[p].w:this.it[p].gw()),((NS6)?this.it[p].h:this.it[p].gh()));
		mca=(IEMac4 || NS6)?this.it[p].mbw*2:0;
		if (this.ih) 
			nl+=((NS6)?this.it[p].w+((!this.eiw)?0:mca):this.it[p].gw()+mca);
		else 
			nt+=((NS6)?this.it[p].h+((!this.eih)?0:mca):this.it[p].gh()+mca);
	}
	if (this.imb) {
		var ww=(NS4 || NS6)?window.innerWidth-this.bw:document.body.clientWidth-this.bw;
		nl=Math.max(nl,ww);
	}
	nl+=this.bw;
	nt+=this.bw;
		if (!NS4 && this.bw>0) {
			mca=(IEMac4 || NS6)?this.bw*2:0;
			if (NS6) {this.bl.style.left=0;
				this.bl.style.top=0;
			} else {
				this.bl.style.pixelLeft=0;
				this.bl.style.pixelTop=0;
			}
			this.bl.rs(nl-mca,nt-mca);
		}
		if (NS4) 
			this.dl.moveTo(this.bw,this.bw);
		else {if (NS6) {
			this.dl.style.left=this.bw;
			this.dl.style.top=this.bw;
		} else {
			this.dl.style.pixelLeft=this.bw;
			this.dl.style.pixelTop=this.bw;
		}
	}
this.dl.rs(nl-2*this.bw,nt-2*this.bw);
this.l.rs(nl,nt);
this.x=this.y=0;
this.w=nl;
this.h=nt;
}
function awmcac() {
	var dimStr,p,q,stt,ibw,w,h;
	var tstr;
	var istr=new Array();
	if (NS4) 
		this.cttai();
	awmec+=1;
	tstr="<DIV ID='EL"+awmec+"' CLASS='"+this.csid+"'"+((NS6)?" STYLE='width:3000'":"")+">";
	var cid="EL"+awmec, blid;
	if (this.bw>0) {
		awmec+=1;
		tstr+="<DIV ID='EL"+awmec+"' CLASS='"+this.blsid+"'><TABLE CELLSPACING=0 CELLPADDING=0";
		if (NS4) 
			tstr+=" WIDTH="+(this.tow-6)+" HEIGHT="+(this.toh-6);
		tstr+='><TD ALIGN=RIGHT VALIGN=BOTTOM><IMG SRC="" WIDTH=1 HEIGHT=1></TD></TABLE></DIV>';
		blid="EL"+awmec;
	}
	awmec+=1;
	tstr+="<DIV ID='EL"+awmec+"' CLASS='STEL'>";
	if (!NS4) 
		tstr+="<IMG SRC='' WIDTH=0 HEIGHT=0>";
	tstr+="</DIV>";
	dlid="EL"+awmec;
	if (this.tit!="") {
		awmec+=1;
		tstr+="<DIV ID='EL"+awmec+"' CLASS='"+this.tsid+"'";
		if (IEver4) 
			tstr+=" STYLE='width:"+(2*this.tbw+1)+"'";
		tstr+="><TABLE";
		if (!NS4) {
			tstr+=" ID='T"+awmec+"'";
			this.ttid="T"+awmec;
		}
		tstr+=" BORDER=0 CELLPADDING=0 CELLSPACING=0";
		if (NS4) {
			w=this.ws[0];
			h=this.hs[0];
			if (this.tbw>0) {
				w-=2*this.tbw+6;
				h-=2*this.tbw+6;
			}
			tstr+=" WIDTH="+w+" HEIGHT="+h;
		}
		tstr+=this.tit+"</DIV>";
		this.tl="EL"+awmec;
		awmec+=1;
		tstr+="<DIV ID='EL"+awmec+"' CLASS='STEL'>";
		if (!NS4) 
			tstr+="<IMG ID='dg"+awmec+"'>";
		tstr+="</DIV>";
		this.tel="EL"+awmec;
		if (!NS4) 
			this.dg="dg"+awmec;
	}
	for (p=0; p<this.it.length; p++) {
		ibw=1+2*Math.max(this.it[p].bw[0],Math.max(this.it[p].bw[1],this.it[p].bw[2]));
		istr[p]="";
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			awmec+=1;
			istr[p]+="<DIV ID='EL"+awmec+"' CLASS='"+this.it[p].sid[q]+"'";
			if (IEver4) 
				istr[p]+=" STYLE='width:"+ibw+"'";
			istr[p]+="><TABLE";
			if (!NS4) {
				istr[p]+=" ID='T"+awmec+"'";
				this.it[p].itid[q]="T"+awmec;
			}
			istr[p]+=" BORDER=0 CELLPADDING=0 CELLSPACING=0";
			if (NS4) {
				w=this.ws[p*3+q+1];
				h=this.hs[p*3+q+1];
				if (this.it[p].bw[q]>0) {
					w-=2*this.it[p].bw[q]+6;
					h-=2*this.it[p].bw[q]+6;
				}
				istr[p]+=" WIDTH="+w+" HEIGHT="+h;
			} else 
				istr[p]+=" WIDTH=1";
			istr[p]+=this.it[p].ite[q]+"</DIV>";
			this.it[p].l[q]="EL"+awmec;
		}
		awmec+=1;
		istr[p]+="<DIV ID='EL"+awmec+"' CLASS='STEL'>";
		if (!NS4) 
			istr[p]+="<IMG ID='dg"+awmec+"'>";
		istr[p]+="</DIV>";
		this.it[p].el="EL"+awmec;
		if (!NS4) 
			this.it[p].dg="dg"+awmec;
	}
	if (IEver4 || NS4) {
		for (p=0; p<this.it.length; p++) 
			tstr+=istr[p];
		tstr+="</DIV>";
		document.writeln(tstr);
	} else {
		document.writeln(tstr);
		for (p=0; p<this.it.length; p++) 
			document.write(istr[p]);
		document.writeln("</DIV>");
	}
	this.l=(NS4)?document.layers[cid]:((NS6)?document.getElementById(cid):document.all[cid]);
	this.arng=0;
	if (NS4) {
		if (this.bgi!=null) 
			this.l.background.src=this.bgi;
		if (this.bgColor!=null) 
			this.l.bgColor=this.bgColor;
	} else {
		if (this.bgi!=null) 
			this.l.style.backgroundImage='url('+this.bgi+')';
		if (this.bgColor!=null) 
			this.l.style.backgroundColor=this.bgColor;
	}
	this.l.rs=awmlr;
	this.l.pc=this;
	this.l.onmouseover=awmocmo;
	this.l.onmouseout=awmocmot;
	if (this.bw>0) {
		this.bl=(NS4)?document.layers[cid].document.layers[blid]:((NS6)?document.getElementById(blid):this.l.all[blid]);
		this.bl.rs=awmlr;
	}
	this.dl=(NS4)?document.layers[cid].document.layers[dlid]:((NS6)?document.getElementById(dlid):this.l.all[dlid]);
	this.dl.pc=this;
	this.dl.rs=awmlr;
	this.dl.onmouseover=awmodlmo;
	if (this.tit!="") {
		this.tl=(NS4)?document.layers[cid].document.layers[this.tl]:((NS6)?document.getElementById(this.tl):this.l.all[this.tl]);
		if (this.tbgc!=null) {
			if (NS4) 
				this.tl.bgColor=this.tbgc;
			else 
				this.tl.style.backgroundColor=this.tbgc;
		}
		this.tel=(NS4)?document.layers[cid].document.layers[this.tel]:((NS6)?document.getElementById(this.tel):this.l.all[this.tel]);
		if (!NS4) {
			this.tel.dg=(NS6)?document.getElementById(this.dg):this.l.all[this.dg];
			this.tel.dg.src=awmMenuPath+awmImagesPath+"/dot.gif";
		}
		this.tel.rs=awmlr;
		this.tel.pc=this;
		this.tel.onmouseover=awmotmo;
		if (this.ind==0 && this.pm.mv) {
			if (NS4) 
				this.tel.onFocus=awmotmd;
			else 
				this.tel.onmousedown=awmotmd;
			if (NS4) 
				this.tel.onmousemove=awmotmm;
			this.tel.onmouseup=awmotmu;
		} else if (!NS4) 
			this.tel.onmouseup=function() {document.selection.clear()};
	}
	for (p=0; p<this.it.length; p++) {
		for (stt=0; stt<this.it[p].star.length; stt++) {
			q=this.it[p].star[stt];
			this.it[p].l[q]=(NS4)?document.layers[cid].document.layers[this.it[p].l[q]]:((NS6)?document.getElementById(this.it[p].l[q]):this.l.all[this.it[p].l[q]]);
			this.it[p].l[q].pi=this.it[p];
			if (NS4) {
				if (this.it[p].bgi[q]!=null) this.it[p].l[q].background.src=this.it[p].bgi[q];
				if (this.it[p].bgColor[q]!=null) this.it[p].l[q].bgColor=this.it[p].bgColor[q];
			} else {
				if (this.it[p].bgi[q]!=null) 
					this.it[p].l[q].style.backgroundImage='url('+this.it[p].bgi[q]+')';
				if (this.it[p].bgColor[q]!=null) 
					this.it[p].l[q].style.backgroundColor=this.it[p].bgColor[q];
				}
				this.it[p].l[q].sh=awmils;
			}
			this.it[p].el=(NS4)?document.layers[cid].document.layers[this.it[p].el]:((NS6)?document.getElementById(this.it[p].el):this.l.all[this.it[p].el]);
			if (!NS4) {
				this.it[p].el.dg=(NS6)?document.getElementById(this.it[p].dg):this.l.all[this.it[p].dg];
				this.it[p].el.dg.src=awmMenuPath+awmImagesPath+"/dot.gif";
			}
			this.it[p].el.pi=this.it[p];
			this.it[p].el.rs=awmlr;
			this.it[p].el.onmouseover=awmoimo;
			this.it[p].el.onmouseout=awmoimot;
			if (NS4) 
				this.it[p].el.onMouseUp=awmoimd;
			else 
				this.it[p].el.onmousedown=awmoimd;
			if (!NS4) 
				this.it[p].el.onmouseup=awmoimu;
		}if (this.ind==0 && !NS4 && !IEMac && !NS6) 
			this.del();
		else {if ((this.it.length>12 && !NS4) || IEMac || NS6) 
			this.dasd1();
		if ((this.it.length>12 && !NS4) || IEMac) 
			this.dasd2();
	}
}

function awmCreateM(mt,mv,dr,crn,dix,diy,ssoh,dbs, uef) {
	this.cont=new Array();
	this.iom=false;
	this.ih=false;
	this.imb=false;
	if (mt==1) 
		this.ih=true;
	if (mt==2) {
		this.ih=true;
		this.imb=true;
	}
	this.mv=mv;
	this.dr=dr;
	this.cfp=crn;
	this.dix=dix;
	this.diy=diy;
	this.ssoh=ssoh;
	this.dbs=dbs;
	this.uef=uef;
	this.x=0;
	this.y=0;
	if (this.imb) {
		if (this.cfp==1 || this.cfp==4 || this.cfp==5 || this.cfp==6)
			this.cfp=0;
		if (this.cfp==2 || this.cfp==7) 
			this.cfp=3;
		this.dix=0;
	}
	this.iom=false;
	this.rep=false;
	this.cel=awmcel;
	return this;
}
function awmCreateCont(cn, pmn, submenuType, csid, tsid, blsid, tit, tbgc, bgColor, bgi, tbw, bw, eiw, eih, dbi) {
	this.mw=0;
	this.mh=0;
	this.tow=0;
	this.toh=0;
	this.ws=new Array();
	this.hs=new Array();
	this.it=new Array();
	this.imo=false;
	this.pm=awmm[pmn];
	this.ind=cn;
	if (this.ind==0) {
		this.ih=this.pm.ih;
		this.imb=this.pm.imb;
	} else {
		this.ih=submenuType;
		this.imb=false;
	}
	this.csid=csid;
	this.tsid=tsid;
	this.blsid=blsid;
	this.tit=tit;
	this.tbgc=tbgc;
	this.bgColor=bgColor;
	this.bgi=bgi;
	this.tbw=tbw;
	this.bw=bw;
	this.eiw=eiw;
	this.eih=eih;
	this.dbi=dbi;
	this.uef=this.pm.uef;
	this.del=awmcd;
	this.cac=awmcac;
	this.cttai=awmcttai;
	this.dasd1=awmdasd1;
	this.dasd2=awmdasd2;
	this.sh=awmcs;
	this.movTo=awmcmt;
	this.an=awmcan;
	this.ht=awmht;
	this.gl=awmcgl;
	this.gt=awmcgt;
	this.gw=awmcgw;
	this.gh=awmcgh;
	this.ae=awmae;
	this.pco=awmpc;
	this.unfold=awmcuf;
	return this;
}
function awmCreateIt(sid1, sid2, sid3, al1, fc1, sz1, color1, b1, i1, u1, image1, image1w, image1h, imgalign1, 
					text1, textns1, subimage1, subimgw1, subimage1w, subimage1h, al2, fc2, sz2, color2, b2, i2,
					u2, image2, image2w, image2h, imgalign2, text2, textns2, subimage2, subimgw2, subimage2w, 
					subimage2h, al3, fc3, sz3, color3, b3, i3, u3, image3, image3w, image3h, imgalign3, text3, 
					textns3, subimage3, subimgw3, subimage3w, subimage3h, bgc1, bgc2, bgc3, bgi1, bgi2, bgi3, 
					bw1, bw2, bw3, jc, url, tf, sbt, hsu, sts) 
		{
		this.l=new Array();
		this.itid=new Array();
		this.sid=new Array();
		this.ite=new Array();
		this.innerTextNS=new Array();
		this.bgi=new Array();
		this.bgColor=new Array();
		this.bw=new Array();
		this.sts=sts;
		this.star=new Array();
		this.star[0]=0;
		if (this.sts==2 || this.sts==3 || this.sts==5) 
			this.star[1]=1;
		if (this.sts==4 || this.sts==5) 
			this.star[this.star.length]=2;
		this.sid[0]=sid1;
		this.sid[1]=sid2;
		this.sid[2]=sid3;
		var q,s0,s1,s2,s3,s4;
		for (stt=0; stt<this.star.length; stt++) {
			q=this.star[stt]+1;
			var s0="><TD ALIGN="+eval("al"+q)+"><FONT class=menu";
			var color=eval("color"+q);
			if (color!=null) 
				s0+=" COLOR="+color;s0+=">";
			var s1="<NOBR>";
			var image=eval("image"+q);
			var imgalign=eval("imgalign"+q);
			if (image!="") {
				s1+="<IMG SRC='"+image+"' BORDER=0 ALIGN=ABSMIDDLE WIDTH="+eval("image"+q+"w")+" HEIGHT="+eval("image"+q+"h")+">";
				if (imgalign==0) 
					s1+="<BR>";
				if (imgalign==2) 
					s1="<BR>"+s1;
			}
			var s2=eval("text"+q);
			var s3=eval("textns"+q);
			if (eval("b"+q)) {
				s2="<B>"+s2+"</B>"; 
				s3="<B>"+s3+"</B>";
			}
			if (eval("i"+q)) {
				s2="<I>"+s2+"</I>"; 
				s3="<I>"+s3+"</I>";
			}
			if (eval("u"+q)) {
				s2="<U>"+s2+"</U>"; 
				s3="<U>"+s3+"</U>";
			}
			if (imgalign==0 || imgalign==3) {
				s2=s0+s1+s2;
				s3=s0+s1+s3;
			} else {
				s2=s0+s2+s1;
				s3=s0+s3+s1;
			}
			var s4="</NOBR></FONT></TD>";
			var subimage=eval("subimage"+q);
			var subimgw=eval("subimgw"+q);
			if (eval("subimage"+q)!="") {
				s4+="<TD WIDTH=1% ALIGN=RIGHT><IMG SRC='"+eval("subimage"+q)+"'";
				if (subimgw>0) 
					s4+=" WIDTH="+subimgw+" HEIGHT=1";
				else 
					s4+=" WIDTH="+eval("subimage"+q+"w")+" HEIGHT="+eval("subimage"+q+"h");
				s4+="></TD>";
			}
			s4+="</TABLE>";
			this.ite[q-1]=s2+s4;
			this.innerTextNS[q-1]=s3+s4;
		}
		this.bgColor[0]=bgc1;
		this.bgColor[1]=bgc2;
		this.bgColor[2]=bgc3;
		this.bgi[0]=bgi1;
		this.bgi[1]=bgi2;
		this.bgi[2]=bgi3;
		this.bw[0]=bw1;
		this.bw[1]=bw2;
		this.bw[2]=bw3;
		this.mbw=Math.max(bw1,Math.max(bw2,bw3));
		this.jc=jc;
		if (url!=null){
			var pr=url.substring(0,7);
			if ((pr!="http://") && (pr!="https:/") && (pr!="mailto:") && (pr!="file://") && (url.substring(0,6)!="ftp://") && (url.substring(0,6)!="mms://") && (url.substring(0,1)!="/"))
				url=awmMenuPath+"/"+url;
		}
		this.url=url;
		this.tf=tf;
		this.sbt=sbt;
		this.sm=hsu;
		this.moveTo=awmimt;
		this.shn=awmisn;
		this.shh=awmish;
		this.shp=awmisp;
		this.gl=awmigl;
		this.gt=awmigt;
		this.gw=awmigw;
		this.gh=awmigh;
		return this;
}
function awmhm(mn) {
	var cn;
	if (!awmm[mn].iom) {
		awmm[mn].cont[0].an();
		for (cn=0; cn<awmm[mn].cont.length; cn++) {
			if (awmm[mn].cont[cn].ind>0) 
				awmm[mn].cont[cn].sh(false);
		}
	}
}
function awmcel() {
	var c,i;
	for (c=0; c<this.cont.length; c++) {
		for (i=0; i<this.cont[c].it.length; i++) {
			this.cont[c].it[i].pc=this.cont[c];
			if (this.cont[c].it[i].sm>0) {
				this.cont[c].it[i].sm=this.cont[this.cont[c].it[i].sm];
				this.cont[c].it[i].sm.pi=this.cont[c].it[i];
			}
		}
	}
}
function awmDriftMenus() {
	if (NS4 || NS6) {
		awmvl=awmcsx=window.pageXOffset;
		awmvt=awmcsy=window.pageYOffset;
		awmvb=awmvt+window.innerHeight;
		awmvr=awmvl+window.innerWidth;
	} else {
		awmcsx=document.body.scrollLeft;
		awmcsy=document.body.scrollTop;
	}
	if ((awmcsx-awmlsx)==0 && (awmcsy-awmLastScrollY)==0) 
		return;
	var left,top;
	for (mn=0; mn<awmm.length; mn++) {
		if (awmm[mn].dr) {
			left=awmm[mn].x+awmcsx-awmlsx;
			top=awmm[mn].y+awmcsy-awmLastScrollY;
			awmm[mn].cont[0].movTo(left,top);
			awmm[mn].x=left;
			awmm[mn].y=top;
			awmlsx=awmcsx;
			awmLastScrollY=awmcsy;
		}
	}
}

//=============================================================================
// internet explorer refresh function on resizing
function awmier() {
	var vl=awmvl=(NS6)?window.scrollX:document.body.scrollLeft;
	var vt=awmvt=(NS6)?window.scrollY:document.body.scrollTop;
	var vr=awmvr=vl+((NS6)?window.innerWidth:document.body.clientWidth);
	var vb=awmvb=vt+((NS6)?window.innerHeight:document.body.clientHeight);
	for (mn=0; mn<awmm.length; mn++) {
		if (awmm[mn].imb) {
			if (NS6) 
				awmm[mn].cont[0].l.style.width=window.innerWidth-this.bw; 
			else 
				awmm[mn].cont[0].l.style.pixelWidth=document.body.clientWidth;
			if (awmm[mn].cont[0].bw>0) {
				if (NS6) 
					awmm[mn].cont[0].bl.style.width=window.innerWidth-this.bw; 
				else awmm[mn].cont[0].bl.style.pixelWidth=document.body.clientWidth;
			}
		}
		if (!awmm[mn].rep && awmm[mn].cfp!=0) {
			if (awmm[mn].cfp==1) {
				awmm[mn].x=vr-awmm[mn].cont[0].gw()-awmm[mn].dix;
				awmm[mn].y=awmm[mn].diy+vt;
			}
			if (awmm[mn].cfp==2) {
				awmm[mn].x=vr-awmm[mn].cont[0].gw()-awmm[mn].dix;
				awmm[mn].y=vb-awmm[mn].cont[0].gh()-awmm[mn].diy;
			}
			if (awmm[mn].cfp==3) {
				awmm[mn].x=awmm[mn].dix+vl;
				awmm[mn].y=vb-awmm[mn].cont[0].gh()-awmm[mn].diy;
			}
			if (this.pm.cfp==4) {
				this.pm.x=awmm[mn].dix;
				this.pm.y=vt+(vb-vt-awmm[mn].cont[0].h)/2;
				if (this.pm.y<0) 
					this.pm.y=0;
			}
			if (this.pm.cfp==5) {
				this.pm.x=vl+(vr-vl-awmm[mn].cont[0].w)/2;
				if (this.pm.x<0) 
					this.pm.x=0;
				this.pm.y=awmm[mn].diy;
			}
			if (this.pm.cfp==6) {
				this.pm.x=vr-awmm[mn].cont[0].gw()-awmm[mn].dix;
				this.pm.y=vt+(vb-vt-awmm[mn].cont[0].h)/2;
				if (this.pm.y<0) 
					this.pm.y=0;
			}
			if (this.pm.cfp==7) {
				this.pm.x=vl+(vr-vl-awmm[mn].cont[0].w)/2;
				if (this.pm.x<0) 
					this.pm.x=0;
				this.pm.y=vb-awmm[mn].cont[0].gh()-awmm[mn].diy;
			}
			if (NS6) {
				awmm[mn].cont[0].l.style.left=awmm[mn].cont[0].x=awmm[mn].x;
				awmm[mn].cont[0].l.style.top=awmm[mn].cont[0].y=awmm[mn].y;
			} else {
				/* ========================= Marko osa :) ================================= */
				if(awmm[mn].x >= marko_x_static_after){
					awmm[mn].cont[0].l.style.pixelLeft=awmm[mn].x+marko_x_keskelt;
				}else{
					awmm[mn].cont[0].l.style.pixelLeft=marko_x_servast;
				}
				awmm[mn].cont[0].l.style.pixelTop=awmm[mn].y;
			}
		}
	}
}

//=============================================================================
// ?
function awmcm() {
	var n=null;
	for (var i=0; i<awmm[0].cont.length; i++) {
		for (var j=0; j<awmm[0].cont[i].it.length; j++) {
			for (var k=0; k<awmm[0].cont[i].it[j].star.length; k++) {
				var kk=awmm[0].cont[i].it[j].star[k];
				awmm[0].cont[i].it[j].l[kk].pi=n;
				awmm[0].cont[i].it[j].l[kk]=n;
			}
			awmm[0].cont[i].it[j].el.pi=n;
			awmm[0].cont[i].it[j].el=n;
			awmm[0].cont[i].it[j].pc=n;
			awmm[0].cont[i].it[j].sm=n;
			awmm[0].cont[i].it[j]=n;
		}
		awmm[0].cont[i].l.pc=n;
		awmm[0].cont[i].l=n;
		awmm[0].cont[i].dl.pc=n;
		awmm[0].cont[i].dl=n;
		if (awmm[0].cont[i].tit!=""){
			awmm[0].cont[i].tl=n;
			awmm[0].cont[i].tel.pc=n;
			awmm[0].cont[i].tel=n;
		}
		awmm[0].cont[i].pi=n;
		awmm[0].cont[i].pm=n;
		awmm[0].cont[i]=n;
	}
	awmm[0]=n;
}

//=============================================================================
// Menu initsialisatsioon ehk siis ehitamine
function awmInitMenu() {
	if (NS4) {
		document.writeln ("<STYLE> .focuslayer {position:absolute; visibility:hidden; }</STYLE>");
		document.writeln("<DIV ID=AWMFOCUS0 CLASS='focuslayer'><FORM NAME='AWMFOCUS1'><INPUT TYPE=TEXT NAME='AWMFOCUS2'></FORM></DIV>");
	}
	document.writeln ("<STYLE> .STEL {position:absolute; visibility:inherit; } </STYLE>");
	if (NS4 || NS6) {
		awmlsx=window.pageXOffset;
		awmLastScrollY=window.pageYOffset;
		//alert(awmLastScrollY);
	} else {
		awmlsx=document.body.scrollLeft;
		awmLastScrollY=document.body.scrollTop;
	}
	status="Electrum Trading: Building menu...";
	for (i=0; i<awmm.length; i++) {
		for (j=0; j<awmm[i].cont.length; j++) {
			awmm[i].cont[j].cac();
			if (!IEver4) 
				awmm[i].cont[j].movTo(0,0);
		}
	}
	awmm[0].cel();
	awmm[0].cont[0].sh(true);
	status="";
	var interval=200;
	if ((IEMac==1) && (IEMac4==0)) 
		interval=400;
	awmd=setInterval ("awmDriftMenus()",interval);
	if (NS4) 
		setTimeout("window.onresize = function () {location.reload(); };",800);
	if (!NS4 && !NS6 && !IEver4) 
		window.onunload=awmcm;
}
