NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);
IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
isMac = (navigator.appVersion.indexOf("Mac") != -1);
isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
function popUp(){return};
function popDown(){return};
if (!ver4) event=null;

if (isMenu) {
ver = 3;
menuWidth = 200;
chd_olp = 1;
chd_ofs = -2;
per_ov = null;
sec_vis = 2;
fntSiz = "8";
fntBold = false;
fntItal = false;
fntFam = "Trebuchet MS,verdana,arial"; backCol = "#CCCCCC";overCol = "#949494";overFnt = "#ffffff";fntCol = "#333333";borCol = "#CCCCCC";sptrcol = "#A3B4CC";
borWid = 1;
borSty = "solid";
itemPad = 1;
sptr = 1;
isFrames = false;
kp_hl = true;
start = false;
Kill = false;
var avwidth = 0;
var avheight = 0;
var download;

}
		arMenu1 = new Array( 
		"",160,"","","","","","","",		
		"Brief in History","indexisi.asp?idpage=1",0,
		"Vision & Mission","indexisi.asp?idpage=2",0,
		"Infrastruktur","indexisi.asp?idpage=3",0,
		"Organization","indexisi.asp?idpage=4",0,
		"Good Corporate Governance","indexisi.asp?idpage=34",0)
		arMenu2 = new Array( 
		"",160,"","","","","","","",
		"Project Management","indexisi.asp?idpage=5",0,
		"Application Integration","indexisi.asp?idpage=6",0,
		"Managed Services","indexisi.asp?idpage=7",0,
		"E-Business Consulting","indexisi.asp?idpage=8",0,
		"Trading Partner Engagement","indexisi.asp?idpage=9",0,
		"Archieval And Retrieval","indexisi.asp?idpage=10",0,
		"Share Registar (BAE)","indexisi.asp?idpage=11",0)
		arMenu3 = new Array( 
		"",160,"","","","","","","",
		"Research & Development","indexisi.asp?idpage=12",0)
		arMenu4 = new Array( 
		"",160,"","","","","","","",
		"Custom EDI","indexisi.asp?idpage=13",0,
		"Port EDI","indexisi.asp?idpage=14",0,
		"Supply Chain EDI","indexisi.asp?idpage=15",0,
		"Interconnection,ELVIS,P&G etc","indexisi.asp?idpage=16",0)
		arMenu5 = new Array( 
		"",140,"","","","","","","",
		"Contact Us","indexisi.asp?idpage=22",0,
		"Tips & Tricks","indexisi.asp?idpage=17",0,
		"Guestbook","indexisi.asp?idpage=18",0,
		"Download","indexisi.asp?idpage=19",0,
		"Faq","indexisi.asp?idpage=20",0,
		"Site Map","indexisi.asp?idpage=21",0)		

loader = (isFrames) ? (NS4) ? parent : parent.document.body : window;
loader.onload = startIt;

if(NS4){
	origWidth = loader.innerWidth;
	origHeight = loader.innerHeight;
}

if(IE4){
	origWidth = avwidth;
	origHeight = avheight;
}
loader.onresize = reDo;
LOD = false;
NSR = false;

if (!window.ver) {Kill = kp_hl = start = false;}
isWin = (navigator.appVersion.indexOf("Win") != -1)
mSecsVis = sec_vis*10;
isRight = (window.navFrLoc && navFrLoc == "right");
crtd = false;
mnL = null;

function invar() {
	if(crtd) {
		for(i=1; i<topCount; i++) {
			cur = eval("elMenu"+i);
			clearTimeout(cur.hideTimer);
			kena();
			cur.hideTimer=null;
		}
		clearTimeout(altm);
		kena();
	}
	topCount = 1;
	crtd = false;
	bcrt = false;
	ovmn = false;
	crm = null;
	altm = null;
}
invar();
function NSuld(){LOD = false;}
function NSld(e){if(e.target.name == fr_nm) {invar();startIt();}}
function IEuld() {invar();LOD = false;setTimeout("keepTrack()",10)}
function keepTrack() {
	if (mnL.document.readyState == "complete")
	   {invar();startIt();}
	else{setTimeout("keepTrack()",10);}
}

