
// Cascading dHTML menu system v2.0
// James Austin 2003

function openMe(newin) {
        flyout=window.open(newin,"flyout","")
}

function menuOver() {
	clearTimeout(timeOn);
}

function menuOut() {
	timeOn = setTimeout("hideAllMenus()", 500);
}

function showMenuBlank(m_No, eventObj) {
	hideAllMenus();
	if (imageMenu[m_No] == false) {
	    if(!ns4) {
			var menuBox = getStyleObject('labelBox'+m_No);
			menuBox.backgroundColor = onColours[m_No];	
	    } else  {
			myStyle[m_No].bgColor=onColours[m_No];	
	    } 
	}
	menuActive[m_No] = true;
}
		function contains(node)
		{
			if (node == null) { return false; }
			if (node == this) { return true; }
			else { return this.contains(node.parentNode); }
		};

function showMenu(m_No, eventObj, align) {
/*if(this.contains(this.related)){
	alert("ok");
	return;
}
*/

	hideAllMenus();
    if(!ns4) {
		//modified kbk - 1/25/2007
		var x = 10;		
		var menuTop = 100;
		var menu = getStyleObject('menu'+m_No);
		x = getElementLeft('menuLabel'+m_No);
		menuTop = getElementTop('menuLabel'+m_No);
		if (op5) {
			if (imageMenu[m_No] == true) menuTop = getElementTop('menuLabel'+m_No) + getElementHeight('menuLabel'+m_No);
			else menuTop = getElementTop('menuLabel'+m_No) + 14;
			menu.pixelTop=menuTop;
 			menu.pixelLeft=x;
		} else {
			if (align == 'left') {
				//alert(menuTop+", "+getElementHeight('menuLabel'+m_No))
				//alert(document.getElementHeight)
				//alert(document.getElementById('label'+m_No).offsetHeight)
				//x -= 4;
				if(getElementHeight('menuLabel'+m_No)>0)
					menuTop += 4;
				else
					menuTop += 1+getElementHeight('labelBox'+m_No);
				menu.top=(1+menuTop+getElementHeight('menuLabel'+m_No)) +'px';
 				menu.left=x +'px';
			}
			if (align == 'centre') {
				menu.top=(1+menuTop+getElementHeight('menuLabel'+m_No)) +'px';
 				menu.left=((getElementWidth('menuLabel'+m_No)-getElementWidth('menu'+m_No))/2) + x +'px';
			}
			if (align == 'right') {
				menu.top=(1+menuTop+getElementHeight('menuLabel'+m_No)) +'px';
 				menu.left=(x + getElementWidth('menuLabel'+m_No)-getElementWidth('menu'+m_No)) + 1 +'px';
			}
		}
		var menuBox = getStyleObject('labelBox'+m_No);
		menuBox.backgroundColor = onColours[m_No];	
		//modified kbk - 1/25/2007
    } else  {
		var menu = getStyleObject('menu'+m_No);
		if (imageMenu[m_No]==true) {
			var img = getImage('menuLabel' + m_No);
			y = getImagePageTop(img) + getImagePageHeight(img);
		} else {
			var img = getImage('label' + m_No);
			myStyle[m_No].bgColor=onColours[m_No];	
			y = getImagePageTop(img) + 14;
		}
		x = getImagePageLeft(img);
		menu.top = y;
 		menu.left = x-1;
    } 
    var menuId = 'menu' + m_No;
	menuActive[m_No] = true;
    if(changeObjectVisibility(menuId, 'visible')) {
		opaCnt=0;
		kbkMenuEffectOn(menuId,"apr");
		return true;
    } else {
		return false;
    }
}
var opaCnt,opa;
var inlp=1;
var vel=80;
var timer;

function kbkMenuEffectOn(menuId,mode){
	opa=10;
	kbkMenuEffect(menuId,mode)
}

function kbkMenuEffectOff(menuId,mode){
	opa=-10;
	setTimeout("kbkMenuEffect('"+menuId+"', '"+mode+"')",80);
}

function kbkMenuEffect(menuId,mode){
	inlp=true;
	if(mode=="apr"){
		opaCnt+=opa;
		if(opaCnt>90);
			//clearTimeout(timer);
		else
			inlp=false;
	}
	else{
		opaCnt-=10;
		if(opaCnt<10);
			//clearTimeout(timer);
		else
			inlp=false;
	}
	//for(i=0;i<85;i+=5){
		/*
		alert(document.getElementById(menuId).style.opacity)
		if(document.getElementById(menuId).style.opacity){
		alert("oth");
			document.getElementById(menuId).style.opacity=opaCnt;
		}else if(document.getElementById(menuId).style.filter){
		alert("ie");
			document.getElementById(menuId).style.filter="alpha(opacity="+opaCnt+")";
		}
		window.status=opaCnt;
		*/
		//alert((opaCnt+10)<=100?(opaCnt+10):100)
		document.getElementById(menuId).style.MozOpacity=opaCnt/100;
		document.getElementById(menuId).style.opacity=opaCnt/100;
		tmp=(opaCnt*4)<=100?(opaCnt*4):100
		document.getElementById(menuId).style.filter="alpha(opacity="+tmp+")";
		//alert(opaCnt);
		//if(i==85) inlp=0;
		if(inlp==false)
			timer=setTimeout("kbkMenuEffect('"+menuId+"', '"+mode+"')",80);
		else{
			//if(opaCnt>90)
			clearTimeout(timer);
		}
	//}

}

