
//Static Slide Menu 6.5 © MaXimuS 2000-2001, All Rights Reserved.
//Site: http://www.absolutegb.com/maximus
//Script featured on Dynamic Drive (http://www.dynamicdrive.com)

NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
var staticYOffset=30; // no quotes!!
var aux_interval =0;
function truebody(){
	return (document.compatMode!="BackCompat")? document.documentElement : document.body
}

function makeStatic(basessm,XOffset,YOffset,lastY,desStatic,auxtop) {
	//pos =findPos(document.getElementById("td_cuerpo"))
	//eval("document.getElementById('"+basessm+"').style.left="+pos[0])
	//window.clearTimeout(aux_out);
	auxstaticYOffset = staticYOffset+desStatic;
	//aux_left = "0px";
	
	if (NS6){
		bssm=document.getElementById(basessm);
//		auxposmenu = document.getElementById("aux_pos_menu");
	}
	else if (IE) {
//			alert(document.getElementById("thessm"+basessm));
		bssm=document.all(basessm);
	}
	else if (NS) {
		bssm=document.layers[basessm+"1"];
		
	}
	
	if(bssm!=null){
		bssm=bssm.style;
	
		if (NS||NS6) {
			winY = window.pageYOffset;
		}
		if (IE) {
			winY = truebody().scrollTop;
		}
		if (NS6||IE||NS) {
			if (winY!=lastY&&winY>YOffset-auxstaticYOffset) {
				smooth = .2 * (winY - lastY - YOffset + auxstaticYOffset);
			}
			else if (YOffset-auxstaticYOffset+lastY>YOffset-auxstaticYOffset) {
				smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));
			}
			else {
				smooth=0
			}
			if(smooth > 0)
				smooth = Math.ceil(smooth);
			else
				smooth = Math.floor(smooth);
			if (IE)
				bssm.pixelTop+=smooth;
			if (NS6){
				if(bssm.top){
					bssm.top=parseInt(bssm.top)+smooth+"px"
					auxtop=parseInt(bssm.top);
				}
				else
				bssm.top=(auxtop+smooth)+"px";
				
			}
			if (NS) 
				bssm.top=parseInt(bssm.top)+smooth
			lastY = lastY+smooth;
		
		}
		
	}
	
	aux_out = setTimeout("makeStatic('"+basessm+"',"+XOffset+","+YOffset+","+lastY+","+desStatic+","+auxtop+")", 1)
	
}

	