function startIt() {
	LOD = true;
 	avwidth = 796;

	if(IE4) {
		avheight = parseInt(document.body.offsetHeight);
		avwidth = parseInt(document.body.offsetWidth);
		if(avwidth>=796){avwidth = Math.floor((avwidth - 796)*0.5) }else{avwidth=0};
	}
	if (isFrames) {
		mnL = eval("parent.frames." + fr_nm);
		if (NS4) {
			loader.captureEvents(Event.LOAD);
			loader.onload = NSld;
			mnL.onunload = NSuld;
		}
		if (IE4) {mnL.document.body.onunload = IEuld;}
	}
	else {
		mnL = window;
	}
	mnL.nav = nav = window;
	if (Kill) {
		if (NS4) mnL.document.captureEvents(Event.MOUSEDOWN);
		mnL.document.onmousedown = clicked;
	}
	makeTop();
	downloads();
}

function makeTop(){
	bcrt = true;
	if(IE4) {
		topZ = 0;
		for (z=0;z<mnL.document.all.length;z++){
			oldEl = mnL.document.all(z);
			topZ = Math.max(oldEl.style.zIndex,topZ)
		}
	}
	while(eval("window.arMenu" + topCount)) {
		(NS4) ? mmNS(false,topCount) : mmIE(false,topCount);
		topCount++
	}
	crtd = true;
	bcrt = false;
}

function mmNS(isChild,menuCount,parMenu,parItem) {

	tempArray = eval("arMenu" + menuCount);	
	if (!isChild) {
		tempWidth = tempArray[0] ? tempArray[0] : menuWidth;
		menu = mkel("elMenu" + menuCount,tempWidth,null,null);
	}
	else {menu = mkel("elMenu" + menuCount,null,parMenu,null);}
	menu.array = tempArray;
	menu.setMenuTree = setMenuTree;
	menu.setMenuTree(isChild,parMenu);

	while (menu.itemCount < menu.maxItems) {
		menu.itemCount++;
		prevItem = (menu.itemCount > 1) ? menu.item : null;
		itemName = "item" + menuCount + "_" + menu.itemCount;
		menu.item = mkel(itemName,null,null,menu);
		menu.item.prevItem = prevItem;
		menu.item.setup = itemSetup;
		menu.item.setup(menu.itemCount,menu.array);
	}
	menu.lastItem = menu.item;
	menu.setup(isChild,parMenu,parItem);
}


function findTree(men){
	foundTree = false;
	for(i=11;i<men.array.length;i+=3){
		if(men.array[i]) {foundTree = true;break;}
	}
	return foundTree;
}


function setMenuTree(isChild,parMenu) {
	if (!isChild) {
		this.menuWidth = this.array[0] ? this.array[0] : menuWidth;
		this.menuLeft = this.array[1];
		this.menuTop = this.array[2];
		this.menuFontColor = this.array[3] ? this.array[3] : fntCol;
		this.menuFontOver = this.array[4] ? this.array[4] : overFnt;
		this.menuBGColor = this.array[5] ? this.array[5] : backCol;
		this.menuBGOver = this.array[6] ? this.array[6] : overCol;
		this.menuBorCol = this.array[7] ? this.array[7] : borCol;
		this.menuSeparatorCol = this.array[8] ? this.array[8] : sptrcol;
		this.treeParent = this;
		this.startChild = this;
		this.isTree = findTree(this);
	}
	this.maxItems = (this.array.length-9)/3;
	this.setup = menuSetup;
	this.itemCount = 0;
}


