	openNode = 0;
	mouseOn = 0;
function makeMainMenu(){
	cnt = 0;
	temp = '<ul>';
	for(i=0;i<menu_arr.length;i++){
		if(menu_arr[i][1]==0){
			cnt++;	
			temp+='<li  id="'+menu_arr[i][0]+'" class="menu'+cnt+'"><a href="'+menu_arr[i][3]+'" onmouseover="showMenu(this.parentNode)" onmouseout="setOpenNode(this.parentNode)">'+menu_arr[i][2]+'</a></li>';
		}
	}
	temp+='</ul>';
	document.getElementById('menu').innerHTML = temp;
}
isMenu = false;
function showMenu(obj){
    if(obj.id == mouseOn){
        return;
    }
     mouseOn = obj.id;
	isMenu = true;
	findOpenSibling(obj.id);
	addEvent( obj, 'mouseover', findRes );
	tmptxt = '<ul>';
	for(j=0;j<menu_arr.length;j++){
		if(menu_arr[j][1]==obj.id ){
			tmptxt += '<li id="'+menu_arr[j][0]+'"><a '; 
			if(hasChild(menu_arr[j][0])){
				tmptxt +=  ' class="child" ';
			}
			tmptxt += ' href="'+menu_arr[j][3]+'" onmouseover="showMenu(this.parentNode)" onmouseout="setOpenNode(this.parentNode)">'+menu_arr[j][2]+'</a></li>';
		}
	}
	tmptxt+='</ul>';
	if(tmptxt!='<ul></ul>'){
		obj.innerHTML+=tmptxt;
		findRes(obj);
		openNode = obj.id;
	}
}
function hasChild(id){
	for(a=0;a<menu_arr.length;a++){
		if(menu_arr[a][1]==id)
			return true;
	}
	return false;
}
function findRes(ob){
	if(ob && ob.id){
		allowedWidth = ((checkWidth() - 780)/2)+780	;
		pNode=findElement(ob.id);
		if(ob.childNodes[1]){
			currentPos = findPosX(ob)+172;
			if(currentPos>allowedWidth  && menu_arr[pNode][1]==0){
				if(171-findPosY(ob)>0){
					ob.childNodes[1].style.marginLeft =  '-'+(171-findPosY(ob))+'px';
				}
			}
			else if((currentPos+172)>allowedWidth && menu_arr[pNode][1]!=0){
				ob.childNodes[1].style.marginLeft =  '-329px';
			}
		}
		
	}
}
function findOpenSibling(id){
	prnt = parentMenu(id);
	for(m=0;m<menu_arr.length;m++){
		if(menu_arr[m][1] == prnt){
			if(document.getElementById(menu_arr[m][0]) && document.getElementById(menu_arr[m][0]).innerHTML.toUpperCase().indexOf('<UL')!= -1)
				removeMenu(menu_arr[m][0]);
		}
	}
}
function setOpenNode(obj){
	if(obj){
		isMenu = false;
		tmout = setTimeout("checkIfOpen()",600);
	}
}

function checkIfOpen(){
	if(!isMenu){
	    makeMainMenu();
		openNode = 0;
		mouseOn = 0;		
	}
}
function parentMenu(id){
	for(l=0;l<menu_arr.length;l++){
		if(menu_arr[l][0] == id)
			return menu_arr[l][1];
	}
}

function removeMenu(id){
	for(k=0;k<menu_arr.length;k++){
		if(menu_arr[k][0]==id){ 
			if(document.getElementById(id)){
				tmTxt = '<a ';
				if(menu_arr[k][1]!=0 && hasChild(id))
					tmTxt += 'class="child"';
				 tmTxt += 'onmouseover="showMenu(this.parentNode)" onmouseout="setOpenNode(this.parentNode)" href="'+menu_arr[k][3]+'">'+menu_arr[k][2]+'</a>';
	 			document.getElementById(id).innerHTML = tmTxt;
			}
		}
	}
}
function isNodeOpen(id){
	if(document.getElementById(parentMenu(id)))
		removeMenu(parentMenu(id));
}


function addEvent( obj, type, fn ) {
   if ( obj.attachEvent ) {
     obj['e'+type+fn] = fn;
     obj[type+fn] = function(){obj['e'+type+fn]( window.event );};
     obj.attachEvent( 'on'+type, obj[type+fn] );
   } else
     obj.addEventListener( type, fn, false );
 }
  

function removeEvent( obj, type, fn ) {
   if ( obj.detachEvent ) {
     obj.detachEvent( 'on'+type, obj[type+fn] );
     obj[type+fn] = null;
   } else
     obj.removeEventListener( type, fn, false );
}
function checkWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myHeight = window.innerWidth;
  } 
  else {
  	  if( document.documentElement &&
	    ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      myHeight = document.documentElement.clientWidth;
    } 
	else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        myHeight = document.body.clientHeight;
      }
    }
  }
  return myHeight;
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}
function findPosY(obj)
{
	var curright = 0;
	if (obj.offsetParent)
	{
		curright += obj.offsetWidth;
	}
	else if (obj.width)
		curright += obj.width;
	return curright;
}
function findElement(val){
	for(h=0;h<menu_arr.length;h++){
		if(menu_arr[h][0]==val)
			return h;
	}
}

