// version 9324
// links to HxLink.css, DTUE CSS, and DTUE topics scripts

// var ieVer = getIEVersion();
// var jsPath = scriptPath();
// writeCSS(jsPath);

function getIEVersion() {
//determines the IE version. Returns 0 if not IE
	var verNum = 0
	if (navigator.appName == "Microsoft Internet Explorer") {
		var sVer = window.navigator.userAgent
		var msie = sVer.indexOf ( "MSIE " )
		if ( msie > 0 ) {	// browser is Microsoft Internet Explorer; return version number
			verNum = parseFloat( sVer.substring ( msie+5, sVer.indexOf ( ";", msie ) ) );
		}
	}
	return verNum;
}

function scriptPath() { 
//Determine path to JS-the CSS is in the same directory as the script
	if ( ieVer >= 4 ) {
		var spath = document.scripts[document.scripts.length - 1].src;
		spath = spath.toLowerCase();
		return spath.replace("dtuelink.js", "");
		}
	else {
		var spath = "..\\scripts\\"; //defaults to a scripts folder
		return spath;
	}
}
function writeCSS(spath) {
		dtueCSS = "DTUE.css";
		HxLink = "HxLink.css";
		HxLinkPath = "ms-help://Hx/HxRuntime/";
		document.writeln('<SCRIPT SRC="' + spath + '\dtue_ie5.js"></SCRIPT>');
		document.writeln('<SCRIPT FOR="reftip" EVENT="onclick">window.event.cancelBubble = true;</SCRIPT>');
		document.writeln('<SCRIPT FOR="cmd_lang" EVENT="onclick">langClick(this);</SCRIPT>');
		document.writeln('<SCRIPT FOR="cmd_filter" EVENT=onclick>filterClick(this);</SCRIPT>');
	// Insert CSS calls
	document.writeln('<LINK REL="stylesheet" HREF="' + HxLinkPath + HxLink + '">');
	document.writeln('<LINK REL="stylesheet" HREF="' + spath + dtueCSS + '">');
}
function writeCSS_original(spath) {
	var dtueCSS = "";
	var HxLinkPath = "";
	var HxLink = "";
	// Get a CSS name based on the browser.
	if ( ieVer >= 5) {
		dtueCSS = "DTUE.css";
		HxLink = "HxLink.css";
		HxLinkPath = "ms-help://Hx/HxRuntime/";
		document.writeln('<SCRIPT SRC="' + spath + '\dtue_ie5.js"></SCRIPT>');
		document.writeln('<SCRIPT FOR="reftip" EVENT="onclick">window.event.cancelBubble = true;</SCRIPT>');
		document.writeln('<SCRIPT FOR="cmd_lang" EVENT="onclick">langClick(this);</SCRIPT>');
		document.writeln('<SCRIPT FOR="cmd_filter" EVENT=onclick>filterClick(this);</SCRIPT>');
		}
	else {
		if (ieVer >=4 && ieVer <5) {
			document.writeln('<SCRIPT SRC="' + spath + '\dtue_ie4.js"></SCRIPT>');
			dtueCSS = "msdn_ie4.css";
			HxLink = "";
			HxLinkPath = "";
			}
		else {
			if (ieVer < 4) 
				document.writeln('<SCRIPT SRC="' + spath + '\dtue_ie3.js"></SCRIPT>');
				dtueCSS = "msdn_ie3.css";
				HxLink = "";
				HxLinkPath = "";
				//document.write ("<link disabled rel='stylesheet' href='"+ spath + dtueCSS + "'>")
				//document.write ("<style>@import url("+ spath + dtueCSS + ");</style>")
			}
		}
	// Insert CSS calls
	document.writeln('<LINK REL="stylesheet" HREF="' + HxLinkPath + HxLink + '">');
	document.writeln('<LINK REL="stylesheet" HREF="' + spath + dtueCSS + '">');
}

function getsel5(mysel,mytab)
{
  	var coll = document.all.item(mysel.name);
  	var oObject=document.all.item(mytab.name);
  	var colAllRows=oObject.rows;

  	var colPRows=oObject.rows.item("p");
	var colMRows=oObject.rows.item("m");
 	var colMRows=oObject.rows.item("h");
 	

	for (j=0;j<coll.options.length; j++)
  	{
   		if (coll.item(j).selected)
		{
			j++
			break;
		}
  	}
	//alert(j);

if (j==1) // All
{

  	if (colAllRows!=null) 
	{
		for (i=1; i < colAllRows.length; i++)
		{
        		colAllRows.item(i).style.display="";
		}
	}
}

if (j==2)  // Properties
{
		for (i=1; i< colAllRows.length; i++)
		{
        		colAllRows.item(i).style.display="none";
			//oObject.rows.item("p",i).style.display="";
		}
		for (i=1; i< colAllRows.length; i++)
		{
        		if (colAllRows.item(i).id.search(/p/) == 0) {
				 colAllRows.item(i).style.display = "";
			}
			//colMRows.item(i).style.display="none";
			//oObject.rows.item("m",i).style.display="none";
		}

}

if (j==3)  // Methods
{
		for (i=1; i<colAllRows.length; i++)
		{
        		colAllRows.item(i).style.display="none";
			//oObject.rows.item("m",i).style.display="";
		}
		for (i=1; i< colAllRows.length; i++)
		{
        		if (colAllRows.item(i).id.search(/m/) == 0){
				 colAllRows.item(i).style.display = "";
			}
        		//colPRows.item(i).style.display="none";
			//oObject.rows.item("p",i).style.display="none";
		}
}

if (j==4)  // Inherited
{
		for (i=1; i<colAllRows.length; i++)
		{
        		colAllRows.item(i).style.display="none";

		}
		for (i=1; i< colAllRows.length; i++)
		{
        		if (colAllRows.item(i).id.search(/h/) == 1){
				 colAllRows.item(i).style.display = "";
			}
		}
}
if (j==5)  // Not-Inherited
{
		for (i=1; i<colAllRows.length; i++)
		{
        		colAllRows.item(i).style.display="none";

		}
		for (i=1; i< colAllRows.length; i++)
		{
        		if (colAllRows.item(i).id.search(/h/) == -1){
				 colAllRows.item(i).style.display = "";
			}
		}
}
}