function mmIE(isChild,menuCount,parMenu) {
	menu = mkel("elMenu" + menuCount);
	menu.array = eval("arMenu" + menuCount);
	menu.setMenuTree = setMenuTree;
	menu.setMenuTree(isChild,parMenu);
	menu.itemStr = "";
	while (menu.itemCount < menu.maxItems) {
		menu.itemCount++;
		itemName = "item" + menuCount + "_" + menu.itemCount;
		arp = ((menu.itemCount-1)*3)+9;
		dispText = menu.array[arp];
		if(IE5) {
			newSpan = mnL.document.createElement("SPAN");
			with(newSpan) {
				id = itemName;
				with(style) {
					width = (menu.menuWidth-(borWid*2));
					fontSize = fntSiz + "pt";
					fontWeight = (fntBold) ? "bold" : "normal";
					fontStyle = (fntItal) ? "italic" : "normal";
					fontFamily = fntFam;
					padding = itemPad;
					borderBottomWidth = sptr + "px";
					borderBottomStyle = "solid";
					if(menu.isTree)	{
						if (isRight) paddingLeft = itemPad;
						else paddingRight = itemPad;
					}
				}
				innerHTML = dispText;
			}
			newBreak = mnL.document.createElement("BR");
			menu.appendChild(newSpan);
			menu.appendChild(newBreak);
		}
		else {
			htmStr = dispText;
			menu.itemStr += "<SPAN ID=" + itemName + " STYLE=\"width:" + (menu.menuWidth-(borWid*2)) + "\">" + htmStr + "</SPAN><BR>";
		}
	}
	if(!IE5) menu.innerHTML = menu.itemStr;
	itemColl = menu.children.tags("SPAN");
	for (i=0; i<itemColl.length; i++) {
		it = itemColl(i);
		it.setup = itemSetup;
		it.setup(i+1,menu.array);
	}
	menu.lastItem = itemColl(itemColl.length-1);
	menu.setup(isChild,parMenu);
}


function mkel(whichEl,wh_Wd,wh_Prt,wh_Cont) {
	if (NS4) {
		if (wh_Wd) {elWidth = wh_Wd;}
		else {
			elWidth = (wh_Cont) ? wh_Cont.menuWidth : wh_Prt.menuWidth;
			if (wh_Cont) elWidth = elWidth-(borWid*2)-(itemPad*2);
		}
		if (!wh_Cont) wh_Cont = mnL;
		eval(whichEl + "= new Layer(elWidth,wh_Cont)");
	}
	else {
		if (IE5) {
			newDiv = mnL.document.createElement("DIV");
			newDiv.style.position = "absolute";
			newDiv.id = whichEl;
			mnL.document.body.appendChild(newDiv);
		}
		else {
			elStr = "<DIV ID=" + whichEl + " STYLE='position:absolute'></DIV>";
			mnL.document.body.insertAdjacentHTML("BeforeEnd",elStr);
		}
		if (isFrames) eval(whichEl + "= mnL." + whichEl);
	}
	return eval(whichEl);
}


function itemSetup(whichItem,whichArray) {
	this.onmouseover = itemOver;
	this.onmouseout = itemOut;
	this.container = (NS4) ? this.parentLayer : this.parentElement;
	arp = ((whichItem-1)*3)+9;
	this.dispText = whichArray[arp];
	this.linkText = whichArray[arp + 1];
	this.hasMore = whichArray[arp + 2];
	if (this.linkText) {
		if (NS4) {
			this.captureEvents(Event.MOUSEUP)
			this.onmouseup = linkIt;
		}
		else {
			this.onclick = linkIt;
			this.style.cursor = "hand";
		}
	}

	if (NS4) {
		htmStr = this.dispText;
		if (fntBold) htmStr = htmStr.bold();
		if (fntItal) htmStr = htmStr.italics();
		htmStr = "<FONT FACE='" + fntFam + "' POINT-SIZE=" + fntSiz + ">" + htmStr+ "</FONT>";
		this.htmStrOver = htmStr.fontcolor(this.container.menuFontOver);
		this.htmStr = htmStr.fontcolor(this.container.menuFontColor);
		this.visibility = "inherit";
		this.bgColor = this.container.menuBGColor;
		if (whichItem == 1) {
			this.top = borWid + itemPad;
		}
		else {
			this.top = this.prevItem.top + this.prevItem.clip.height + sptr;
		}
		this.left = borWid + itemPad;
		this.clip.top = this.clip.left = -itemPad;
		this.clip.right = this.container.menuWidth-(borWid*2)-itemPad;
		maxTxtWidth = this.container.menuWidth-(borWid*2)-(itemPad*2);
		this.txtLyrOff = new Layer(maxTxtWidth,this);
		this.txtLyrOff.document.write(this.htmStr);
		this.txtLyrOff.document.close();
		this.txtLyrOff.visibility = "inherit";
		this.clip.bottom = this.txtLyrOff.document.height+itemPad;
		this.txtLyrOn = new Layer(maxTxtWidth,this);
		this.txtLyrOn.document.write(this.htmStrOver);
		this.txtLyrOn.document.close();
		this.txtLyrOn.visibility = "hide";
		this.dmyLyr = new Layer(100,this);
		this.dmyLyr.left = this.dmyLyr.top = -itemPad;
		this.dmyLyr.clip.width = this.clip.width;
		this.dmyLyr.clip.height = this.clip.height;
		this.dmyLyr.visibility = "inherit";
	} else {
		with (this.style) {
			if(!IE5) {
				fontSize = fntSiz + "pt";
				fontWeight = (fntBold) ? "bold" : "normal";
				fontStyle =   (fntItal) ? "italic" : "normal";
				fontFamily = fntFam;
				padding = itemPad;
				borderBottomWidth = sptr + "px";
				borderBottomStyle = "solid";

	 			if (this.container.isTree && !this.hasMore) {
					if (isRight) paddingLeft = itemPad;
					else paddingRight = itemPad;
				} 

			}
			color = this.container.menuFontColor;
			borderBottomColor = this.container.menuSeparatorCol;
			backgroundColor = this.container.menuBGColor;
		}
	}
}   

