
//function to connect to the msdn library
function LinkKwd(kwd)

{
	if ((kwd.indexOf('vadat') != -1))
	{
		window.open("http://search.msdn.microsoft.com/Default.aspx?locale=en-us&Query=" + kwd + "&Brand=msdn")
	}
	
	else 
	{
		window.open("http://search.msdn.microsoft.com/Default.aspx?locale=en-us&Query=" + kwd + "&Brand=msdn")
	}
}

//http://search.msdn.microsoft.com/Default.aspx?locale=en-us&Query=boolean&Brand=msdn

//function used in NET_Server_Doc/developer
function switchMenu(node, obj) 
{
	var el = document.getElementById(obj);
	if ( el.style.display != "none" ) 
	{
		el.style.display = 'none';
		if (node.childNodes.length > 0)
		{
			if (node.childNodes.item(0).nodeName == "IMG")
			{
				node.childNodes.item(0).src = "/common_93/style/images/plus.gif";
			}
		}
	}
	else {
		el.style.display = '';
		if (node.childNodes.length > 0)
		{
			if (node.childNodes.item(0).nodeName == "IMG")
			{
				node.childNodes.item(0).src = "/common_93/style/images/minus.gif";
			}
		}
	}
}



function getsel5(mysel, mytab)
{
	var select = document.getElementById(mysel.id); 	
 	var table = document.getElementById(mytab.id);
  	  	  	  	
	var tblRows = table.getElementsByTagName("tr");

	var colPRows = document.getElementById("p");
	var colMRows = document.getElementById("m");
	var	colHRows = document.getElementById("h");
	
	if(select.selectedIndex == 0) // All
	{
		for (var i = 0; i < tblRows.length; i++)
		{
			tblRows.item(i).style.display = "";
		}	
	}
	
	if(select.selectedIndex == 1)  // Properties
	{
		for (var i = 0; i < tblRows.length; i++)
		{
			// do something here to the table row such as hide it
			if( (tblRows.item(i).id == "m") || (tblRows.item(i).id == "h") )
			{
				tblRows.item(i).style.display = "none";
			}
			else
			{
				tblRows.item(i).style.display = "";
			}
		}
	}

	if(select.selectedIndex == 2)  // Methods
	{
		for (var i = 0; i < tblRows.length; i++)
		{
			// do something here to the table row such as hide it
			if( (tblRows.item(i).id == "p") || (tblRows.item(i).id == "h") )
			{
				tblRows.item(i).style.display = "none";
			}
			else
			{
				tblRows.item(i).style.display = "";
			}
		}
	}

	if(select.selectedIndex == 3)  // Inherited
	{
		for (var i = 0; i < tblRows.length; i++)
		{
			// do something here to the table row such as hide it
			if( (tblRows.item(i).id == "p") || (tblRows.item(i).id == "m") )
			{
				tblRows.item(i).style.display = "none";
			}
			else
			{
				tblRows.item(i).style.display = "";
			}
		}
	}

	if(select.selectedIndex == 4)  // Not-Inherited
	{
		for (var i = 0; i < tblRows.length; i++)
		{
			// do something here to the table row such as hide it
			if( (tblRows.item(i).id != "h") )
			{
				tblRows.item(i).style.display = "";
				
			}
			else
			{
				tblRows.item(i).style.display = "none";
			}
		}
	}

}




function Jump(fullPath)
{
//  Samples/ArcMap/Symbology/Symbols/Custom_Line_Symbol/CustomLineSymbol.htm
//  esriSystemUI/ICommand.htm

	var pathArray = fullPath.split("/");
	var folder = pathArray[0];
	var path = fullPath.substring(folder.length + 1, fullPath.length); 
	var offset = fullPath.lastIndexOf("/"); 
	if (offset != 0)
	{
	  var file = fullPath.substring(offset+ 1, fullPath.length);
	}
	else
	{
	  var file = fullPath;
	}

	switch (window.location.protocol)
	{
		// JavaDoc
		case "file:":
		{
			var pathName = window.location.pathname;
			pathName = pathName.substring(1, pathName.length);
			offset = pathName.lastIndexOf("arcgis");
			if (offset != 0)
			{
	  		  pathName = pathName.substring(0, offset) + "arcgis\\";
			}
			var temp = folder.substring(0,4);
			if (temp == "esri")
			{
				folder = folder.slice(4);
				pathName = pathName + folder + "\\" + path + "l";
				window.location = pathName;
			}

			break;
		}
		case "http:":
		{
			var temp = folder.substring(0,4);
			if (temp == "esri")
			window.location="../" + fullPath;
			break;
		}
		
//		case "http:":
//		{
//			var temp = folder.substring(0,4);
//			if (temp == "esri")
//			{
//				fullPath= "arcobjects/" + fullPath;
//			}
//
//			window.location="/help/9.3/" + fullPath;
//			break;
//		}
	
	};
}

//believe no longer used; but script error in overviews when removed
function Feedback()  
{
	//send the user to the comment page
	document.location = 'http://edndoc.esri.com/arcobjects/9.3/email.asp?Page=' + document.location; 
}

//The following functions are used by the ArcSDE API Help

function tabbedPane(currentTab, totalTabs, tabGroup)
{
	// start by hiding any displayed tab page and unselecting all tabs
	for (var i = 1; i <= totalTabs; i ++)
	{
		var tempTab = "tab" + i + tabGroup;
		var tempPage = "tabPage" + i + tabGroup;
		document.getElementById(tempTab).className = "";
		document.getElementById(tempPage).style.display = "none";
	}
	
	//display the selected tab and contents
	tempTab = "tab" + currentTab + tabGroup;
	tempPage = "tabPage" + currentTab + tabGroup;
	document.getElementById(tempTab).className = "selected";
	document.getElementById(tempPage).style.display = "block";
}

function dropBlock(pageNum)
{
	var page = document.getElementById("expandPage" + pageNum);

	if(page.style.display == "none")
	{
		page.style.display = "block";	
		page.style.visibility = "visible";
	}
	else
	{
		page.style.display = "none";
		page.style.visibility = "hidden";
	}
}

function showBlock(linkNum, totalLinks)
{
	var page = document.getElementById("PEPage" + linkNum);
	page.style.display = "block";	
	page.style.visibility = "visible";

	for (var i = 1; i <= totalLinks; i++)
	{
		if(i != linkNum)
		{
			var tempPage = document.getElementById("PEPage" + i);
			tempPage.style.display = "none";
			tempPage.style.visibility = "hidden";
		}
	}
}
