ManiMenuSelected="#000000";
ManiMenuBKSelected="";


var scriptLocale="";var cswmOM="document.all.";var cswmBgCo=".style.backgroundColor";var cswmCo=".style.color";var cswmDi=".style.display";var cswmTI="";var cswmClkd=-1;var cswmPI=new Array();var cswmPx=new Array();var cswmPy=new Array();var cswmPW=0;var cswmPH=0;var cswmSPnt="";var cswmDir="";var cswmMB=0;var cswmSI="";var cswmSE=new Object();var cswmSEL=0;var cswmSET=0;var cswmSEH=0;var cswmSEW=0;var cswmBW=0;var cswmBH=0;var cswmAR=0;var cswmAB=0;var cswmSLA=0;var cswmSTA=0;var cswmExIS=".Popup.gif";var cswmExdIS=".SelectedPopup.gif";var cswmCTH=-1;var cswmXOff=0;var cswmYOff=0;var cswmFP=0;var cswmSH=false;var cswmSTI=0;document.onclick=cswmEV;function cswmEV(){if(cswmClkd!=-1){cswmHP(0);cswmDir="right";cswmClkd=-1;}}var cswmTS=0;var cswmTL=0;var cswmTTI="";function cswmT(ms){if(ms!="off"){if(cswmCTH==0){cswmTI=setTimeout("cswmPixO(1);cswmClkd=-1;",ms);}}else{clearTimeout(cswmTI);}}function cswmST(l,g,i){if(i){cswmHP(l);cswmSP(g,i);}else if(l){cswmHP(l);}}

function chmenuBgGreyArrow(id){
	//alert("grey arrow");	
document.getElementById(id+"0").className = "menuOverCorLt";
document.getElementById(id+"1").className = "menuOverCorCt2";
document.getElementById(id+"2").className = "menuOverCorRt";
/*var nextTD = document.getElementById(id).nextSibling;
if(nextTD) {
	var nextTDLtLineId = nextTD.id+"0";
	if(document.getElementById(nextTDLtLineId))
		document.getElementById(nextTDLtLineId).className ="";
}*/

var rowObj = document.getElementById(id).parentNode;
var indx =	document.getElementById(id).cellIndex;
//alert("index = "+indx);
var cellsAr = rowObj.cells;
var length = cellsAr.length;

if(indx+1 < length && cellsAr[indx+1])  {
	if(document.getElementById((cellsAr[indx+1].id))) {
		var lineTDId = cellsAr[indx+1].id+"0";
		document.getElementById(lineTDId).className ="";
	}
}

}
function chmenuBgGrey(id){
	//alert("grey");	
document.getElementById(id+"0").className = "menuOverCorLt";
document.getElementById(id+"1").className = "menuOverCorCt";
document.getElementById(id+"2").className = "menuOverCorRt";

var rowObj = document.getElementById(id).parentNode;
var indx =	document.getElementById(id).cellIndex;
var cellsAr = rowObj.cells;
var length = cellsAr.length;
//alert("length = "+length)
if(indx+1 < length && cellsAr[indx+1])  {
	//alert("cellsAr[indx+1] id = "+cellsAr[indx+1].id);
	if(document.getElementById((cellsAr[indx+1].id))) {
		var lineTDId = cellsAr[indx+1].id+"0";
		document.getElementById(lineTDId).className ="";
	}
}


/*var nextTD = document.getElementById(id).nextSibling;
if(nextTD) {
	var nextTDLtLineId = nextTD.id+"0";
	if(document.getElementById(nextTDLtLineId))
		document.getElementById(nextTDLtLineId).className ="";
}*/

}
function chmenuBgBlue(id){
document.getElementById(id+"0").className = "level2ContainerTd";
document.getElementById(id+"1").className = "";
document.getElementById(id+"2").className = "";


/*var nextTD = document.getElementById(id).nextSibling;
if(nextTD) {
	var nextTDLtLineId = nextTD.id+"0";
	if(document.getElementById(nextTDLtLineId))
		document.getElementById(nextTDLtLineId).className ="level2ContainerTd";
}*/

var rowObj = document.getElementById(id).parentNode;
var indx =	document.getElementById(id).cellIndex;
var cellsAr = rowObj.cells;
var length = cellsAr.length;

if(indx+1 < length && cellsAr[indx+1])  {
	if(document.getElementById((cellsAr[indx+1].id))) {
		var lineTDId = cellsAr[indx+1].id+"0";
		document.getElementById(lineTDId).className ="level2ContainerTd";
	}
}

}