function menuSetup(hasParent,openCont,openItem) {
	this.onmouseover = menuOver;
	this.onmouseout = menuOut;
	this.showIt = showIt;
	this.keepInWindow = keepInWindow;
	this.hideTree = hideTree
	this.hideParents = hideParents;
	this.hideTop = hideTop;
	this.isOn = false;
	this.hideTimer = null;
	this.chd_olp = (per_ov != null) ? ((per_ov/100) * this.menuWidth) : chd_olp;
	this.cur_it = null;
	this.hideSelf = hideSelf;
	if (NS4) {
		this.bgColor = this.menuBorCol;
		this.fullHeight = this.lastItem.top + this.lastItem.clip.bottom + borWid;
		this.clip.right = this.menuWidth;
		this.clip.bottom = this.fullHeight;
	}else {
		with (this.style) {
			width = this.menuWidth;
			borderWidth = borWid;
			borderColor = this.menuBorCol;
			borderStyle = borSty;
			zIndex = topZ;
			overflow = "hidden";
		}
		this.lastItem.style.border="";
		this.fullHeight = this.offsetHeight;
		if(isMac)this.style.pixelHeight = this.fullHeight;
		this.fullHeight = this.scrollHeight;
		this.showIt(false);
		this.onselectstart = cancelSelect;
		this.moveTo = moveTo;
		this.moveTo(0,0);
	}
}

function popUp(menuName,e)

{
	if (NS4 && NSR) startIt();
	if (!LOD) return;
	linkEl = (NS4) ? e.target : event.srcElement;
	if (start) linkEl.onclick = popMenu;
	if (!bcrt && !crtd) startIt();
	linkEl.menuName = menuName;   
	if (!start) popMenu(e);
	//created By Palus
	kena();
}

function popMenu(e){
	if (!LOD || !crtd) return true;
	eType = (NS4) ? e.type : event.type;
	if (start && eType != "click") return true;
	hideAll();
	linkEl = (NS4) ? e.target : event.srcElement;
	crm = eval(linkEl.menuName);
	crm.treeParent.startChild = crm;

	if (IE4) mnLBod = mnL.document.body;
	if (!isFrames) {
		xPos = (crm.menuLeft) ? crm.menuLeft : (NS4) ? e.pageX : (event.clientX + mnLBod.scrollLeft);
		yPos = (crm.menuTop) ? crm.menuTop : (NS4) ? e.pageY : (event.clientY + mnLBod.scrollTop);
	}
	else {
		switch (navFrLoc) {
			case "left":
				xPos = (crm.menuLeft) ? crm.menuLeft : (NS4) ? mnL.pageXOffset : mnLBod.scrollLeft;
				yPos = (crm.menuTop) ? crm.menuTop : (NS4) ? (e.pageY-pageYOffset)+mnL.pageYOffset : event.clientY + mnLBod.scrollTop;
				break;
			case "top":
				xPos = (crm.menuLeft) ? crm.menuLeft : (NS4) ? (e.pageX-pageXOffset)+mnL.pageXOffset : event.clientX + mnLBod.scrollLeft;
				yPos = (crm.menuTop) ? crm.menuTop : (NS4) ? mnL.pageYOffset : mnLBod.scrollTop;
				break;
			case "bottom":
				xPos = (crm.menuLeft) ? crm.menuLeft : (NS4) ? (e.pageX-pageXOffset)+mnL.pageXOffset : event.clientX + mnLBod.scrollLeft;
				yPos = (crm.menuTop) ? crm.menuTop : (NS4) ? mnL.pageYOffset+mnL.innerHeight : mnLBod.scrollTop + mnLBod.clientHeight;
				break;
			case "right":
				xPos = (crm.menuLeft) ? crm.menuLeft : (NS4) ? mnL.pageXOffset+mnL.innerWidth : mnLBod.scrollLeft+mnLBod.clientWidth;
				yPos = (crm.menuTop) ? crm.menuTop : (NS4) ? (e.pageY-pageYOffset)+mnL.pageYOffset : event.clientY + mnLBod.scrollTop;
				break;
		}
	}
	crm.moveTo(xPos,yPos-10);
	crm.keepInWindow()
	crm.isOn = true;
	crm.showIt(true);
	return false;
}