function contns (contnr, contne) {
	var isParent = false;
	do {
		if ((isParent = contnr == contne))
			break;
		contne = contne.parentNode;
	}
	while (contne != null);
	return isParent;
}

function kbkIsMouseOver (elem, evt) {
	if (elem.contains && evt.fromElement) {
		return !elem.contains(evt.fromElement);
	}
	else if (evt.relatedTarget) {
		return !contns(elem, evt.relatedTarget);
	}
}

function kbkIsMouseOut (elem, evt) {
	if (elem.contains && evt.toElement) {
		return !elem.contains(evt.toElement);
	}
	else if (evt.relatedTarget) {
		return !contns(elem, evt.relatedTarget);
	}
}

function showSideMenu(m_No, eventObj) {
	hideAllMenus();
    if(!ns4) {
		var x = 10;
		var menuTop = 100;
		var menu = getStyleObject('menu'+m_No);
		x = getElementLeft('menuLabel'+m_No);
		menuTop = getElementTop('menuLabel'+m_No);
		if (op5) {
			if (imageMenu[m_No] == true) {
				menuTop = getElementTop('menuLabel'+m_No);
				x = getElementLeft('menuLabel'+m_No) + getElementWidth('menuLabel'+m_No);
			} else {
				menuTop = getElementTop('label'+m_No);
				x = getElementLeft('label'+m_No);
			}
			menu.pixelTop=menuTop;
 			menu.pixelLeft=x;
		} else {
			menu.top=menuTop +'px';
 			menu.left=(x + getElementWidth('menuLabel'+m_No)) +'px';
		}
		var menuBox = getStyleObject('labelBox'+m_No);
		menuBox.backgroundColor = onColours[m_No];	
    } else  {
		var menu = getStyleObject('menu'+m_No);
		if (imageMenu[m_No]==true) {
			var img = getImage('menuLabel' + m_No);
			x = getImagePageLeft(img) + getImagePageWidth(img);
		} else {
			var img = getImage('label' + m_No);
			myStyle[m_No].bgColor=onColours[m_No];	
			x = getImagePageLeft(img) + 2;
		}
		y = getImagePageTop(img);
		menu.top = y;
 		menu.left=x+2;
    } 
    var menuId = 'menu' + m_No;
	menuActive[m_No] = true;
    if(changeObjectVisibility(menuId, 'visible')) {
		return true;
    } else {
		return false;
    }
}


function showSubMenu(m_No, eventObj, tier, myAlign) {
   	hideAllMenusTier(tier);
    if(!ns4) {
		var x = 10;
		var menuTop = 100;
		var menu = getStyleObject('menu'+m_No);
		if (myAlign=='right') {
			x = getElementLeft('label'+m_No) + getElementWidth('label'+m_No);;
			menuTop = getElementTop('label'+m_No);
			if(imageMenu[m_No]==1) x = x; 
			if (op5) {
				menu.pixelTop=menuTop;
 				menu.pixelLeft= x;
			} else {
				//Edited by kbk - 1/20/2007
				x += 7;
				menu.top = menuTop +'px';
 				menu.left = x +'px';
			}
		} else {
			x = getElementLeft('label'+m_No);
			menuTop = getElementTop('label'+m_No);
			if (op5) {
				menu.pixelTop = menuTop ;
 				menu.pixelLeft = (x - menuWidths[m_No] - mIBW);
			} else {
				menu.top = menuTop + 'px';
	 			menu.left = (x - menuWidths[m_No] - mIBW) + 'px';
			}
		}
		var menuBox = getStyleObject('labelBox'+m_No);
		menuBox.backgroundColor = onColours[m_No];	
    } else  {
		var img = getImage('label' + m_No);
 		var x = getImagePageLeft(img) + getImagePageWidth(img);
 		var y = getImagePageTop(img);
		var menu = getStyleObject('menu'+m_No);
		if (myAlign=='right') {
			menu.left = x;
 			menu.top = y-2;
		} else {
			menu.left = x - menu.clip.right;
 			menu.top = y-2;
		}
		if (imageMenu[m_No] == false) myStyle[m_No].bgColor=onColours[m_No];		
    }
	//Changes by kbk[Bharat] 1/19/2007 start
	//menu.left = menu.left;
	//menu.top = menu.top;
	//Changes by kbk[Bharat] 1/19/2007 end
	menuActive[m_No] = true;
    var menuId = 'menu' + m_No;
    if(changeObjectVisibility(menuId, 'visible')) {
		return true;
    } else {
		return false;
    }
}


function hideAllMenus() {
    for(counter = 1; counter <= numMenus; counter++) {
		if (menuActive[counter] == true) {
			//kbkMenuEffectOff('menu' + counter,"dapr");
			changeObjectVisibility('menu' + counter, 'hidden');
			menuActive[counter] = false;
			if (imageMenu[counter] == false) {				
				if (ns4) {
					if (myStyle[counter]) myStyle[counter].bgColor=offColours[counter];
				} else {
					var menuBox = getStyleObject('labelBox'+counter);
					menuBox.backgroundColor = offColours[counter];	
				}
			} 
   		}
   }
}

