function create_menu(id,arr,parr)
{
vtop = 0;
open_div = 0;
open_span = 0;
c_div = 1;
 for(i=0;i<arr.length;i++)
 {
  height = parr[(arr[i][0]-1)];
  if (i==0) document.write("<span style='top:"+vtop+";height:"+height+"' class='level"+arr[i][0]+"'>");
  else document.write("<div style='top:"+vtop+";height:"+height+"' class='level"+arr[i][0]+"'>");
  document.write("<a href=\"");
  if(arr[i][2] == null) document.write("JavaScript:change('"+ id +"_"+ c_div+"')\""); 
  else document.write(arr[i][2] +"\" target='"+arr[i][3]+"'");
  document.write(">"+arr[i][1]+"</a></div>");
  vtop += height;
  if(arr[i+1])
  {
   if(arr[i][0] < arr[i+1][0]) 
    {
      document.write("<div style='display:none;' id='"+id+"_"+c_div+"'>");
      open_div++;
      c_div++;
    }
  }
}
  for(i=0;i<open_div;i++) document.write("</div>");
}

function change(id)
{
 obj = document.getElementById(id);
 if(obj.style.display == "")
 {
 obj.style.display = "none";
 }
 else
 {
  obj.style.display = "";
 }
}