function menuOver(e) {
	this.isOn = true;
	ovmn = true;
	crm = this;
	if (this.hideTimer){clearTimeout(this.hideTimer);clearTimeout(loader);};
}

function menuOut() {
	if (IE4) {
		theEvent = mnL.event;
		if (theEvent.srcElement.contains(theEvent.toElement)) return;
	}
	this.isOn = false;
	ovmn = false;
	mnL.status = "";
	if (!Kill) altm = setTimeout("crm.hideTree()",0);  
}

function itemOver(){
	if (kp_hl) {
		if (this.container.cur_it && this.container.cur_it != this) {
			if (NS4) {
				this.container.cur_it.bgColor = this.container.menuBGColor;
				this.container.cur_it.txtLyrOff.visibility = "inherit";
				this.container.cur_it.txtLyrOn.visibility = "hide";
			}
			else {
				with (this.container.cur_it.style) {
					backgroundColor = this.container.menuBGColor;
					color = this.container.menuFontColor;
				}
			}
		}
	}
	if (IE4) {
		theEvent = mnL.event;
		if (theEvent.srcElement.tagName == "IMG") return;
		this.style.backgroundColor = this.container.menuBGOver;
		this.style.color = this.container.menuFontOver;
	}
	else {
		this.bgColor = this.container.menuBGOver;
		this.txtLyrOff.visibility = "hide";
		this.txtLyrOn.visibility = "inherit";
	}
	mnL.status = this.linkText;
	this.container.cur_it = this;
}

function itemOut() {
	if (IE4) {
		theEvent = mnL.event;
		 if (theEvent.srcElement.contains(theEvent.toElement) || (theEvent.fromElement.tagName=="IMG" && theEvent.toElement.contains(theEvent.fromElement)))return;
		if (!kp_hl) {
			this.style.backgroundColor = this.container.menuBGColor;
			this.style.color = this.container.menuFontColor;
		}
	}	else {
		if (!kp_hl) {
			this.bgColor = this.container.menuBGColor;
			this.txtLyrOff.visibility = "inherit";
			this.txtLyrOn.visibility = "hide";
		}
		if (!ovmn && !Kill) altm = setTimeout("crm.hideTree()",0); 
	}
}

function moveTo(xPos,yPos) {
	
	this.style.pixelLeft = xPos + avwidth;
	this.style.pixelTop = yPos;
}

function showIt(on) {
	if (NS4) {
		
		this.visibility = (on) ? "show" : "hide";
		if (kp_hl && this.cur_it) {
			this.cur_it.bgColor = this.menuBGColor;
			this.cur_it.txtLyrOff.visibility = "inherit";
			this.cur_it.txtLyrOn.visibility = "hide";
		}
	}	else {
		this.style.visibility = (on) ? "visible" : "hidden";
		if (kp_hl && this.cur_it) {
			with (this.cur_it.style) {
				backgroundColor = this.menuBGColor;
				color = this.menuFontColor;

			}
		}
	}
	this.cur_it = null;
}

