/*
Slide menu should work on:
-IE4-IE6 pc
-IE4.5-IE5 MAC
-OPERA 5
-NN 4-NN6 PC & MAC
-SAFARI 1 MAC
*/

//MFXsmSTART
function MFXiSM(){
	L=['MFX0','MFX1','MFX2','MFX3','MFX4','MFX5','MFX6','MFX7','MFXd1','MFXd2'];
	spd=20;
	stp=10;
	cl=1;
	gSL=4;
	cM=0;
	var d=document,n=navigator;
	nn=d.layers?1:0;
	rng=0;
	wO=-1;
	wait=-1;
	op=window.opera;
	no=n.userAgent;
	var o6=(no.indexOf('Opera 6')!=-1)||(no.indexOf('Opera/6')!=-1);
	mac=d.all&&n.appVersion.toLowerCase().indexOf('mac')!=-1;
	OM=op||mac;
	gT=[];
	gL=[];
	gHt=[];
	gW=[];
	gML=[];
	gH='hidden';
	gV='visible';
	P=nn||op&&!o6?'':'px';

	for(i=0;i<L.length;i++){
		L[i]=(nn)?eval('d.'+L[i]):d.all?eval('d.all.'+L[i]+'.style'):d.getElementById(L[i]).style;
		mos=i&1;gML[i]=mos?0:1;
		if(gML[i]){
			if(i==0){
				gT[i]=pI(L[i].top);
				gL[i]=pI(L[i].left)
			}
			else{
				gL[i]=gL[i-2];
				gT[i]=gT[i-2]+gHt[i-2]
			}
			gHt[i]=nn?L[i].clip.height:d.all?pI(L[i].pixelHeight):pI(L[i].height);
			gW[i]=nn?L[i].clip.width:d.all?pI(L[i].pixelWidth):pI(L[i].width);
			L[i].left=gL[i]+P;L[i].top=gT[i]+P;
			L[i].visibility=gV
		}
		if(!gML[i]){
			gT[i]=gT[i-1]+gHt[i-1];
			gL[i]=gL[i-1];gHt[i]=nn?L[i].clip.height:d.all?pI(L[i].pixelHeight):pI(L[i].height);
			gW[i]=nn?L[i].clip.width:d.all?pI(L[i].pixelWidth):pI(L[i].width);
			L[i].left=gL[i]+gSL+P;L[i].top=gT[i]+P;
		}
	}

	function MFXef(e){
		var a=0,m=window.sidebar;
		if((m||nn)&&d.forms.length>0){return}
		while(a<d.links.length){
			d.links[a].blur();++a
		}
	}

	d.onmouseup=MFXef;MFXrSR()
}

function MFXrM(n){
	cM=n;
	if(!rng&&n+2<L.length){
		if(wO==-1){
			oS=stp;L[n+1].visibility=OM?gH:gV;MFXoS(n+2)
		}
		else{
			if(wO==n&&cl){
				cS=gHt[n+1];
				L[n+1].visibility=OM?gH:gV;MFXcS(n+2)
			}
			if(wO!=n){
				cS=gHt[wO+1];L[wO+1].visibility=OM?gH:gV;MFXcS(wO+2);wait=n
			}
		}
	}
}

function MFXoS(n){
	rng=1;
	for(i=n;i<L.length;i+=2){
		L[i].top=pI(L[i].top)+stp+P
	}
	nn?L[n-1].clip.height=oS:L[n-1].clip='rect('+0+P+' '+gW[n-1]+P+' '+ oS+P+' '+0+P+')';
	oS+=stp;
	if(pI(L[n].top)<pI(L[n-1].top)+gHt[n-1]){
		mTO=setTimeout('MFXoS('+n+')',spd)
	}
	else{
		rng=0;wO=n-2;L[n-1].visibility=gV;MFXaM(n,0)
	}
}

function MFXaM(n,g){
	if(n>0){
		if(g){
			L[n].top=pI(L[n-1].top)
		}
		else{
			L[n].top=pI(L[n-1].top)+gHt[n-1]+P
		}
		for(i=n+2;i<L.length;i+=2)
			L[i].top=pI(L[i-2].top)+gHt[i-2]+P
	}
}

function MFXcS(n){
	rng=1;
	for(i=n;i<L.length;i+=2){
		L[i].top=pI(L[i].top)-stp+P}nn?L[n-1].clip.height=cS:L[n-1].clip='rect('+0+P+' '+gW[n-1]+P+' '+cS+P+' '+0+P+')';
		cS-=stp;
		if(pI(L[n].top)>pI(L[n-2].top)+gHt[n-2]){
			mTO=setTimeout('MFXcS('+n+')',spd)
		}
		else{
			nn?L[n-1].clip.height=cS:L[n-1].clip='rect('+0+P+' '+gW[n-1]+P+' '+0+P+' '+0+P+')';
			rng=0;
			wO=-1;
			MFXaM(cM,1);
			if(wait!=-1)MFXrM(wait);
			L[n-1].visibility=gH;
			wait=-1;
		}
	}

function pI(n){
	return parseInt(n)
}

function MFXrSR(){
	var i,sr=document.location.search;
	if(sr!=''){
		sr=sr.replace(/\?/,'').split('&');
		for(i=0;i<sr.length;i++){
			sr[i]=sr[i].split('=');
			if(sr[i][0]=='menuID'){
				MFXrM(pI(sr[i][1]))
				
			}
		}
	}
}

onload=MFXiSM;

function MFXcallSMpage(u){
	document.MM_returnValue = false;document.location=u;
}
//MFXsmEND