function checkForScroll(){
	if(document.documentElement.clientWidth)
		width = document.documentElement.clientWidth;
	else
		width = window.innerWidth;
	if(width<780){
		document.body.style.overflowX = "scroll";
	}
	else
		document.body.style.overflowX = "hidden";
}


	var path = '/cms/website_files/uploadImages/';
	albums = new Array();
	albums[0] = new Array();
	albums[0][0] = "album1.jpg";
	albums[0][1] = 1;
	albums[0][2] = "Management";

	albums[1] = new Array();
	albums[1][0] = "album2.jpg";
	albums[1][1] = 2;
	albums[1][2] = "Fun@JKT";

	albums[2] = new Array();
	albums[2][0] = "album3.jpg";
	albums[2][1] = 3;
	albums[2][2] = "Office";
	
	
	thumbnails = new Array();
	
	thumbnails[0] = new Array();
	thumbnails[0][0] = 1;
	thumbnails[0][1] = "thumb1_1.jpg";
	thumbnails[0][2] = "img1_1.jpg";

	thumbnails[1] = new Array();
	thumbnails[1][0] = 1;
	thumbnails[1][1] = "thumb1_2.jpg";
	thumbnails[1][2] = "img1_2.jpg";

	thumbnails[2] = new Array();
	thumbnails[2][0] = 1;
	thumbnails[2][1] = "thumb1_3.jpg";
	thumbnails[2][2] = "img1_3.jpg";

	thumbnails[3] = new Array();
	thumbnails[3][0] = 1;
	thumbnails[3][1] = "thumb1_4.jpg";
	thumbnails[3][2] = "img1_4.jpg";
	
	thumbnails[4] = new Array();
	thumbnails[4][0] = 1;
	thumbnails[4][1] = "thumb1_5.jpg";
	thumbnails[4][2] = "img1_5.jpg";

	thumbnails[5] = new Array();
	thumbnails[5][0] = 2;
	thumbnails[5][1] = "thumb2_1.jpg";
	thumbnails[5][2] = "img2_1.jpg";

	thumbnails[6] = new Array();
	thumbnails[6][0] = 2;
	thumbnails[6][1] = "thumb2_2.jpg";
	thumbnails[6][2] = "img2_2.jpg";

	thumbnails[7] = new Array();
	thumbnails[7][0] = 2;
	thumbnails[7][1] = "thumb2_3.jpg";
	thumbnails[7][2] = "img2_3.jpg";

	thumbnails[8] = new Array();
	thumbnails[8][0] = 2;
	thumbnails[8][1] = "thumb2_4.jpg";
	thumbnails[8][2] = "img2_4.jpg";

	thumbnails[9] = new Array();
	thumbnails[9][0] = 2;
	thumbnails[9][1] = "thumb2_5.jpg";
	thumbnails[9][2] = "img2_5.jpg";

	thumbnails[10] = new Array();
	thumbnails[10][0] = 3;
	thumbnails[10][1] = "thumb3_1.jpg";
	thumbnails[10][2] = "img3_1.jpg";

	thumbnails[11] = new Array();
	thumbnails[11][0] = 3;
	thumbnails[11][1] = "thumb3_2.jpg";
	thumbnails[11][2] = "img3_2.jpg";
	
	thumbnails[12] = new Array();
	thumbnails[12][0] = 3;
	thumbnails[12][1] = "thumb3_3.jpg";
	thumbnails[12][2] = "img3_3.jpg";	
	
	thumbnails[13] = new Array();
	thumbnails[13][0] = 3;
	thumbnails[13][1] = "thumb3_4.jpg";
	thumbnails[13][2] = "img3_4.jpg";	

	thumbnails[14] = new Array();
	thumbnails[14][0] = 3;
	thumbnails[14][1] = "library_thumb.jpg";
	thumbnails[14][2] = "library.jpg";	


	function initPhotoGallery(){
		var tempHtml= "";
		for(i=0;i<albums.length;i++){
			tempHtml += '<a style = "cursor:hand;" onclick="populateThumbnails('+albums[i][1]+')" ><img style="margin:0 auto; margin-top:10px; text-align:center;" src="'+ path + albums[i][0]+'" /></a><span style="margin:0 auto; margin-top:10px; text-align:center;">'+albums[i][2]+'</span>';
		}
		document.getElementById('album').innerHTML = tempHtml;
	}
	
	function populateThumbnails(id){
		var html = "";
		var first=-1;
		for(j=0;j<thumbnails.length;j++){
			if(thumbnails[j][0]==id){
				if(first == -1)first = j;
				html+= '<a  style = "cursor:hand" onclick="showBigImg(\''+thumbnails[j][2]+'\')" /><img src="'+path+thumbnails[j][1]+'" /></a>';
			}
		}
		document.getElementById('thumbnails').innerHTML = html;
		showBigImg(thumbnails[first][2]);
	}
	
	function showBigImg(imgname){
		document.getElementById('bigimg').innerHTML = '<img src="'+path+imgname+'" />';
	}
	