function keepInWindow() {
	
	scrBars = 20;
	botScrBar = (isFrames && navFrLoc=="bottom") ? (borWid*2) : scrBars;
	rtScrBar = (isFrames && navFrLoc=="right") ? (borWid*2) : scrBars;
	
	if (NS4) {
		winRight = (mnL.pageXOffset + mnL.innerWidth) - rtScrBar;
		rightPos = this.left + this.menuWidth;
		
		if (rightPos > winRight) {
			dif = rightPos - winRight;
			this.left -= dif;
		}
		winBot = (mnL.pageYOffset + mnL.innerHeight) - botScrBar ;
		botPos = this.top + this.fullHeight;
		
		if (botPos > winBot) {
			dif = botPos - winBot;
			this.top -= dif;
		}
		winLeft = mnL.pageXOffset;
		leftPos = this.left;
		
		if (leftPos < winLeft) this.left = 5;
	}
	else {
		 winRight = (mnL.document.body.scrollLeft + mnL.document.body.clientWidth) - rtScrBar;
		rightPos = this.style.pixelLeft + this.menuWidth;
		if (rightPos > winRight) {
		
			dif = rightPos - winRight;
			this.style.pixelLeft -= dif;
		}
		winBot = (mnL.document.body.scrollTop + mnL.document.body.clientHeight) - botScrBar;
		botPos = this.style.pixelTop + this.fullHeight;
		
		if (botPos > winBot) {
			dif = botPos - winBot;
			this.style.pixelTop -= dif;
		}
		winLeft = mnL.document.body.scrollLeft;
		leftPos = this.style.pixelLeft;
		if (leftPos < winLeft) this.style.pixelLeft = 5;
	}
}

function linkIt() {
	if (this.linkText.indexOf("javascript:")!=-1) eval(this.linkText)
	else mnL.location.href = this.linkText;
}

function popDown(menuName){
	if (!LOD || !crtd) return;
	whichEl = eval(menuName);
	whichEl.isOn = false;
	if (!Kill) whichEl.hideTop();
}

function hideAll() {
	for(i=1; i<topCount; i++) {
		temp = eval("elMenu" + i + ".startChild");
		temp.isOn = false;
		temp.showIt(false);
	}   
}

function hideTree() { 
	altm = null;
	if (ovmn) return;
	this.hideParents();
}

function hideTop() {
	whichTop = this;
	(Kill) ? whichTop.hideSelf() : (this.hideTimer = setTimeout("if(whichTop.hideSelf)whichTop.hideSelf()",mSecsVis));
}

function hideSelf() {
	this.hideTimer = null;
	if (!this.isOn && !ovmn) this.showIt(false);
}

function hideParents() {
	tempM = this;
	tempM.hideTop();
}


function cancelSelect(){return false}

function reDo(){
	if (loader.innerWidth==origWidth && loader.innerHeight==origHeight) return;
	invar();
	NSR=true;
	mnL.location.reload();
}

function clicked() {
	if (!ovmn && crm!=null && !crm.isOn) {
		whichEl = crm;
		whichEl.hideTree();
	}
}

// Created by Palus, 2000

function hidemenu(){   loader=setTimeout("hideAll()",0);}	 

function kena(){ clearTimeout(loader);}


hv=0; currentTag=0;
ua=navigator.userAgent; v=navigator.appVersion.substring(0,1);

if((ua.lastIndexOf("MSIE") != -1) && (v != '1') && (v != '2') && (v != '3')) {
	document.onmouseover=on;
	document.onmouseout=off;
	window.setInterval(onoff,300);
}

function onoff() {
	if (hv=='none') {hv='none'} else {hv='none'}
	if (currentTag) { currentTag.style.textDecoration=hv }
}

function on() {
	src=event.toElement;
	if (src.tagName=="A") {
		currentTag=src; hv='none'; src.style.textDecoration=hv;
	}
}

function off() {
	src=event.fromElement;
	if (src.tagName=="A") {
		currentTag=0; hv='none'; src.style.textDecoration=hv;
	}
}

function onColor(frm)
{frm.style.backgroundColor='#EC8904';}

function offColor(frm)
{frm.style.backgroundColor='';}

function downloads() 
{if(!isNaN(download)) location.href="../../GBR/download/pricelist_bhinneka_" + download + ".zip";}