function hideAllMenusTier(tierNum) {
	for(counter = 1; counter <= numMenus; counter++) {
		if (menuActive[counter] == true) {
			if (tier[counter] > tierNum) {
				changeObjectVisibility('menu' + counter, 'hidden');
				menuActive[counter] = false;
				if (imageMenu[counter] == false) {					
					if (ns4) {
						myStyle[counter].bgColor=offColours[counter];
					} else {
						var menuBox = getStyleObject('labelBox'+counter);
						menuBox.backgroundColor = offColours[counter];	
					}	
				}
			}
    	}
	}
}
	
	
	
function startMenuBar(width, numMenus) {
	currentMenuLabel = 0;
	if (ns4) {
		document.write('<table width="' + width + '" cellpadding="0" cellspacing="0" border="0">');
		if (bC != null)	{
			document.write('<tr><td bgColor="' + bC + '" colspan="' + ((numMenus*2) + 1) + '"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>');
		}
		document.write('<tr>');
		if (bC != null)	{
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>\n');	
		}
	} else {
		// Edited by kbk - 1/19/2007
		document.write('<table id="kbkTab" width="' + width + '" cellpadding="0" cellspacing="0" border="0"><tr>');	
	}
}

function endMenuBar(numMenus) {
	document.write('</tr>');
	if (ns4) {
		if (bC != null)	{
			document.write('<tr><td bgColor="' + bC + '" colspan="' + ((numMenus*2) + 1) + '"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>');
		}
	}
	document.write('</table>\n');
}


