
menuname = new Array();
menuname[1] = "ddhome";
menuname[2] = "ddproducts";
menuname[3] = "ddsolutions";
menuname[4] = "ddsupport";
menuname[5] = "dddownloads";
menuname[6] = "ddabout";

var ddinmenu=false;
var ddlastmenu=0;

function ddMenu(current) {
   if (!document.getElementById) return;
   ddinmenu=true;
   ddoldmenu=ddlastmenu;
   ddlastmenu=current;
   if (ddoldmenu) ddErase(ddoldmenu);
   m=document.getElementById("menu" + current);
   box=document.getElementById(current);
   box.style.left= m.offsetLeft+127;
   box.style.top= m.offsetTop + m.offsetHeight+38;
   box.style.visibility="visible";
   swaponBg(m);
   swapoffBg(box);
}


function ddErase(current) {
   if (!document.getElementById) return;
   if (ddinmenu && ddlastmenu==current) return;
   m=document.getElementById("menu" + current);
   box=document.getElementById(current);
   box.style.visibility="hidden";
   swapoffBg(m);
}


function ddTimeout(current) {
   ddinmenu=false;
   window.setTimeout("ddErase('" + current + "');", 500);
}


function ddHighlight(menu,item) {
   ddinmenu=true;
   ddlastmenu=menu;
   obj=document.getElementById(item);
   swaponBg(obj);
}


function ddUnHighlight(menu,item) {
   ddTimeout(menu);
   obj=document.getElementById(item);
   swapoffBg(obj);
}


function setgnavmenu(index) {
   obj = document.getElementById("menu"+menuname[index]);
   obj.style.backgroundColor = "#ff0000";
   obj1 = document.getElementById("menuddhome");
   if (index==1) {
      obj1.className = "bgglobalnavir";
      banner = document.getElementById("topbanner");
      banner.className = "bgtop01";
      line = document.getElementById("gnavlineid");
      line.setAttribute("src", "../common/img/global_navi_line2.gif");
   }
   if (index>0 && index<6) {
      obj = document.getElementById("gnavspc"+index);
      obj.style.backgroundColor = "ffffff";
   }
   ind2 = index-1;
   if (ind2>0 && ind2<6) {
      obj = document.getElementById("gnavspc"+ind2);
      obj.style.backgroundColor = "ffffff";
   }
}


function setlnavsupt(index) {
   if (index==0) return;
   obj = document.getElementById("lnavsupport"+index);
   obj.className = "localnavff0000boldclass";
   objtr = document.getElementById("lnavsupport"+index+"tr");
   objtr.style.backgroundColor = "edf6f9";
   if (index==2) {
      obj = document.getElementById("lnavcountry");
      obj.style.display="block";
      obj = document.getElementById("salesnetptr");
      obj.setAttribute("src","../common/img/side_navi_arrow2.gif");
   }
}


function setlnavsalesnet(index) {
   if (index==0) return;
   obj = document.getElementById("country"+index);
   obj.className = "localnavff0000boldclass";
   obj = document.getElementById("navptr"+index);
   obj.setAttribute("src","../common/img/side_navi_pointer2.gif");
}


function setlnavdl(index) {
   if (index==0) return;
   obj = document.getElementById("lnavdownload"+index);
   obj.className = "localnavff0000boldclass";
   objtr = document.getElementById("lnavdownload"+index+"tr");
   objtr.style.backgroundColor = "edf6f9";
}


function setlnavsol(index) {
   if (index==0) return;
   obj = document.getElementById("lnavsolution"+index);
   obj.className = "localnavff0000boldclass";
   objtr = document.getElementById("lnavsolution"+index+"tr");
   objtr.style.backgroundColor = "edf6f9";
}


function setlnavsol2(index) {
   if (index==0) return;
   obj = document.getElementById("span_sid"+index);
   obj.className = "localnavff0000boldclass";
   objtr = document.getElementById("row_sid"+index);
   objtr.style.backgroundColor = "edf6f9";
}


function setlnavabout(index) {
   if (index==0) return;
   obj = document.getElementById("lnavabout"+index);
   obj.className = "localnavff0000boldclass";
   objtr = document.getElementById("lnavabout"+index+"tr");
   objtr.style.backgroundColor = "edf6f9";
}


function lnavtree(item) {
  obj=document.getElementById(item);
  visible=(obj.style.display!="none");
  linkid=document.getElementById("z" + item);
  if (visible) {
    obj.style.display="none";
    linkid.innerHTML="<img src='../common/img/side_navi_arrow1.gif' width='12' height='8' vspace='6' alt='' border='0'>";
  } else {
    obj.style.display="block";
    linkid.innerHTML="<img src='../common/img/side_navi_arrow2.gif' width='12' height='8' vspace='6' alt='' border='0'>";
  }
}


function loadfile(fname,i) {
   obj=document.getElementById("iframeid");
   obj.setAttribute("src",fname);
   link1=document.getElementById("featureslink");
   link2=document.getElementById("specslink");
   title=document.getElementById("iframetitle");
   printurl=document.getElementById("iframeurl");
   printurl.setAttribute("href",fname);
   if (i==1) {
      link1.className="localnavff0000boldclass5th";
      link2.className="localnav006699boldclass5th";
      title.innerHTML="Main Features";
   }
   else {
      link1.className="localnav006699boldclass5th";
      link2.className="localnavff0000boldclass5th";
      title.innerHTML="Detailed Specifications";
   }
}


function adjustIFrameSize (iframeWindow) {
  var frameHeight = 500;
  if (iframeWindow.document.height) {
    var iframeElement = parent.document.getElementById(iframeWindow.name);
      frameHeight = iframeWindow.document.height;
//    iframeElement.style.height = iframeWindow.document.height + 'px';
//    iframeElement.style.width = iframeWindow.document.width + 'px';
  }
  else if (document.all) {
    var iframeElement = parent.document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
      frameHeight = iframeWindow.document.documentElement.scrollHeight + 20;
//    iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 20 + 'px';
//    iframeElement.style.width = iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
    }
    else {
      frameHeight = iframeWindow.document.body.scrollHeight + 20;
//    iframeElement.style.height = iframeWindow.document.body.scrollHeight + 20 + 'px';
//    iframeElement.style.width = iframeWindow.document.body.scrollWidth + 5 + 'px';
    }
  }
  if (frameHeight<500) {
    iframeElement.style.height = 500 + 'px';
  }
  else {
    iframeElement.style.height = frameHeight + 'px';
  }
    
}