function checkFlashVersion(type){	
	var flashinstalled = 0;
	var flashversion = 0;
	MSDetect = "false";
	
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	if(isIE && isWin){
		for(var i=7; i>0; i--){
			flashversion = 0;
			try{
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				flashversion = i;
				break;
			}
			catch(e){
			}
		}
	}
	else{
		if (navigator.plugins && navigator.plugins.length)
		{
			x = navigator.plugins["Shockwave Flash"];
			if (x)
			{
				flashinstalled = 2;
				if (x.description)
				{
					y = x.description;
					flashversion = y.charAt(y.indexOf('.')-1);
				}
			}
			else
				flashinstalled = 1;
			if (navigator.plugins["Shockwave Flash 2.0"])
			{
				flashinstalled = 2;
				flashversion = 2;
			}
		}
		else if (navigator.mimeTypes && navigator.mimeTypes.length)
		{
			x = navigator.mimeTypes['application/x-shockwave-flash'];
			if (x && x.enabledPlugin)
				flashinstalled = 2;
			else
				flashinstalled = 1;
		}
		else
			MSDetect = "true";
	}
	if(type=="home"){
		if((navigator.appName == "Netscape" && flashversion<=6) || flashversion<6 || (navigator.platform.indexOf('Linux')!= -1 ) ) {
			document.getElementById('flashholder').innerHTML = "";
			document.getElementById('flashholder').style.height = "193px"; 
			document.getElementById('flashholder').style.backgroundImage = 'url("../uploadFlash/'+ document.getElementById('imageTitle').value +'")';	
			document.getElementById('flashholder').style.backgroundRepeat = 'no-repeat';
			document.getElementById('flashholder').style.marginTop = "-18px";
		}
	}
	if(type=="inside"){
		if((navigator.appName == "Netscape" && flashversion<=6) || flashversion<6 || (navigator.platform.indexOf('Linux')!= -1 ) ) {
			document.getElementById('flashholder').innerHTML = "";
			document.getElementById('flashholder').style.height = "100px"; 
			document.getElementById('flashholder').style.backgroundImage = 'url("../uploadFlash/'+ document.getElementById('imageTitle').value +'")';	
			document.getElementById('flashholder').style.backgroundRepeat = 'no-repeat';
			document.getElementById('flashholder').style.marginTop = "-18px";		
		}
	}
	
}	
function checkSize() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myHeight = window.innerHeight-230;
  } 
  else {
  	  if( document.documentElement &&
	    ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      myHeight = document.documentElement.clientHeight-190;
    } 
	else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        myHeight = document.body.clientHeight-190;
      }
    }
  }
  return myHeight;
}
function drawInsideFlash(){
		  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1001" height="165" name="BanUnique"  class="flash" type="application/x-shockwave-flash" >');
		  document.write('<param name="allowScriptAccess" value="sameDomain" />');
		  document.write('<param name="wmode" value="transparent" />');			
		  document.write('<param name="movie" value="/cms/website_files/uploadFlash/'+ document.getElementById('flashTitle').value +'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/cms/website_files/uploadFlash/'+ document.getElementById('flashTitle').value +'" wmode="transparent" quality="high" bgcolor="#ffffff" width="1001" height="165" name="BanUnique"  class="flash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		  document.write('</object>');	
	}
function drawHomeFlash(){		 
 			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="753" height="179" id="005Ban_solutionforever" class="flash">');
		    document.write('<param name="allowScriptAccess" value="sameDomain" />');
		    document.write('<param name="wmode" value="transparent" />');			
		    document.write('<param name="movie" value="/cms/website_files/uploadFlash/'+ document.getElementById('flashTitle').value +'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/cms/website_files/uploadFlash/'+ document.getElementById('flashTitle').value +'" wmode="transparent" quality="high" bgcolor="#ffffff" width="753" height="179" name="005Ban_solutionforever.swf"  allowScriptAccess="never"  class="flash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		  document.write('</object>'); 
	}
	
function drawFlash(name, path, width, height){
 			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="'+name+'" class="flash">');
		    document.write('<param name="allowScriptAccess" value="sameDomain" />');
		    document.write('<param name="wmode" value="transparent" />');			
		    document.write('<param name="movie" value="'+path+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="'+path+'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+name+'"  allowScriptAccess="never"  class="flash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		    document.write('</object>'); 	
}