function startMenu(m_No, width, borderColor){//kbkParam) {	//width) {
	//Added 13/07/2007 - kbk : To pass more parameter without disturbing the no. of parameters, so that other calls to this function will not get affected
	/*borderColor="80ffff";
	width=null;
	if((typeof kbkParam == "object") && (kbkParam!=null)){
		//alert(kbkParam);
		kbkObj = eval(kbkParam);
		width = kbkObj.width;
		borderColor = kbkObj.borderColor;
	}else
		width = kbkParam;
	*/
	//End Added 13/07/2007 - kbk : To pass more parameter without disturbing the no. of parameters, so that other calls to this function will not get affected
	//if( (typeof(borderColor)=="null") || (typeof(borderColor)=="undefined") ){borderColor="80ffff";}
	if( !kbkIsParamDefined(borderColor) ){borderColor="80ffff";}
	currentMenu = m_No;
	menuWidths[m_No] = width;
	currentMenuItem = 0;
	
	if (ns4) {
		document.write('<div id="menu' + m_No + '" name="menu' + m_No + '" class="myMenu">');
		document.write('<table ');
		if (width != null) {
		 	document.write('width="' + width + '" ');
		}
		document.write('cellpadding="0" cellspacing="0" border="0">');
		if (bC != null) {
		document.write('<tr><td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		 document.write('</tr>\n');	
	} else {
		document.write('<div id="menu' + m_No + '" name="menu' + m_No + '" class="myMenu"');
		if(( kbkIsParamDefined(borderColor) ))
			document.write('style="border-bottom: #88abe6 0px solid;"');
		document.write('>');
		//Modified by kbk - 1/23/2007
		//Modified by kbk -13/07/2007
		document.write('<table style="border-color: '+borderColor+';border-style: solid; border-width: 2px;border-left-style:none;border-right-style:none;"');
		if (width != null) {
		 	document.write('width="' + width + '" ');
		}
		document.write('cellpadding="0" cellspacing="0" >');
		/*//Added - kbk - 1/22/2007
		document.write('<tr><td>');
		document.write('<table cellpadding="0" cellspacing="0"><tr>');
		document.write('<td><img src="images/kbkCornerTopLeft.gif"</td>');
		document.write('<td width="100%" bgcolor="92b6ff"></td>');
		document.write('<td><img src="images/kbkCornerTopRight.gif"</td>');
		document.write('</tr></table>');
		document.write('</tr></td>');
		//Added - kbk - 1/22/2007
		//*/
	}	
}
	
function endMenu() {
	document.write('</table></div>');
}

function menuSpacer(width, offColour) {		
	var tier2 = tier[currentMenu];
	currentMenuItem = currentMenuItem + 1;
	
	if(ns4) {
		document.write('<tr>');
		if (bC != null) {
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		document.write('<td ');
		if (width != null) {
		 	document.write('width="' + (width+3) + '" ');
		} else {
		 	document.write('width="100%" ');
		}
		document.write('valign="middle"><ilayer width="' + (width+3) + '">');
		document.write('<layer ');
		if (width != null) {
		 	document.write('width="' + (width+3) + '" ');
		} else {
		 	document.write('width="100%" ');
		}
		document.write('onmouseover="menuOver();  hideAllMenusTier(' + tier2 + ');" ');
		document.write('onmouseout="menuOut();" ');
		document.write('bgcolor="' + offColour + '">');
		document.write('<hr>');
		document.write('</layer></ilayer></td>');
		if (bC != null) {
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		document.write('</tr>');
		if (bC != null) {
			document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');
		}
	} else {
		document.write('<tr><td ');
		document.write('onMouseover="menuOver(); hideAllMenusTier(' + tier2 + ');" ');
		document.write('onMouseout = "menuOut();" ');
		if (width != null) {
			document.write('width="100%" ');
		}
		document.write('bgcolor="' + offColour + '" valign="middle" height="10" ');
		if (bC != null) {
			document.write('style="border: ' + bC + ' 1px solid;"');
		}
		document.write('><div>');
		document.write('<hr>');
		document.write('</div></td></tr>');
	}		
}

function menuSpacer_New(width, offColour,height) {		
	var tier2 = tier[currentMenu];
	currentMenuItem = currentMenuItem + 1;
	
	if(ns4) {
		document.write('<tr>');
		if (bC != null) {
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		document.write('<td ');
		if (width != null) {
		 	document.write('width="' + (width+3) + '" ');
		} else {
		 	document.write('width="100%" ');
		}
		document.write('valign="middle"><ilayer width="' + (width+3) + '">');
		document.write('<layer ');
		if (width != null) {
		 	document.write('width="' + (width+3) + '" ');
		} else {
		 	document.write('width="100%" ');
		}
		document.write('onmouseover="menuOver();  hideAllMenusTier(' + tier2 + ');" ');
		document.write('onmouseout="menuOut();" ');
		document.write('bgcolor="' + offColour + '">');
		document.write('</layer></ilayer></td>');
		if (bC != null) {
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		document.write('</tr>');
		if (bC != null) {
			document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');
		}
	} else {
		document.write('<tr><td ');
		document.write('onMouseover="menuOver(); hideAllMenusTier(' + tier2 + ');" ');
		document.write('onMouseout = "menuOut();" ');
		if (width != null) {
			document.write('width="100%" ');
		}
		document.write('bgcolor="' + offColour + '" valign="middle" height="' + height + '" ');
		if (bC != null) {
			document.write('style="border: ' + bC + ' 1px solid;"');
		}
		document.write('><div>');
		document.write('</div></td></tr>');
	}		
}

		
function menuItem(label, m_No, width, onColour, offColour, url, myAlign,forcolor, kbkBorderColor) {	
	if (m_No != null) {	
		offColours[m_No] = offColour;
		onColours[m_No] = onColour;
		tier[m_No] = tier[currentMenu] + 1;
	}
	var tier2 = tier[currentMenu];
	currentMenuItem = currentMenuItem + 1;
	mI_No = 'mI' + currentMenu + currentMenuItem;
	//Added 13/07/2007 - kbk : To allow changes in border color which appears as background color in menu.
	if(typeof(kbkBorderColor)=='null' || typeof(kbkBorderColor)=='undefined'){
		kbkBorderColor='99e1fa';
	}
	if(ns4) {
		document.write('<tr>');
		if (bC != null) {
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		document.write('<td ');
		if (width != null) {
		 	document.write('width="' + width + '" ');
		} else {
		 	document.write('width="100%" ');
		}
		document.write('valign="middle">');
		document.write('<ilayer id="menuItemOuter' + mI_No + '" name="menuItemOuter' + mI_No + '">');
		document.write('<layer ');
		if (width != null) {
		 	document.write('width="' + width + '" ');
		} else {
		 	document.write('width="100%" ');
		}
		if (m_No != null) {
			document.write('onmouseover="menuOver(); return !showSubMenu(' + m_No + ', event, ' + tier2 + ', \'' + myAlign + '\');" ');
			document.write('onmouseout="menuOut();" ');
		} else {
			document.write('onmouseover="bgColor=\'' + onColour + '\'; menuOver();  hideAllMenusTier(' + tier2 + ');" ');
			document.write('onmouseout="bgColor=\'' + offColour + '\'; menuOut();" ');	
		}
		document.write('id="menuItem' + mI_No + '" name="menuItem' + mI_No + '" ');
		document.write('bgcolor="' + offColour + '">');
		if (m_No == null) document.write('<img src="images/shim.gif" width="1" height="1" border="0" align="right">\n');
		if (url == '') document.write('<a class="MenuItemLink" >\n');
		else document.write('<a class="MenuItemLink" href="' + url + '" target="' + targetFrame + '">\n');
		if (uMIB == 1) {
			if (m_No != null ) document.write('<img src="' + sMBOff.src + '" width="' + sMBW + '" height="' + sMBH + '" border="0" align="left" name="menuBullet' + mI_No + '" id="menuBullet' + mI_No + '">\n');
			else document.write('<img src="' + mIBOff.src + '" width="' + mIBW + '" height="' + mIBH + '" border="0" align="left" name="menuBullet' + mI_No + '" id="menuBullet' + mI_No + '">\n');
		}
		if (m_No != null) document.write('<img src="' + sMA.src + '" width="' + sMAW + '" height="' + sMAH + '" border="0" align="right">');
		document.write(label + '</a>');
		document.write('</layer></ilayer>');
		if (m_No != null) document.write('<img src="images/shim.gif" width="1" height="1" border="0" align="' + myAlign + '" id="label' + m_No + '" name="label' + m_No + '">');
		document.write('</td>');
		if (bC != null) {
			document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
		}
		document.write('</tr>');
		if (bC != null) {
			document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');
		}
		if (m_No != null) myStyle[m_No] = eval('document.menu' + currentMenu + '.document.menuItemOuter' + mI_No + '.document.menuItem' + mI_No);
	} else {
		document.write('<tr><td ');
		if (width != null) {
		 	document.write('width="100%" ');
		}
		document.write('bgcolor="' + offColour + '" valign="middle" height="17" ');
		//Edited by kbk - 1/22/2007
		if (bC != null) {
			if (currentMenuItem == 1) {
				document.write('style="filter:alpha(opacity=90); opacity: 0.90;border-left: ' + bC + ' 4px solid;border-right: ' + bC + ' 4px solid;border-bottom: ' + bC + ' 1px solid;border-top: ' + bC + ' 1px solid;border-color: '+kbkBorderColor+';" ');
			} else {
				document.write('style="filter:alpha(opacity=90); opacity: 0.90;border-left: ' + bC + ' 4px solid;border-right: ' + bC + ' 4px solid;border-bottom: ' + bC + ' 1px solid;border-color: '+kbkBorderColor+';" ');
			}
		}
		//Edited by kbk - 1/22/2007
		document.write('id="labelBox' + m_No + '" name="labelBox' + m_No + '" ');
		if (m_No != null) {
			document.write('onmouseover="');
			if (uMIB == 1) {
				document.write('menuBullet' + mI_No + '.src=sMBOn.src; ');
			}
			document.write('menuOver(); return !showSubMenu(' + m_No + ', event, ' + tier2 + ', \'' + myAlign + '\');"  ');
			document.write('onmouseout="menuOut(); ');
		} else {
			document.write('onMouseover="this.style.backgroundColor = \'' + onColour + '\'; ');
			if (uMIB == 1) {
				document.write('menuBullet' + mI_No + '.src=mIBOn.src; ');
			}	
			document.write('menuOver(); hideAllMenusTier(' + tier2 + ');" ');
			document.write('onMouseout = "this.style.backgroundColor = \'' + offColour + '\'; menuOut(); ');	
		}
		if (uMIB == 1) {
			if (m_No != null) document.write('menuBullet' + mI_No + '.src=sMBOff.src;" ');
			else document.write('menuBullet' + mI_No + '.src=mIBOff.src;" ');
		} else {
			document.write('"');
		}
		if (url != '') {
			if (targetType=='self') document.write('onClick="document.location.href=\'' + url + '\';" ');
			if (targetType=='new') document.write('onClick="openMe(\'' + url + '\'); return false;" ');
			if (targetType=='frame') document.write('onClick="parent.' + targetFrame + '.document.location.href=\'' + url + '\';" ');
			if (targetType=='iframe') document.write('onClick="' + targetFrame + '.location.href=\'' + url + '\';" ');
			document.write('<div id="menuItem' + mI_No + '" name="menuItem' + mI_No + '"');
			document.write('><a class="MenuItemLink" href="' + url + '" target="' + targetFrame + '">');
		}
		else {
			document.write('<div id="menuItem' + mI_No + '" name="menuItem' + mI_No + '"');
			document.write('><a class="MenuItemLink" >');
		}
		if (uMIB == 1) {
			if (m_No != null) document.write('<img src="' + sMBOff.src + '" width="' + sMBW + '" height="' + sMBH + '" border="0" align="left" name="menuBullet' + mI_No + '" id="menuBullet' + mI_No + '">');
			else document.write('<img src="' + mIBOff.src + '" width="' + mIBW + '" height="' + mIBH + '" border="0" align="left" name="menuBullet' + mI_No + '" id="menuBullet' + mI_No + '">');
		}
		
		if(m_No != null) {
			if(myAlign=='right') {
				document.write('<img src="' + sMA.src + '" width="' + sMAW + '" height="' + sMAH + '" border="0" align="right" id="label' + m_No + '" name="label' + m_No + '">');
			} else {
				document.write('<img src="' + sMA.src + '" width="' + sMAW + '" height="' + sMAH + '" border="0" align="right">');
				document.write('<img src="images/shim.gif" width="1" align="top" height="1" border="0"  id="label' + m_No + '" name="label' + m_No + '">');
			} 
		} else {
			document.write('<img src="images/shim.gif" width="1" align="top" height="1" border="0">');
		}
		document.write('&nbsp;' + label);
		document.write('</a></div></td></tr>');
	}		
}

//modified - kbk - 1/27/2007
	function menuLabel(label, m_No, width, onColour, offColour, url, align) {
		tier[m_No] = 0;
		offColours[m_No] = offColour;
		onColours[m_No] = onColour;
		currentMenuLabel = currentMenuLabel + 1;
		//kbk 1/23/2007
		if (width==null){
			//width=(document.body.clientWidth-90)/6;
		}
		
		if(ns4) {
			document.write('<td width="' + width + '" valign="middle" height="2" align="left"><ilayer id="menuLabelOuter' + m_No + '" name="menuLabelOuter' + m_No + '"><layer width="' + width + '" onmouseover="menuOver(); ');
			if (align != null) document.write('return !showMenu(' + m_No + ', event, \'' + align + '\'); ');
			else document.write('return !showMenuBlank(' + m_No + ', event, \'' + align + '\'); ');
			
			if (url == '') document.write('return false;" onmouseout="menuOut();" id="menuLabel' + m_No + '" name="menuLabel' + m_No + '" bgcolor="' + offColour + '"><a class="MenuItemLink" >');
			else document.write('return false;" onmouseout="menuOut();" id="menuLabel' + m_No + '" name="menuLabel' + m_No + '" bgcolor="' + offColour + '"><a class="MenuItemLink" href="' + url + '" target="' + targetFrame + '">');
			if (uMLB == 1) {
				document.write('<img src="' + mLBOff.src + '" width="' + mLBW + '" height="' + mLBH + '" border="0" align="left" name="menuBullet' + m_No + '" id="menuBullet' + m_No + '">');
			}
			document.write('<b>'+label + '</b></a></layer></ilayer><img src="images/shim.gif" width="1" height="1" border="0" align="left" id="label' + m_No + '" name="label' + m_No + '"></td>');
			if (bC != null) {
				document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>\n');
			}
			myStyle[m_No] = eval('document.menuLabelOuter' + m_No + '.document.menuLabel' + m_No);
		} else {
			document.write('<td width="'+width + '" bgcolor="' + offColour + '" valign="middle" height="17" ');
			if (bC != null) {
				if (currentMenuLabel == 1) {
					//document.write('style="border-top: ' + bC + ' 1px solid; border-bottom: ' + bC + ' 1px solid; " ');
				} else {
					//commented my Kori Bharat Kumar 
					//document.write('style=" border-left: ' + bC + ' 1px solid;" ');
				}
			}
			document.write('id="labelBox' + m_No + '" name="labelBox' + m_No + '" align="left"><div id="menuLabel' + m_No + '" name="menuLabel' + m_No + '" onmouseover="if (kbkIsMouseOver(this,event)){');//onmouseover="if (!this.contains(event.fromElement)){');
			if (uMLB == 1) {
				document.write('label' + m_No + '.src=mLBOn.src; ');
			}
			if (align != null) document.write('menuOver(); return !showMenu(' + m_No + ', event,  \'' + align + '\');}"  onmouseout="if (kbkIsMouseOut(this,event)){');//onmouseout="if (!this.contains(event.fromElement)){');
			else document.write('menuOver(); return !showMenuBlank(' + m_No + ', event,  \'' + align + '\');""  onmouseout="if (kbkIsMouseOut(this,event)){');
			if (uMLB == 1) {
				document.write('label' + m_No + '.src=mLBOff.src; ');
			}
			document.write('menuOut();}" ');
			if (url != ''){
				if (targetType=='self') document.write('onClick="document.location.href=\'' + url + '\';" ');
				if (targetType=='new') document.write('onClick="openMe(\'' + url + '\'); return false;" ');
				if (targetType=='frame') document.write('onClick="parent.' + targetFrame + '.document.location.href=\'' + url + '\';" ');
				if (targetType=='iframe') document.write('onClick="' + targetFrame + '.location.href=\'' + url + '\';" ');
				document.write('><a class="MenuItemLink" href="' + url + '" target="' + targetFrame + '">');
			}
			else {
				//Edited by kbk - 1/20/2007
				document.write('><a href="#Browse menu"class="MenuItemLink" >');
			}
			//Added by kbk - 1/19/2007
			document.write('<span id="span'+label+'">');
			if (uMLB == 1) {
				document.write('<img src="' + mLBOff.src + '" width="' + mLBW + '" height="' + mLBH + '" border="0" align="left" id="label' + m_No + '" name="label' + m_No + '">');
			} else {
				if (op5) {
					document.write('<img src="images/shim.gif" width="1" height="1" border="0" align="left" id="label' + m_No + '" name="label' + m_No + '">');
				}
				document.write('<img src="images/shim.gif" width="1" height="1" border="0" align="left" id="label' + m_No + '" name="label' + m_No + '">');
			}
			//Edited kbk - 1/19/2007
			document.write('&nbsp;<b>' + label + '</b></span></a></div></td>\n');
			document.getElementById("span"+label).style.width="100%";
		}		
	}
	
//modified - kbk - 1/27/2007
	function startSideMenuBar(width) {
		currentMenuLabel = 0;
		if (ns4) {
			document.write('<table width="' + width + '" cellpadding="0" cellspacing="0" border="0">');
			if (bC != null) {
				document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');	
			}
		}
		else document.write('<table width="' + width + '" cellpadding="0" cellspacing="0" border="0">\n');	
	}
	
	function endSideMenuBar() {
		document.write('</table>\n');
	}
	
	function sideMenuLabel(label, m_No, width, onColour, offColour, url, align, kbkSideBorder) {
		tier[m_No] = 0;
		offColours[m_No] = offColour;
		onColours[m_No] = onColour;
		currentMenuLabel = currentMenuLabel + 1;
		
		if(ns4) {
			document.write('<tr>');
			if (bC != null) {
				document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
			}
			document.write('<td height="20" width="' + width + '" valign="middle" height="2"><ilayer id="menuLabelOuter' + m_No + '" name="menuLabelOuter' + m_No + '"><layer width="' + width + '" onmouseover="menuOver(); ');
			if (align != null) document.write('return !showSideMenu(' + m_No + ', event);" '); 
			else document.write('return !showMenuBlank(' + m_No + ', event);" '); 
			if (url == '') document.write('onmouseout="menuOut();" id="menuLabel' + m_No + '" name="menuLabel' + m_No + '" bgcolor="' + offColour + '"><a class="MenuItemLink" >\n');
			else document.write('onmouseout="menuOut();" id="menuLabel' + m_No + '" name="menuLabel' + m_No + '" bgcolor="' + offColour + '"><a class="MenuItemLink" href="' + url + '" target="' + targetFrame + '">\n');
			if (uMLB == 1) {
				document.write('<img src="' + mLBOff.src + '" width="' + mLBW + '" height="' + mLBH + '" border="0" align="left" name="menuBullet' + m_No + '" id="menuBullet' + m_No + '">\n');
			}
			document.write('' + label + '</a></layer></ilayer><img src="images/shim.gif" width="1" height="1" border="0" align="right" id="label' + m_No + '" name="label' + m_No + '"></td>');
			if (bC != null) {
				document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
			}
			document.write('</tr>');
			if (bC != null) {
				document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');
			}
			myStyle[m_No] = eval('document.menuLabelOuter' + m_No + '.document.menuLabel' + m_No);
		} else {
			document.write('<tr><td height="20" width="' + width + '" align="left" bgcolor="' + offColour + '" valign="middle" height="12" ');
			if (bC != null) {
				if (currentMenuLabel == 1) {
					//modified 10/07/2007 -kbk to remove left and right border
					//document.write('style="border: ' + bC + ' 1px solid;" ');
					document.write('style="border-top: ' + bC + ' 1px solid;border-bottom: ' + bC + ' 1px solid;" ');
				} else {
					//modified 10/07/2007 -kbk to remove left and right border
					//document.write('style="border-left: ' + bC + ' 1px solid; border-bottom: ' + bC + ' 1px solid; border-right: ' + bC + ' 1px solid;" ');
					document.write('style="border-left: ' + bC + ' 0px solid; border-bottom: ' + bC + ' 1px solid; border-right: ' + bC + ' 0px solid;" ');
				}
			}
			document.write('id="labelBox' + m_No + '" name="labelBox' + m_No + '"><div id="menuLabel' + m_No + '" name="menuLabel' + m_No + '" onmouseover="');
			if (uMLB == 1) {
				document.write('menuBullet' + m_No + '.src=mLBOn.src; ');
			}
			if (align != null) document.write('menuOver(); return !showSideMenu(' + m_No + ', event);"  onmouseout="');
			else document.write('menuOver(); return !showMenuBlank(' + m_No + ', event);"  onmouseout="');
			if (uMLB == 1) {
				document.write('menuBullet' + m_No + '.src=mLBOff.src; ');
			}
			document.write('menuOut();" ');
			if (url != '') {
				if (targetType=='self') document.write('onClick="document.location.href=\'' + url + '\';" ');
				if (targetType=='new') document.write('onClick="openMe(\'' + url + '\'); return false;" ');
				if (targetType=='frame') document.write('onClick="parent.' + targetFrame + '.document.location.href=\'' + url + '\';" ');
				if (targetType=='iframe') document.write('onClick="' + targetFrame + '.location.href=\'' + url + '\';" ');
				document.write('><a class="MenuItemLink" href="' + url + '" target="' + targetFrame + '">');
				if (uMLB == 1) {
					document.write('<img src="' + mLBOff.src + '" width="' + mLBW + '" height="' + mLBH + '" border="0" align="top" name="menuBullet' + m_No + '" id="menuBullet' + m_No + '">');
				}
				document.write('' + label + '<img src="images/shim.gif" width="1" height="1" border="0" align="right" id="label' + m_No + '" name="label' + m_No + '"></a></div></td></tr>\n');
			}
			else {
				document.write('><a class="MenuItemLink" >');
				if (uMLB == 1) {
					document.write('<img src="' + mLBOff.src + '" width="' + mLBW + '" height="' + mLBH + '" border="0" align="top" name="menuBullet' + m_No + '" id="menuBullet' + m_No + '">');
				}
				document.write('' + label + '<img src="images/shim.gif" width="1" height="1" border="0" align="right" id="label' + m_No + '" name="label' + m_No + '"></a></div></td></tr>\n');
			}
		}		
	}	

	function Img_menuItem(m_No, onImage, offImage, url, myAlign) {		
	if (m_No != null) {
		imageMenu[m_No] = true;
		tier[m_No] = tier[currentMenu] + 1;
	}
	var tier2 = tier[currentMenu];
	currentMenuItem = currentMenuItem + 1;

	mI_No = 'mI' + currentMenu + currentMenuItem;
	if (m_No != null) {
		document.write('<script language="javascript">on' + m_No + '= new Image();');
		document.write('on' + m_No + '.src="' + onImage + '";');
		document.write('off' + m_No + '= new Image();');
		document.write('off' + m_No + '.src="' + offImage + '";</script>');
	} else {
		document.write('<script language="javascript">');
		document.write('on' + mI_No + '= new Image();');
		document.write('on' + mI_No + '.src="' + onImage + '";');
		document.write('off' + mI_No + '= new Image();');
		document.write('off' + mI_No + '.src="' + offImage + '";');
		document.write('</script>');
	}
	document.write('<tr>');

	if (bC != null && ns4) {
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
	} 

	document.write('<td');
	if (bC != null && !ns4) {
		if (currentMenuItem == 1) {
			document.write(' style="border: ' + bC + ' 1px solid;" ');
		} else {
			document.write(' style="border-left: ' + bC + ' 1px solid;border-right: ' + bC + ' 1px solid;border-bottom: ' + bC + ' 1px solid;" ');
		}
	}
	document.write('>');
	if (m_No != null) {
		document.write('<a href="' + url + '" target="' + targetFrame + '" onmouseover="menuOver(); label' + m_No + '.src = on' + m_No + '.src;  return !showSubMenu(' + m_No + ', event, ' + tier2 + ', \'' + myAlign + '\');"  onmouseout="menuOut(); label' + m_No + '.src = off' + m_No + '.src;">');	
		document.write('<img src="' + offImage + '" border="0" id="label' + m_No + '" name="label' + m_No + '"></a></td>');
	} else {
		document.write('<a href="' + url + '" target="' + targetFrame + '" onmouseover="menuItem' + mI_No + '.src = on' + mI_No + '.src; menuOver(); hideAllMenusTier(' + tier2 + ');" onmouseout="menuItem' + mI_No + '.src = off' + mI_No + '.src; menuOut();">');			
		document.write('<img src="' + offImage + '" border="0" id="menuItem' + mI_No + '" name="menuItem' + mI_No + '"></a></td>');
	}	
	
	if (bC != null && ns4) {
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
	}
	document.write('</tr>');
	if (bC != null && ns4) {
		document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');
	}		
}
	

function Img_menuLabel(m_No, onImage, offImage, url, align) {
	tier[m_No] = 0;
	imageMenu[m_No] = true;
	document.write('<script language="javascript">on' + m_No + '= new Image();');
	document.write('on' + m_No + '.src="' + onImage + '";');
	document.write('off' + m_No + '= new Image();');
	document.write('off' + m_No + '.src="' + offImage + '";</script>');
	
	document.write('<td');
	if (bC != null && !ns4) {
		document.write(' style="border: ' + bC + ' 1px solid;"');
	}
	document.write('>');
	document.write('<a href="' + url + '" target="' + targetFrame + '" onmouseover="menuLabel' + m_No + '.src = on' + m_No + '.src; menuOver(); ');
	if (align != null) document.write('return !showMenu(' + m_No + ', event,  \'' + align + '\');" ');
	else document.write('return !showMenuBlank(' + m_No + ', event,  \'' + align + '\');" ');
	document.write('onmouseout="menuLabel' + m_No + '.src = off' + m_No + '.src; menuOut();">');			
	document.write('<img src="' + offImage + '" border="0" id="menuLabel' + m_No + '" name="menuLabel' + m_No + '"></a></td>');

	if (bC != null && ns4) {
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>\n');
	}
}
	
function Img_sideMenuLabel(m_No, onImage, offImage, url, align) {
	tier[m_No] = 0;
	imageMenu[m_No] = true;
	
	document.write('<script language="javascript">on' + m_No + '= new Image();');
	document.write('on' + m_No + '.src="' + onImage + '";');
	document.write('off' + m_No + '= new Image();');
	document.write('off' + m_No + '.src="' + offImage + '";</script>');
	
	document.write('<tr>');
	
	if (bC != null && ns4) {
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
	}

	document.write('<td');
	if (bC != null && !ns4) {
		document.write(' style="border: ' + bC + ' 1px solid;"');
	}
	document.write('>');
	document.write('<a href="' + url + '" target="' + targetFrame + '" onmouseover="menuLabel' + m_No + '.src = on' + m_No + '.src; menuOver(); ');
	if (align != null) document.write('return !showSideMenu(' + m_No + ', event);" ');
	else document.write('return !showMenuBlank(' + m_No + ', event);" ');
	document.write('onmouseout="menuLabel' + m_No + '.src = off' + m_No + '.src; menuOut();">');			
	document.write('<img src="' + offImage + '" border="0" id="menuLabel' + m_No + '" name="menuLabel' + m_No + '"></a></td>');
	
	if (bC != null && ns4) {
		document.write('<td bgColor="' + bC + '"><img src="images/shim.gif" width="1" height="1" border="0"></td>');
	}

	document.write('</tr>');
	
	if (bC != null && ns4) {
		document.write('<tr><td bgColor="' + bC + '" colspan="3"><img src="images/shim.gif" width="1" height="1" border="0"></td></tr>\n');
	}

}
	
function kbkIsParamDefined(kbkParam){
	if( (typeof(kbkParam)=="null") || (typeof(kbkParam)=="undefined") )
		return false;
	else
		return true;
}