	
function doHilite()  
{
  var e = window.event.srcElement;
  if (e.className == "tun") 
  {
    e.className = "tover";
  }
  else if (e.className == "tover") 
  {
      e.className = "tun";
  }
  else if (e.className == "ph1") 
  {
      e.className = "pover1";
  }
  else if (e.className == "ph2") 
  {
      e.className = "pover2";
  }
  else if (e.className == "pover1") 
  {
      e.className = "ph1";
  }
  else if (e.className == "pover2") 
  {
      e.className = "ph2";
  }
  window.event.cancelBubble = true;
}
      
function reset()
{
  var devRow = document.all.item("APIS");
  try
  {
    for (var i = 0; i < devRow.cells.length; i++) 
    {
      var tab = devRow.cells[i];
      if (i == 0)
      {
        tab.style.display = "block";
        tab.className = "tsel";
        var files = getAssociated(tab);
        files.style.display = "block";
      }
      else
      {
        tab.style.display = "block";
        tab.className = "tun";
        var files = getAssociated(tab);
        files.style.display = "none";
      }
    }
    // reset the width of the tabs to #tabs * 100
    var devTable = document.all.item("FilesTable");
    devTable.width = (devRow.cells.length * 100);
  }
  catch(e)
  {
  }
}
      
function HighlightLanguage(lang)
{
  var langTemp = lang.toUpperCase();       
  
  if (langTemp == "ALL" || langTemp.indexOf("AND") != -1 || langTemp.indexOf(";") != -1)
  {
    reset();
    return;
  }

  if (langTemp == "VB6")
    lang = "VB";
  
  if (langTemp == "C++")
    lang = "Cpp";

  if (langTemp == "VC++")
    lang = "C";

  if (langTemp == "MOTIF C++")
    lang = "MC";

  if (langTemp == "GTK C++")
    lang = "GC";
    
  var devRow = document.all.item("APIS");

  try
  {
    // loops through all the tabs and turn them off
    for (var i = 0; i < devRow.cells.length; i++) 
    {
    var tab = devRow.cells[i];
    // turn off currently selected tab
    if (tab.className == "tsel")
    {
      var oldTab = tab;
      var oldContent = getAssociated(oldTab);
      oldContent.style.display = "none";
      tab.className = "tun";
      tab.style.display = "none";
      }

      // turn on new tab
    if(tab.id == lang + "Tab")
    {
      tab.className = "tsel";
      var newTab = getAssociated(tab);
      newTab.style.display = "block";
      tab.style.display = "block";
      
      // set the width on the now single language tab to 100
      var devTable = document.all.item("FilesTable");
      devTable.width = "100";
    }
    else
    {
      tab.style.display = "none";
    }
    }
  }
  catch(e)
  {
  }
}

function ChangeTab(eRow)  
{      
  var tabs = eRow.cells;
  for (var i = 0; i < tabs.length; i++) 
  {
    var oldTab = tabs[i];
    if (oldTab.className == "tsel") 
    {
      break;
    }
  }
  oldTab.className = "tun";
  var oldContent = getAssociated(oldTab);
  oldContent.style.display = "none";

  var newTab = window.event.srcElement;
  newTab.className ="tsel";
  var newContent = getAssociated(newTab);
  newContent.style.display = "block";

  window.event.cancelBubble = true;
}

function hideShowGroup(e)  
{
  var theGroup = e.children[0];
  if (theGroup.style.display == "none") 
  {
    theGroup.style.display="block";
  }
  else 
  { 
    theGroup.style.display="none";
  }
  window.event.cancelBubble = true;
}

function getAssociated(e) 
{
  if (e.tagName == "TD") 
  {
    switch (e.id) 
    {
      case "VBTab":
		    try
		      {return VB;}
		    catch(er)
		      {return VB6;}
      case "VBATab":
        return (VBA);
      case "CTab": 
        return (VCPP);
	  case "CppTab":
	    return (CPP);
	  case "MCTab":
		return (Motif_CPP);
	  case "GCTab":
		return (GTK_CPP);
      case "DTab": 
        return (DELPHI);
      case "VBNetTab":
		    return (VBNET);
      case "VBNetTab2":
		    return (VBNET2);
      case "CSharpTab":
		    return (CS);
      case "CSharpTab2":
		    return (CS2);
	    case "JavaTab":
		    return (Java);
	    case "FlashTab":
		    return (FLASH);
      case "OTab": 
        return (OTHER);
    }
  }
}

function position() 
{
  var e;
  e = document.all("thumbnail");
  if (e != null) 
  {
    b = document.body;
    w1 = b.clientWidth - 80;
    w2 = w1 - thumbnail.width;
    var margin = Math.floor(w2 * .5);
    thumbnail.style.visibility = "hidden";
    thumbnail.style.marginLeft = margin;
    thumbnail.style.visibility = "visible";
  }
}

function ShowDownload(){
	// make sure we can manipulate the path as a string
	var docPath= new String(window.location);
	
	//modified by josh (09/06/07)
		// discard the path preceeding the pg argument
		//var docPathIndex = docPath.indexOf("pg=");
	var docPathIndex = docPath.indexOf("/arcobjects/");
	
	
	//modified by josh (09/06/07)
		//var docPathTrimmed = docPath.substr(docPathIndex + 3);
	var docPathTrimmed = docPath.substr(docPathIndex);
		
	//create the path to the zip file
	var sHTM = ".htm";
	var sZipPath = docPathTrimmed.replace(sHTM, ".zip");
    	// get just the filename from the trimmed path for the download name
	var fileNameArray= new Array(); 
    fileNameArray = sZipPath.split("/"); 
    var x = fileNameArray.length;
    
	//modified by josh (09/06/07)
		//create the complete query string
		//var download = "File=" + sZipPath + "&Size=18&Name=" + fileNameArray[x - 1] + "'>";
	var download = sZipPath;

	//modified by josh (09/06/07)
		//build the href
		//document.write("<A href='http://edndoc.esri.com/arcobjects/9.1/DownloadCounter/startDownload.asp?" + download);
	document.write("<A href='http://edndoc.esri.com" + download + "'");
	document.write("<img src='/common/style/images/Download.gif' border='0'> Download Now</img></A>");
}

function Feedback()  
{
  if (top.fraTopic != null) 
  {
    top.fraTopic.location = '/arcobjects/9.0/email.asp?Page=' + top.fraTopic.location;
  }  else 
  {
    top.location = '/arcobjects/9.0/email.asp?Page=' + top.location;
  }
}

function doSection (secNum)
{
  //display the section if it's not displayed; hide it if it is displayed
  if (secNum.style.display=="none"){secNum.style.display=""}
  else{secNum.style.display="none"}
}

function noSection (secNum)
{
  //remove the section when user clicks in the opened DIV
  if (secNum.style.display==""){secNum.style.display="none"}
}