<%@codepage="65001" language="JScript"%>
<%
// -- TOOLBAR_EXEMPT --
var strTocPath = String( Request.QueryString( "tocPath" ) );
var strSourceDoc = String( Request.QueryString( "PP" ) );
try
{
strSourceDoc = Server.MapPath( strSourceDoc );
var strStyleDoc = Server.MapPath( "tocDown.xsl" );
var objSource = Server.CreateObject( "Microsoft.XMLDOM" );
var objSource2 = Server.CreateObject( "Microsoft.XMLDOM" );
var objStyle = Server.CreateObject( "Microsoft.XMLDOM" );
objSource.async = false;
objSource2.async = false;
objStyle.async = false;
objStyle.load( strStyleDoc );
objSource.load( strSourceDoc );
objSource = objSource.documentElement;
if( objSource.nodeName == "MsdnToc" )
{
strPath = strTocPath.split( "-" );
objSource = objSource.childNodes[ Number( strPath[1] ) ];
}
var strTopPath = String( objSource.attributes.getNamedItem( "tocPath" ).nodeValue ); // Get the first tocPath
///////////////////////////////////////////////
// If they do not match, we need to dig further
///////////////////////////////////////////////
if( "undefined" != strTopPath && "undefined" != strTocPath && strTocPath != strTopPath && strTocPath.indexOf( strTopPath ) != -1 )
{
objSource2 = objSource
strTocPath = strTocPath.replace( strTopPath + "-" , "" );
strTocPath = strTocPath.split( "-" );
for( i = 0; i < strTocPath.length; i++ )
{
objSource2 = objSource2.childNodes.item( strTocPath[i] );
}
objSource = Server.CreateObject( "Microsoft.XMLDOM" );
objSource.loadXML( objSource2.xml );
}
var strContent = objSource.transformNode( objStyle );
}
catch(e)
{
strContent= "<script>window.onload='';</script>";
}
%>
<HTML>
<HEAD>
<SCRIPT>
function window_load()
{
top.frames["fraToc"].loadFrame();;
}
window.onload = window_load;
</SCRIPT>
</HEAD>
<BODY>
<DIV ID="chunk">
<%= strContent %>
</DIV>
</BODY>
</HTML>