if (document.all.item("takingAction")!=null) {

	YOffset = takingAction.offsetTop+posDivSecondary.offsetTop+document.all.item("posCRselected").offsetTop+90;
	X2appear = YOffset;
	XOffset = posDivSecondary.offsetWidth
//	XOffset = posDivSecondary.offsetWidth + (((client_body.offsetWidth-20) - documentTable.offsetWidth)/2) 

	menuIsStatic="yes";
	staticYOffset = 0;
	slideSpeed=15;
	waitTime=2000;
//	menuWidth=posDivSecondary.offsetWidth;
	menuWidth=170;
	linkTarget="_top";
	barWidth=-10;
	barText="";
	ps="isUp";
	ps2="isMiddle";
	opIn=0;
	opOut=100;
	smooth=0;

	tempBar='';
	barBuilt=0;
	ssmItems=new Array();

	moving=setTimeout('null',1)
	lastY=0;
	setTimeout('initSlide();', 1)
}

function moveOut() {
//	alert(ssm.pixelLeft + " / "  +XOffset)
	bssm.filter="alpha(opacity=100)";
	bssmShdw.filter="alpha(opacity=100)";
	if (ssm.pixelLeft<0) {
		clearTimeout(moving);
		moving = setTimeout('moveOut()', slideSpeed);
		slideMenu(10)
	} else {
		clearTimeout(moving);
		moving=setTimeout('null',1)
	}
}

function moveBack() {clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}

function moveBack1() {
	winY = document.body.scrollTop;
	if (winY <= YOffset+40) {
		if (ssm.pixelLeft>(-menuWidth)) {
			clearTimeout(moving);
			moving = setTimeout('moveBack1()', slideSpeed);slideMenu(-10)
		} else {
			clearTimeout(moving);
			moving=setTimeout('null',1)
		}
	}
}

function fadeIn() {
	if (opIn<=100) {
		opInShdw=opIn/3;
		bssm.filter="alpha(opacity=" + opIn + ")";
		bssmShdw.filter="alpha(opacity=" + opInShdw + ")";
		opIn=opIn+20;
		timeIn = setTimeout('fadeIn()', 1);
	} else {opIn=0}
}

function fadeOut() {
	if (opOut>=0) {
		opOutShdw=opOut/3;
		bssm.filter="alpha(opacity=" + opOut + ")";
		bssmShdw.filter="alpha(opacity=" + opOutShdw + ")";
		opOut=opOut-20;
		timeIn = setTimeout('fadeOut()', 1);
	} else {
		opOut=100
		bssm.top=X2appear;
		bssmShdw.top=X2appear;
		bssm.left=XOffset;
		bssmShdw.left=XOffset;
		ssmShdw.pixelLeft=-150;
		ssm.pixelLeft=-150;
	}
}

function slideMenu(num) {
	ssm.pixelLeft += num;
	ssmShdw.pixelLeft += num;
}

function makeItStatic() {
	winY = document.body.scrollTop;
	posForStaticAction = posDivSecondary.offsetTop + posDivSecondary.offsetHeight + 60;

	     if (winY>X2appear && winY<posForStaticAction-20) {smooth=0;ps2="isMiddle";}
	else if (winY!=lastY && winY>YOffset-staticYOffset) {smooth = .1 * (winY - lastY - YOffset + staticYOffset);}
	else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset && winY>X2appear) {smooth = .1 * (winY - lastY - (YOffset-(YOffset-winY)));}
	else {smooth=0;}

	if(winY>posForStaticAction-20) ps2="isBelow";
	if(smooth>10||smooth<-10) smooth=smooth*1.2;
	if(smooth > 0) smooth = Math.ceil(smooth);
	else smooth = Math.floor(smooth);

	bssmShdw.pixelTop+=smooth;
	bssm.pixelTop+=smooth;

	if(smooth<2 && smooth>-2 && ps2=="isBelow" && (bssm.pixelTop<document.body.scrollTop || bssm.pixelTop>document.body.scrollTop+60)) {
	 	bssmShdw.pixelTop=document.body.scrollTop;
		bssm.pixelTop=document.body.scrollTop;
	}

	     if (ps2=="isMiddle" && basessmShadow.offsetTop-50>winY) {lastY = lastY+smooth;}
	else if (ps2=="isMiddle") {lastY=winY-X2appear;}
	else {lastY = lastY+smooth;}

	if (winY>=X2appear && ps=="isUp") {
		bssm.top=bssmShdw.top=posForStaticAction;
		bssm.left=bssmShdw.left=XOffset-menuWidth;
		ssmShdw.pixelLeft=ssm.pixelLeft=0;
		bssm.filter=bssmShdw.filter="alpha(opacity=0)";
		ps="isDown";
		fadeIn()
	}

	if (winY<X2appear && ps=="isDown") {
		YOffset=X2appear;
		fadeOut()
		ps="isUp";
	}

	setTimeout('makeItStatic()', 4)

}

function initSlide() {
	winY = document.body.scrollTop;
	if (winY <= YOffset) {
		ssm=document.all("thessm").style;
		bssm=document.all("basessm").style
		bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";
		bssm.visibility = "visible";
		bssm.height = thessm.offsetHeight;

		ssmShdw=document.all("thessmShadow").style
		bssmShdw=document.all("basessmShadow").style
		bssmShdw.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";
		bssmShdw.visibility = "visible";

		ssmShdw.height = thessm.offsetHeight+5;
		ssmShdw.width = thessm.offsetWidth+5;

		bssmShdw.height = thessmShadow.offsetHeight;

		bssmShdw.left = XOffset;
		bssmShdw.top = YOffset;
		ssmShdw.left = -menuWidth;
		bssm.left = XOffset;
		bssm.top = YOffset;
		ssm.left = -menuWidth;
	}
	actionIsBuilt=1;
	if (menuIsStatic=="yes") makeItStatic();
}