function 
cswmShow(id,srcid,relpos,local,arrowFlag,offsetX,offsetY,fixedpos){
	if(arrowFlag == "true") {
		chmenuBgGreyArrow(id);
	} else {
		chmenuBgGrey(id);
	}
	clearTimeout(cswmTI);
	scriptLocale=local;
	if(cswmClkd!=id){
		cswmHP(0);
		cswmSI=srcid;
		cswmSPnt=relpos;
		cswmClkd=id;
		cswmDir="right";
		
		if(document.all["cswmPopup"+id]){
		
			if(offsetX)
				cswmXOff=offsetX;
			if(offsetY)
				cswmYOff=offsetY;
			if(fixedpos)
				cswmFP=fixedpos;
			cswmSP(id);
			}
	
	}


}



function cswmHide(id){
	
	cswmTI=setTimeout("cswmPixO(1);cswmClkd=-1;", 350);
	if(id!=null&&id!="")
		chmenuBgBlue(id)
	}

	function cswmHiI(id,bgco){if(document.all["cswmIcoOn"+id]){if(document.all["cswmIco"+id])document.all["cswmIco"+id].style.display="none";document.all["cswmIcoOn"+id].style.display="inline";} if(document.all["cswmItem"+id])document.all["cswmItem"+id].style.color=ManiMenuSelected;if(document.all["cswmExpand"+id])document.all["cswmExpand"+id].style.color="#000000";if(bgco!=null){if(document.all["cswmItem"+id])document.all["cswmItem"+id].style.backgroundColor=bgco;if(document.all["cswmExpand"+id])document.all["cswmExpand"+id].style.backgroundColor=bgco;}else{if(document.all["cswmItem"+id])document.all["cswmItem"+id].style.backgroundColor=ManiMenuBKSelected;if(document.all["cswmExpand"+id])document.all["cswmExpand"+id].style.backgroundColor=ManiMenuBKSelected;}if(document.all["cswmExpandIc"+id]){document.all["cswmExpandIc"+id].src=cswmExdIS;}}
	function cswmDiI(id,bgco){if(document.all["cswmIcoOn"+id]){if(document.all["cswmIco"+id])document.all["cswmIco"+id].style.display="inline";if(document.all["cswmIcoOn"+id])document.all["cswmIcoOn"+id].style.display="none";}if(document.all["cswmItem"+id])document.all["cswmItem"+id].style.color="#0096D7";if(document.all["cswmExpand"+id])document.all["cswmExpand"+id].style.color="#000000";if(bgco!=null){if(document.all["cswmItem"+id])document.all["cswmItem"+id].style.backgroundColor=bgco;if(document.all["cswmExpand"+id])document.all["cswmExpand"+id].style.backgroundColor=bgco;}else{if(document.all["cswmItem"+id])document.all["cswmItem"+id].style.backgroundColor="";if(document.all["cswmExpand"+id])document.all["cswmExpand"+id].style.backgroundColor="";}if(document.all["cswmExpandIc"+id]){document.all["cswmExpandIc"+id].src=cswmExIS;}}function cswmHideSelectBox(boolHide,arrSelectList){if(navigator.platform!="MacPPC"){if(arrSelectList){document.cswmSelects=new Array();var SelectID=new String();var iCount=0;for(iCount=0;iCount<arrSelectList.length;iCount++){SelectID=arrSelectList[iCount];document.cswmSelects[iCount]=document.all[SelectID];}}if(!document.cswmSelects){document.cswmSelects=new Array();}if(boolHide==true && !cswmSH){document.cswmSelects=new Array();var iCount=0;var iCount2=0;var Selects = document.getElementsByTagName("select");for(iCount=0;iCount<Selects.length;iCount++){if(Selects[iCount].style.visibility != "visible"){document.cswmSelects[iCount2]=Selects[iCount];iCount2++;}}}}var iCount=0;if(boolHide==true){for(iCount=0;iCount<document.cswmSelects.length;iCount++){document.cswmSelects[iCount].style.visibility="visible";}cswmSH=true;}if(boolHide==false){for(iCount=0;iCount<document.cswmSelects.length;iCount++){document.cswmSelects[iCount].style.visibility="visible";}cswmSH=false;}}
	function cswmSP(id,itemid){cswmHideSelectBox(true);if(!itemid){clearTimeout(cswmTTI);if(cswmFP){cswmSEL=cswmXOff;cswmSET=cswmYOff;cswmSEH=1;cswmSEW=1;cswmFP=0;}else{cswmSE=new Object(document.all[cswmSI]);var cswmPrO=cswmSE;var cswmPrT="";cswmSEL=cswmSE.offsetLeft+cswmXOff;cswmSET=cswmSE.offsetTop+cswmYOff;cswmSEH=cswmSE.offsetHeight;cswmSEW=cswmSE.offsetWidth;while(cswmPrT!="BODY"){cswmPrO=cswmPrO.offsetParent;cswmSEL+=cswmPrO.offsetLeft;cswmSET+=cswmPrO.offsetTop;cswmPrT=cswmPrO.tagName;}if(navigator.platform=="MacPPC"){cswmSEL+=Number(document.body.leftMargin);cswmSET+=Number(document.body.topMargin);}}
	
	if(document.all["cswmPopup"+id]) {
		document.all["cswmPopup"+id].style.display="block";
	cswmPW=document.all["cswmPopup"+id].clientWidth;
	cswmPH=document.all["cswmPopup"+id].clientHeight;
	}
	cswmBW=document.body.clientWidth;
	cswmBH=document.body.clientHeight;
	cswmSLA=document.body.scrollLeft;
	cswmSTA=document.body.scrollTop;
	
	switch(cswmSPnt){
		
	case "above":cswmPx[cswmPx.length]=cswmSEL;cswmPy[cswmPy.length]=cswmSET-cswmPH;cswmCA();cswmCR();break;
	
	case "below":
	cswmPx[cswmPx.length]=cswmSEL;
	cswmPy[cswmPy.length]=cswmSET+cswmSEH;
	cswmCB();
	cswmCR();
	break;
	
	case "right":cswmPx[cswmPx.length]=cswmSEL+cswmSEW;cswmPy[cswmPy.length]=cswmSET;cswmCR();cswmCB();break;
	
	case "left":
	if(scriptLocale=="en"){
	cswmPx[cswmPx.length]=cswmSEL;
	cswmPy[cswmPy.length]=cswmSET+cswmSEH;
	cswmCB();
	cswmCR();
	}else{
	cswmPx[cswmPx.length]=cswmSEL-cswmPW;
	cswmPy[cswmPy.length]=cswmSET;
	cswmCL();
	cswmCB();
	cswmDir="left";
	}
	
	break;
	}
	cswmXOff=0;
	cswmYOff=0;
	if(scriptLocale=="en"){
	if(document.all["cswmPopup"+id])
		document.all["cswmPopup"+id].style.left=cswmPx[cswmPx.length-1];
	if(document.all["cswmPopup"+id])
		document.all["cswmPopup"+id].style.top=cswmPy[cswmPy.length-1];
	}
	else{
	var tdIDWidth = document.all[id].clientWidth;//to get the height width of the menu td
	var tdIDHeight = document.all[id].clientHeight;
	if(document.all["cswmPopup"+id])document.all["cswmPopup"+id].style.left=cswmPx[cswmPx.length-1] + tdIDWidth;
	if(document.all["cswmPopup"+id])document.all["cswmPopup"+id].style.top=cswmPy[cswmPy.length-1]+ tdIDHeight;
	
	}

	cswmPI[cswmPI.length]=id;if(cswmTS==0){cswmPR=new Object(eval(cswmOM+"cswmPopup"+id));cswmPixI(30);cswmTS=1;}else{eval(cswmOM+"cswmPopup"+id+".style.filter=\"\"");}}else{eval(cswmOM+"cswmPopup"+id+".style.filter=\"\"");cswmPx[cswmPx.length]=document.all["cswmPopup"+cswmPI[cswmPI.length-1]].clientWidth+cswmPx[cswmPx.length-1]-4;var szPrE="";if(document.all["cswmItem"+itemid].parentElement.offsetTop==0){if(navigator.platform=="MacPPC"){var szPrE="parentElement.parentElement.";}else if(document.all["cswmItem"+itemid].parentElement.parentElement.parentElement.parentElement.className!="cswmPopupBox"){var szPrE="parentElement.parentElement.parentElement.";}}cswmPy[cswmPy.length]=eval(cswmOM+"cswmItem"+itemid+".parentElement."+szPrE+"offsetTop")+cswmPy[cswmPy.length-1];if(document.all["cswmPopup"+id])document.all["cswmPopup"+id].style.display="block";cswmPW=document.all["cswmPopup"+id].clientWidth;cswmPH=document.all["cswmPopup"+id].clientHeight;var cswmPrW=document.all["cswmPopup"+cswmPI[cswmPI.length-1]].clientWidth;cswmAR=cswmBW-cswmPx[cswmPx.length-1]+cswmSLA;cswmAB=cswmBH-cswmPy[cswmPy.length-1]+cswmSTA;if(cswmPx[cswmPx.length-2]==cswmSLA){cswmDir="right";}if((cswmAR<cswmPW)||(cswmDir=="left")){cswmMB=(cswmPx[cswmPx.length-1]-cswmPW-cswmPrW)+8;if((cswmMB>=0)&&(cswmMB>cswmSLA)){cswmDir="left";}else{cswmMB=cswmSLA;}cswmPx[cswmPx.length-1]=cswmMB;}if(cswmAB<cswmPH){cswmMB=cswmPy[cswmPy.length-1]-(cswmPH-cswmAB);if(cswmMB<0){cswmMB=cswmSTA;}cswmPy[cswmPy.length-1]=cswmMB;}if(document.all["cswmPopup"+id])document.all["cswmPopup"+id].style.left=cswmPx[cswmPx.length-1];if(document.all["cswmPopup"+id])document.all["cswmPopup"+id].style.top=cswmPy[cswmPy.length-1];cswmPI[cswmPI.length]=id;}}function cswmHP(level){if(level==0){cswmHideSelectBox(false);}var count=level;for(count=level;count<cswmPI.length;count++){if(document.all["cswmPopup"+cswmPI[count]])document.all["cswmPopup"+cswmPI[count]].style.display="none";}if(level==0&&cswmPI.length>0){}cswmPI.length=level;cswmPx.length=level;cswmPy.length=level;}function cswmCR(){cswmAR=(cswmBW+cswmSLA)-cswmPx[cswmPx.length-1];if(cswmAR<cswmPW){if(cswmSPnt=="below"||cswmSPnt=="above"){cswmMB=cswmPx[cswmPx.length-1]-(cswmPW-cswmAR);if(cswmMB<0||cswmMB<cswmSLA){cswmMB=cswmSLA;}cswmPx[cswmPx.length-1]=cswmMB;}else{cswmMB=cswmSEL-cswmPW;if(cswmMB>=0){cswmPx[cswmPx.length-1]=cswmMB;}}}}function cswmCL(){if(cswmPx[cswmPx.length-1]<(cswmSLA)){cswmPx[cswmPx.length-1]=cswmSEL+cswmSEW;cswmCR();}}function cswmCB(){cswmAB=(cswmBH+cswmSTA)-cswmPy[cswmPy.length-1];if(cswmAB<cswmPH){if(cswmSPnt=="below"){cswmMB=cswmPy[cswmPy.length-1]-cswmPH-cswmSEH;if(cswmMB>=0){cswmPy[cswmPy.length-1]=cswmMB;}}else{cswmMB=cswmPy[cswmPy.length-1]-(cswmPH-cswmAB);if(cswmMB<0||cswmMB<cswmSTA){cswmMB=cswmSTA;}cswmPy[cswmPy.length-1]=cswmMB;}}}function cswmCA(){if(cswmPy[cswmPy.length-1]<(cswmSTA)){cswmPy[cswmPy.length-1]=cswmSET+cswmSEH;cswmCB();}}function cswmPixI(level){cswmTL=level;if(level>1){/*cswmPR.style.filter="progid:DXImageTransform.Microsoft.Pixelate(maxsquare="+cswmTL+")"*/;setTimeout("cswmPixI(cswmTL-5);",50);}else{cswmPR.style.filter="";}}

	function cswmPixO(level){
		//alert("cswmPixO");
		cswmTL=level;
		cswmTS=0;
		if(level<30){
			var iCount=0;
			//for(iCount=0;iCount<cswmPI.length;iCount++){
				/*eval(cswmOM+"cswmPopup"+cswmPI[iCount]+".style.filter=\"progid:DXImageTransform.Microsoft.Pixelate(maxsquare=\"+cswmTL+\")\"");*/
				//}
				cswmTTI=setTimeout("cswmPixO(cswmTL+8);",50);
				}else{
					cswmHP(0);
					}
		}
		function cswmShowInFrame(MenuID,x,y){x+=document.body.scrollLeft;y+=document.body.scrollTop;cswmShow(MenuID,'','below',x,y,1);}function cswmRefresh(){}
