//Contents for menu 1
	var globalpromotion=new Array()
	globalpromotion[0]='<a href="./pameranakan.php">Overseas Trade Fairs </a>'
	globalpromotion[1]='<a href="./pameranakan_dn.php">International Domestic Trade Fairs</a>'
	globalpromotion[2]='<a href="./trademission.php">Trade Missions </a>'
	//globalpromotion[3]='<a href="./manualtradefair.php">International Trade Fair Manuals </a>'
	//globalpromotion[4]='<a href="./manualexhibition.php">Exhibition Manuals </a>'
	//globalpromotion[5]='&nbsp;'

//Contents for menu 2
	var marketintellegence=new Array()
	marketintellegence[0]='<a href="marintel.php">Market Brief (Indonesian)</a>'
	marketintellegence[1]='<a href="perpustakaan.php">Library</a>'
	//marketintellegence[1]='<a href="undercons.php">Manuals, Checkli+st & Guidelines</a>'
	//marketintellegence[3]='<a href="undercons.php">Statistics & Survey</a>'
	//marketintellegence[4]='<a href="undercons.php">Internal Use</a>'
	//marketintellegence[5]='&nbsp;'

//Contents for menu 3
	//var exportcluster=new Array()
	//exportcluster[0]='<a href="undercons.php">Export Cluster</a>'
	//exportcluster[1]='<a href="undercons.php">Ekspor Cluster -2</a>'
	//exportcluster[2]='<a href="undercons.php">Ekspor Cluster -3</a>'
	//exportcluster[3]='<a href="undercons.php">Ekspor Cluster -4</a>'
	//exportcluster[4]='<a href="undercons.php">Ekspor Cluster -5</a>'
	//exportcluster[5]='&nbsp;'

//Contents for menu 4
	var branddevelopment=new Array()
	branddevelopment[0]='<a href="merek.php">Brand Database</a>'
	//branddevelopment[1]='<a href="undercons.php">Support Service From Nafed</a>'
	//branddevelopment[2]='<a href="undercons.php">Branding Know How</a>'
	//branddevelopment[5]='&nbsp;'

//Contents for menu 5
	var forumandaward=new Array()
	forumandaward[0]='<a href="forumprimaniyarta.php">Primaniyarta Award</a>'
	forumandaward[1]='<a href="forumigds.php">Indonesia Good Design Selection</a>'
	forumandaward[2]='<a href="forumexport.php">Export Forum</a>'

		
	var disappeardelay=250
	var horizontaloffset=2  


	var ie4=document.all
	var ns6=document.getElementById&&!document.all

	if (ie4||ns6)
		document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
	if (ie4||ns6)
		dropmenuobj.style.left=dropmenuobj.style.top=-500
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		obj.visibility=visible
	else if (e.type=="click")
		obj.visibility=hidden
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
	if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
		edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
	} else {
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
			if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ 
				edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
				if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) 
					edgeoffset=dropmenuobj.y
			}
	}
	return edgeoffset
}

function populatemenu(what){
	if (ie4||ns6)
		dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
	if (typeof dropmenuobj!="undefined"){
		if (ie4||ns6)
			dropmenuobj.style.visibility="hidden"
	}
}

function delayhidemenu(){
	if (ie4||ns6)
		delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
	if (typeof delayhide!="undefined")
		clearTimeout(delayhide)
}

/* ---- untuk menu samping hal 2 --------*/
function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p.className = "active";

  var top  = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
  var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

  for (; p; p = p.offsetParent)
  {
    if (p.style.position != 'absolute')
    {
      left += p.offsetLeft;
      top  += p.offsetTop;
    }
  }

  c.style.position   = "absolute";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
  c.style.visibility = "visible";
}

// ----- Hide Aux -----

function at_hide_aux(parent, child)
{
  document.getElementById(parent).className = "parent";;
  document.getElementById(child ).style.visibility = "hidden";
}

// ----- Show -----

function at_show_p()
{
  c = document.getElementById(this["at_child" ]);
  at_show_aux(this.id, c.id);
  clearTimeout(c["at_timeout"]);
}

function at_show_c()
{
  p = document.getElementById(this["at_parent"]);
  at_show_aux(p.id, this.id);
  clearTimeout(this["at_timeout"]);
}

// ----- Hide -----

function at_hide_p()
{
  c = document.getElementById(this["at_child" ]);
  c["at_timeout"] = setTimeout("at_hide_aux('"+this.id+"', '"+c.id+"')", 100);
}

function at_hide_c()
{
  p = document.getElementById(this["at_parent"]);
  this["at_timeout"] = setTimeout("at_hide_aux('"+p.id+"', '"+this.id+"')", 100);
}

// ----- Attach -----

function at_attach(parent, child, position)
{
  p = document.getElementById(parent);
  c = document.getElementById(child);

  p["at_child"]    = c.id;
  c["at_parent"]   = p.id;
  c["at_position"] = position;

  p.onmouseover = at_show_p;
  p.onmouseout  = at_hide_p;
  c.onmouseover = at_show_c;
  c.onmouseout  = at_hide_c;
}

// ----- DropDown Menu ---------------------------------------------------------

// ----- Build Aux -----

function dhtmlmenu_build_aux(parent, child, position)
{
  document.getElementById(parent).className = "parent";

  document.write('<div class="vert_menu" id="'+parent+'_child">');

  n = 0;
  for (var i in child)
  {
    if (i == '-')
    {
      document.getElementById(parent).href = child[i];
      continue;
    }

    if (typeof child[i] == "object")
    {
      document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');
      dhtmlmenu_build_aux(parent+'_'+n, child[i], "x");
    }
    else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');
    n++;
  }

  document.write('</div>');

  at_attach(parent, parent+"_child", position);
}

// ----- Build -----

function dhtmlmenu_build(menu)
{
  for (var i in menu) dhtmlmenu_build_aux(i, menu[i], "y");
}




