home *** CD-ROM | disk | FTP | other *** search
- // VERSION 8877
-
- //************************** LOCALIZATION VARIABLES ****************************
- var L_GlossaryAlt_ToolTip = "View definition";
- var L_BrowserAlert_Message = "You must use IE4 or greater in order to view popup glossary definitions";
- var L_NoDefAlertTitle_Text = "definition unavailable";
- var L_NoDefAlert_Text = "The glossary term and definition do not exist in the glossary file at this time.";
- var L_PopUpBoxStyle_Style = "WIDTH:200PX; PADDING:5px 7px 7px 7px; BACKGROUND-COLOR:#FFFFCC; BORDER:SOLID 1 #999999; VISIBILITY:HIDDEN; POSITION:ABSOLUTE; TOP:0PX; LEFT:0PX; Z-INDEX:2;";
- var L_See_Text = "<B>See: </B>"
- var L_SeeAlso_Text = "<B>See Also: </B>"
-
- //Variables for Feedback links
- var L_FeedbackLink = "Send feedback to Visual Studio"
- var L_MessageLink = "Microsoft Knowledgebase Link"
-
- //*************************** END LOCALIZATION *********************************
-
- var InlineImgOn = false; // if true, puts an image next to glossary items
- var xmlGloss = true; // turns on glossary implementation
- var BeforeReference = "../../dncommon/html/"; // sets base reference
- var xmlFile = BeforeReference + "vsgloss.xml";
- var defContent = ""; // holds glossary definition from txt file
- var specialCheck, TermDef, WorkText, AnotherTagIndex;
- var noPopupsMsg, ieX, ieY, popOpen, theImg, theDiv, PopUp_InAPopUp, e;
- var AnotherCheck, WindowOne, WindowTwo, theTagIndex;
- var lastClickedPopUp, ie4, IE5, checkIt2;
-
- /*
- * Common code
- */
- var ie4 = false;
- var advanced = false;
- var curLang = null;
- var showAll = true;
- var cook = null;
- var baseUrl = document.scripts[document.scripts.length - 1].src.replace(/[^\/]+.js/, "");
-
- if (navigator.appName == "Microsoft Internet Explorer") {
- var ver = navigator.appVersion;
- var v = new Number(ver.substring(0,ver.indexOf(".", 0)));
- if (v >= 4) {
- advanced = true;
- ie4 = true;
-
- // Look for 5.x buried somewhere in the version string.
- var toks = ver.split(/[^0-9.]/);
- if (toks) {
- for (var i = 0; i < toks.length; i++) {
- var tok = toks[i];
- if (tok.indexOf(".", 0) > 0) {
- if (tok >= 5)
- ie4 = false;
- }
- }
- }
- }
- }
- if (advanced)
- window.onload = bodyOnLoad;
- window.onbeforeprint = set_to_print;
- window.onafterprint = reset_form;
-
- //XML POPUP CODE
- var xmlTermRoot; //XML term root variable (move into function later)
- var xmlPopupContent; //XML content formatted for popup
- var xmlDOM; //The XMLDOM ActiveX object model
- var xmlDOMLoaded = false; //Not loaded til 1st glossary popup. Persists for see alsos
- //GLOSSARY GIF VARIABLES
- var glossInitial = "";
- var popupDIV = "<DIV ID='popUpWindow' STYLE='"+L_PopUpBoxStyle_Style+"'>" + "</DIV>";
- var browser = navigator.appName + " " + parseInt(navigator.appVersion);
-
- function finishOnLoad(){
- //THIS SECTION INSERTS POPUP CODE BETWEEN SPAN TAGS
- var TheSpans = document.all.tags('span'); spanText=""
- for (var i = 0; i < TheSpans.length; i++){
- if (TheSpans[i].className=='gp'){
- spanText=TheSpans[i].innerHTML;
- TheSpans[i].innerHTML="";
- var newElement=document.createElement("<A ID='PopUp' CLASS='glosslink' HREF='#"+TheSpans[i].id+"' title='"+L_GlossaryAlt_ToolTip+"'>");
- newElement.innerHTML = glossInitial + spanText;
- TheSpans[i].appendChild(newElement);
- }
- }
- document.onkeypress = ieKey;
- window.onresize = closeIE4;
- document.body.onclick = bodyOnClick;
- //IF THE USER HAS IE4+ THEY WILL BE ABLE TO VIEW POPUP BOXES
- if (advanced){
- document.body.insertAdjacentHTML('beforeEnd', popupDIV);}
- return;}
-
- function bodyOnClick()
- {
- if (advanced) {
- var elem = window.event.srcElement;
- for (; elem; elem = elem.parentElement) {
- if (elem.id == "reftip")
- return;
- }
- hideTip();
- closeMenu();
- hideSeeAlso();
- resizeBan();
- clickAndDo();
- }
- }
-
- function clickAndDo(){
- e = window.event.srcElement;
- //CAUSES A CLICK ON THE PAGE TO HIDE THE POPUP WINDOWS
- document.all.popUpWindow.style.visibility = "hidden";
- //SETS POPUP WINDOW'S RESIZE VARIABLES TO FALSE
- WindowOne = false; //TRUE IF USER CLICKS ON THE ID POPUP
- WindowTwo = false; //TRUE IF USER CLICKS ON THE ID INNERNAV
- //SETS GLOSSARY POPUP'S NEEDED VARIABLES TO FALSE
- popOpen = false; //TRUE IF A GLOSSARY POPUP IS VISIBLE
- PopUp_InAPopUp = false; //TRUE IF USER CLICKS A SEE ALSO GLOSSARY TERM
- specialCheck = false; //TRUE IF THE GLOSSARY TERM ISN'T IN TXT FILE
- AnotherCheck = false; //TRUE IF INLINE GIFS OFF AND HELP ADDED HTML
- //DETERMINES IF A CLICK IS ON AN HREF TAG
- for (var a = 0; a < 5; a++){
- if ((e.tagName != 'A') && (e.parentElement != null)){e = e.parentElement;}
- eID = e.id;
- //XML CODE ALLOWS TDC TO COEXIST BECAUSE OF THIS
- xmlTermRoot = "";
- if (e.hash != null){
- xmlTermRoot = e.hash;}
- //DETERMINES IF A CLICK IS ON A GLOSSARY POPUP ITEM
- if (eID.indexOf('PopUp') != -1){
- lastClickedPopUp = e; //USED BY THE WINDOW RESIZE FUNCTION
- WindowOne = true;
- //THIS CONTROLS THE ONCLICK COLOR OF THE GLOSSARY TEXT
- checkIt2 = true;
- theTagIndex = true;
- theTagIndex = e.sourceIndex;
- AnotherTagIndex = parseInt(theTagIndex);
- //THIS CAPTURES THE HTML THAT CONTAINS THE TERM
- WorkText = e.innerHTML;
- //THIS CHECKS FOR ADDED HTML FROM HTMLHELP SEARCH ENGINE
- if (WorkText.indexOf('BACKGROUND-COLOR:') != -1){
- AnotherCheck = true;
- GetTheRealTerm();}
- else{
- TermDef = e.innerHTML;}
- //AFTER GRABBING THE PRECISE TERM THE NEXT FUNCTION IS INVOKED
- callGlossary(e, TermDef); break;}
- //DETERMINES WHETHER A CLICK IS ON A SEE ALSO GLOSSARY POPUP ITEM
- else if (eID.indexOf('In_PopuP') != -1){
- //THIS CONTROLS THE ONCLICK COLOR OF THE GLOSSARY TEXT
- checkIt2 = true;
- theTagIndex = parseInt(AnotherTagIndex);
- var changeBack = document.all(theTagIndex);
- //A NEEDED VARIABLE IS SET TO TRUE AND THE TERM IS PICKED UP
- PopUp_InAPopUp = true;
- TermDef = e.innerHTML;
- //AFTER GRABBING THE PRECISE TERM THE NEXT FUNCTION IS INVOKED
- callGlossary(e, TermDef); break;}}
-
- return;}
-
- function ieKey(){
- if (window.event.keyCode == 27){closeIE4();}
- return;}
-
- function GetTheRealTerm(){
- var c, d, f;
- //IN THIS CASE WE DONT NEED TO REMOVE ANY IMAGES, INLINE IMGS ARE OFF, SO..
- if (AnotherCheck){
- //THIS REMOVES ALL BUT THE TERM AND THE HTML FROM HTMLHELP
- d = "</FONT>";
- f = WorkText;
- f = f.replace(d,'');}
- else{
- c = WorkText.indexOf('width=12>');
- if (c == -1){return;}
- d = "</FONT>";
- //THIS REMOVES ALL BUT THE TERM AND THE HTML FROM HTMLHELP
- f = WorkText.substring((c+9),WorkText.length);
- f = f.replace(d,'');}
- //THIS REMOVES THE HTML ADDED BY HTMLHELP LEAVING THE TERM
- var g = f.indexOf('<');
- if (g == -1){return;}
- var h = f.indexOf('>');
- if (h == -1){return;}
- var i = f.substring(g,(h+1));
- f = f.replace(i,'');
- TermDef = f;
- return TermDef;}
-
- //THIS REMOVES THE IMAGE IF HTMLHELP HASN'T ADDED HTML AND LEAVES THE TERM
- function GetTheRealTerm2(){
- var c = WorkText.lastIndexOf('width=12>');
- if (c == -1){return;}
- else {TermDef = WorkText.substring((c+9),WorkText.length);}
- return TermDef;}
-
- function getImage2(){
- //HANDLES GREY STATE OF GLOSSARY AND RELTOPIC POPUPS
- var TheSpot;
- //FOR THE GLOSSARY POPUP
- if ((checkIt2) && (theTagIndex != -1)){
- TheSpot = document.all(theTagIndex);}
- else{return;}
- //DETERMINES IF A CLICK IS ON AN HREF TAG
- for (var a = 0; a < 5; a++){
- if ((TheSpot.tagName != 'A') && (TheSpot.parentElement != null)){TheSpot = TheSpot.parentElement;}
- var elemImg = TheSpot;
- if(elemImg.tagName == 'A'){elemImg = TheSpot.all.tags('IMG')(0); break;}}
- return elemImg;}
-
- function callGlossary(){
- //PREVENTS NAVIGATION ON HREF TAGS
- event.returnValue = false;
- //THIS SECTION SETS THE X AND Y COORDINATES OF THE POPUP BOX
- if (PopUp_InAPopUp){
- ieX = document.all.popUpWindow.style.left;
- ieY = document.all.popUpWindow.style.top;}
- else{
- if (e.offsetParent.tagName.toLowerCase() == 'body'){
- ieX = e.offsetLeft;
- ieY = ((e.offsetTop) + (e.offsetHeight) + 1);}
- else if (e.offsetParent.offsetParent.tagName.toLowerCase() == 'body'){
- ieX = ((e.offsetLeft) + (e.offsetParent.offsetLeft));
- ieY = ((e.offsetHeight) + (e.offsetTop) + (e.offsetParent.offsetTop) + (1));}
- else if (e.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body'){
- ieX = ((e.offsetLeft) + (e.offsetParent.offsetLeft) + (e.offsetParent.offsetParent.offsetLeft));
- ieY = ((e.offsetHeight) + (e.offsetTop) + (e.offsetParent.offsetTop) + (e.offsetParent.offsetParent.offsetTop) + (1));}
- else{
- ieX = window.event.clientX;
- ieY = window.event.clientY + document.body.scrollTop;}}
- //IF A POPUP WINDOW IS OPEN PAUSE AND THEN RESTART THIS PROCESS
- if (popOpen){window.setTimeout('callGlossary()', 50);}
- //IF THE USER DOESN'T HAVE IE4+ THIS SENDS A CUSTOM ERROR MESSAGE
- if (!advanced){
- alert (L_BrowserAlert_Message);
- noPopupsMsg = true;
- noPopups = false;}
- //IF THE USER DOESN'T HAVE IE4+ THIS KILLS THE REST OF THE POPUP SCRIPT
- if (noPopupsMsg){return;}
- //IF IE4+ AND NO POPUP OPEN WE GO TO THE NEXT PART OF THE SCRIPT
- if ((advanced) && (!popOpen)){iePopup();}
- return;}
-
- function iePopup(){
- //DETERMINE IF THE POPUP WILL BE OFFSCREEN AND FIX THIS
- var rightlimit = ieX + document.all.popUpWindow.offsetWidth;
- //IF IT'S OFF SCREEN THIS PART MOVES IT SO IT'S ON SCREEN
- if (rightlimit >= document.body.clientWidth){ieX -= (rightlimit - document.body.clientWidth);}
- //Set And Position PopUpWindow
- document.all.popUpWindow.innerHTML = "";
- document.all.popUpWindow.style.height = 0;
- //TEST FOR XML VS TEXT FILE
- if (xmlGloss){
- // GET FORMATTED POPUP CONTENT OR NOT FOUND
- xmlPopupContent = getXMLPopupContent(xmlTermRoot);
- //LOAD THE POPUP WINDOW
- document.all.popUpWindow.innerHTML = xmlPopupContent;
- //LET THE POPUP FILL
- window.setTimeout ('iePopHeight()', 0);
- //SET POPUP WINDOWS X, Y COORDINATES
- document.all.popUpWindow.style.top = ieY;
- document.all.popUpWindow.style.left = ieX;
- popOpen = true;
- //PREVENT EVENT BUBBLING
- return (false);}
- else{
- //IF THE GLOSSARY OBJECT EXISTS IT IS REMOVED FROM THE PAGE
- if (document.tdcGloss){document.tdcGloss.outerHTML = "";}
- //THIS PART BUILDS THE GLOSSARY OBJECT
- var h = "";
- h = h + "<OBJECT ID='tdcGloss' CLASSID='clsid:333C7BC4-460F-11D0-BC04-0080C7055A83' VIEWASTEXT>";
- h = h + "<PARAM NAME='DataURL' VALUE='"+BeforeReference+"Basics/gloss.txt'>";
- h = h + "<PARAM NAME='UseHeader' VALUE='True'>";
- h = h + "<PARAM NAME='FieldDelim' VALUE=','>";
- h = h + "<PARAM NAME='EscapeChar' VALUE='#'>";
- h = h + "</OBJECT>";
- //THIS PART ADDS THE OBJECT TO THE BOTTOM OF THE PAGE
- document.body.insertAdjacentHTML('beforeEnd', h);
- //IF THE GLOSSARY TERM LIVES IN THE GLOSSARY TEXT FILE GET IT
- var CheckTermDef = tdcGloss.recordset;
- CheckTermDef.moveFirst();
- while (!CheckTermDef.EOF){
- if ((TermDef.toLowerCase()) == (CheckTermDef.fields('Term').value.toLowerCase())){
- specialCheck = true;
- GoToWork();
- break;}
- CheckTermDef.moveNext();}
- //THIS PART PICKS UP AND STORES THE PROPER DEFINITION
- function GoToWork(){
- defContent = tdcGloss.recordset.fields('Definition').value;
- //IF THERE ARE SEE ALSO'S THEY'RE PICKED UP AND THE HTML IS WRITTEN
- if (tdcGloss.recordset.fields('SeeAlso').value){
- if (tdcGloss.recordset.fields('SeeAlso').value.indexOf('~') != -1){
- ParseOtherDefs();}
- else{
- var seeAlsoContent = "";
- seeAlsoContent = tdcGloss.recordset.fields('SeeAlso').value;
- document.all.popUpWindow.innerHTML = "<H5 CLASS='GLOSSARY_ITEM'>" +TermDef+ "</H5><P>" +defContent+ "</P><P ID='OtherDefs'><B>See Also: </B><A ID='In_PopuP' HREF='#'>" +seeAlsoContent+ "</A></P>";}}
- else{
- document.all.popUpWindow.innerHTML = "<H5 CLASS='GLOSSARY_ITEM'>" +TermDef+ "</H5><P>" +defContent+ "</P>";}
-
- //TIMEOUT ALLOWS POPUP CONTENT TO FILL AND THEN GET POPUP HEIGHT
- window.setTimeout ('iePopHeight()', 0);}
- //IF THE GLOSSARY DOESN'T CONTAIN THE TERM THIS ALERTS THE USER
- if (!specialCheck){
- document.all.popUpWindow.innerHTML = "<H5 CLASS='GLOSSARY_ITEM'>" +L_NoDefAlertTitle_Text+ "</H5><P>" +L_NoDefAlert_Text+ "</P>";
- //TIMEOUT ALLOWS POPUP CONTENT TO FILL AND THEN GET POPUP HEIGHT
- window.setTimeout ('iePopHeight()', 0);}
- //THIS PART SETS THE X AND Y COORDS OF THE POPUP WINDOW
- document.all.popUpWindow.style.top = ieY;
- document.all.popUpWindow.style.left = ieX;
- //NOW THIS VARIABLE IS SET TO TRUE BECAUSE THE POPUP IS READY
- popOpen = true;
- //THIS KILLS THE BUBBLING OF THE EVENT
- return false;}} // Ends the "else" of the "if" introduced above
-
- function iePopHeight(){
- var pageBottom = document.body.scrollTop + document.body.clientHeight;
- var popHeight = document.all.popUpWindow.offsetHeight;
- document.all.popUpWindow.style.height = popHeight - 2 * (parseInt(document.all.popUpWindow.style.borderWidth));
- //IF THE POPUP IS LONGER THAN THE VISIBLE WINDOW IT WRITES IT AT COORDS 00**
- if (popHeight + ieY >= pageBottom){
- if (popHeight <= pageBottom){
- document.all.popUpWindow.style.top = pageBottom - popHeight;}
- else{document.all.popUpWindow.style.top = 0;}}
- document.all.popUpWindow.style.visibility = "visible";
- return;}
-
- function closeIE4(){
- document.all.popUpWindow.style.visibility = "hidden";
- popOpen = false;
- resizeBan(); //also resize the non-scrolling banner
- return;}
-
- function getXMLPopupContent(theXMLTermRoot){
- var theXMLTerm, theXMLTermID;
- var theEntry;
- var theScopeDefs;
- var theScopes;
- var theDefinition;
- var theSeeAlsos, seeAlsoID, seeAlsoTerm;
- var theSeeEntry, seeID, seeTerm;
- var outText;
- var i, j, k, l, m;
- var scopeFound;
- var noDef = "<H5 CLASS='GLOSSARY_ITEM'>" + L_NoDefAlertTitle_Text + "</H5><P>" + L_NoDefAlert_Text + "</P>";
- //CHECK THAT TERM ROOT EXISTS
- if (theXMLTermRoot.length > 1){
- theXMLTermID = theXMLTermRoot.substring(1, theXMLTermRoot.length);
- i = theXMLTermID.indexOf(":");
- if (i > 0){
- theXMLTerm = theXMLTermID.substring(i+1, theXMLTermID.length);}
- else{
- return (noDef);}}
- else{
- return (noDef);}
- //IF XML OBJECT MODEL NOT LOADED, LOAD IT
- if (!xmlDOMLoaded){
- xmlDOM = new ActiveXObject("Microsoft.XMLDOM");
- //FORCE OBJECT TO FINISH LOADING XML FILE BEFORE RETURNING - NO ASYNCH
- xmlDOM.async = false;
- //FORCE XML * NOT * TO BE VALIDATED BY PARSER
- xmlDOM.validateOnParse = false;
- //LOAD XML INTO THE OBJECT MODEL
- xmlDOM.load(xmlFile);
- //SET UP FOR PERSISTENCE
- xmlDOMLoaded = true;}
- outText = noDef;
- //GO TO ENTRY NODE FOR DESIRED TERM
- theEntry = xmlDOM.nodeFromID(theXMLTerm);
- if (theEntry != null){
- //FOUND THE ENTRY, EXAMINE THE SCOPEDEFS
- theScopeDefs = theEntry.selectNodes("scopeDef");
- scopeFound = false;
- for (i = 0; i < theScopeDefs.length && !scopeFound; i++){
- theScopes = theScopeDefs(i).selectNodes("scope");
- //CHECK FOR OUR SCOP IN THE SCOPEDEF
- for (j = 0; j < theScopes.length; j++){
- if (theScopes(j).attributes.getNamedItem("scopeTermID").text == theXMLTermID){
- //FOUND SCOP IN ENTERY - GET AND FORMAT THE TERM AND DEF DATA
- scopeFound = true;
- outText = formatXMLTerm(theEntry.selectSingleNode("term").text);
- if (theScopeDefs(i).selectSingleNode("def") != null){
- theDefinition = formatXMLDef(theScopeDefs(i).selectSingleNode("def"));
- outText = outText + theDefinition;
- //FORMAT SEE ALSOS - IF ANY EXIST
- theSeeAlsos = theScopeDefs(i).selectNodes("seeAlso");
- seeAlsoID = "";
- seeAlsoTerm = "";
- for (k = 0; k < theSeeAlsos.length; k++){
- seeAlsoID = theSeeAlsos(k).attributes.getNamedItem("seeAlsoID").text;
- l = seeAlsoID.indexOf(":");
- if (l > 0){
- seeAlsoScope = seeAlsoID.substring(0, l + 1);
- seeAlsoID = seeAlsoID.substring(l + 1, seeAlsoID.length);}
- else
- seeAlsoScope = "";
- seeAlsoTerm = xmlDOM.nodeFromID(seeAlsoID).selectSingleNode("term").text;
- //IF K = 0 FORMAT FIRST SEE ALSO
- outText = outText + formatXMLSeeAlso(seeAlsoScope + seeAlsoID, seeAlsoTerm, (k == 0));}
- if (k > 0){
- //IF SEE ALSOS, ADD TRAILING PARAGRAPH MARK
- outText = outText + "</P>";}}
- else{
- theSeeEntry = theScopeDefs(i).selectSingleNode("seeEntry");
- seeID = theSeeEntry.attributes.getNamedItem("seeID").text;
- k = seeID.indexOf(":");
- if (k > 0){
- seeScope = seeID.substring(0, k + 1);
- seeID = seeID.substring(k + 1, seeID.length);}
- else
- seeScope = "";
- seeTerm = xmlDOM.nodeFromID(seeID).selectSingleNode("term").text;
- outText = outText + formatXMLSee(seeScope + seeID, seeTerm);}}}}}
- else{
- //TERM NOT FOUND - TELL USER WE DIDN'T TEST THIS TERM :)
- outText = noDef;}
- xmlTermRoot = ""; // Clean up the global
- return (outText);}
- // for debugging: return ("XML -" + xmlTermRoot + "/" + theXMLTerm + "termText:" + termText + "defText:" + defText + outText);
-
- function formatXMLTerm(theTerm){
- return ("<H5 CLASS='GLOSSARY_ITEM'>" + theTerm + "</H5>");}
-
- function formatXMLDef(theDef){
- var theParas;
- var i;
- var theDefOut;
- theParas = theDef.selectNodes("para");
- theDefOut = "";
- for (i = 0; i < theParas.length; i++){
- theDefOut = theDefOut + "<P CLASS='GLOSSARY_TEXT'>" + theParas(i).text + "</P>";}
- return (theDefOut);}
-
- function formatXMLSee(theSeeTermID, theSeeTerm){
- var theSeeText;
-
- theSeeText = "<A ID='In_PopuP' HREF='#" + theSeeTermID + "'>" + theSeeTerm + "</A>";
- return ("<P ID='SeeDef'>" + L_See_Text + theSeeText);}
-
- function formatXMLSeeAlso(theSeeAlsoTermID, theSeeAlsoTerm, bFirstOne){
- var theSeeAlsoText;
- theSeeAlsoText = "<A ID='In_PopuP' HREF='#" + theSeeAlsoTermID + "'>" + theSeeAlsoTerm + "</A>";
- if (bFirstOne){
- return ("<P ID='OtherDefs'>" + L_SeeAlso_Text + theSeeAlsoText);}
- else{
- return (", " + theSeeAlsoText);}}
-
- function bodyOnLoad()
- {
- if (advanced) {
- var address = location.href;
- var bookmarkStart = address.indexOf("#")
- // If it has a bookmark, check to see if Language is near A Name
- if (bookmarkStart>-1){
- var bookmark = address.substring(bookmarkStart+1);
- curLang = findLanguage(bookmark);
- }
- else {
- // Check the context window for current language.
- var cLang;
- try{
- for (i=1; i< window.external.ContextAttributes.Count; i++){
- if(window.external.ContextAttributes(i).Name.toUpperCase()=="DEVLANG"){
- var b = window.external.ContextAttributes(i).Values.toArray();
- cLang = b[0].toUpperCase();
- }
- }
- }
- catch(e){}
- if (cLang != null){
- if (cLang.indexOf("VB")!=-1) curLang = "Visual Basic";
- if (cLang.indexOf("VC")!=-1) curLang = "C++";
- if (cLang.indexOf("C#")!=-1) curLang = "C#";
- if (cLang.indexOf("JSCRIPT")!=-1) curLang = "JScript";
- if (cLang.indexOf("VBSCRIPT")!=-1) curLang = "VBScript";
- }
-
- if (curLang == null){
- var l = ""
- // Check to see what the help filter is set to.
- try {l = window.external.Help.FilterQuery.toUpperCase();}
- catch(e){}
- if (l.indexOf("VB")!=-1) curLang = "Visual Basic";
- if (l.indexOf("VC")!=-1) curLang = "C++";
- if (l.indexOf("C#")!=-1) curLang = "C#";
- if (l.indexOf("JSCRIPT")!=-1) curLang = "JScript";
- if (l.indexOf("VBSCRIPT")!=-1) curLang = "VBScript";
- }
- }
- if (curLang != null)
- showAll = false;
- initLangs();
- resizeBan();
- initReftips();
- initSeeAlso();
- }
-
- finishOnLoad();
- }
-
- function findLanguage(bookmark){
- // Find span associated with bookmark
- var found = false
- var aColl = document.all.tags("A");
- for (i=0; i<aColl.length; i++){
- if (aColl(i).name.toUpperCase()==bookmark.toUpperCase()){
- var elem = null
- for(t = 1; t<4; t++){
- elem = document.all(aColl(i).sourceIndex + t);
- if (elem.tagName.toUpperCase()=="SPAN")
- found = true;
- break;
- }
- break;
- }
- }
-
- //if found, filter language
- if (found){
- var lang = elem.innerText
- return lang.substring(lang.indexOf("[") + 1, lang.indexOf("]"));
- }
- }
-
- /*
- * Language filtering
- */
- function initLangs()
- {
- var hdr = document.all.hdr;
- if (!hdr)
- return;
-
- var langs = new Array;
- var spans = document.all.tags("SPAN");
- if (spans) {
- var iElem = spans.length;
- for (iElem = 0; iElem < spans.length; iElem++) {
- var elem = spans[iElem];
- if (elem.className == "lang") {
-
- // Update the array of unique language names.
- var a = elem.innerText.split(",");
- for (var iTok = 0; iTok < a.length; iTok++) {
- if (a[iTok]=="[A]"){
- langs[0]="A";
- elem.parentElement.outerText="";
- }
- var m = a[iTok].match(/([A-Za-z].*[A-Za-z+#])/);
- if (m) {
- var iLang = 0;
- while (iLang < langs.length && langs[iLang] < m[1])
- iLang++;
- if (iLang == langs.length || langs[iLang] != m[1]) {
- var before = langs.slice(0,iLang);
- var after = langs.slice(iLang);
- langs = before.concat(m[1]).concat(after);
- }
- }
- }
- }
- }
- }
-
- if (langs.length > 0) {
- var pres = document.all.tags("PRE");
- if (pres) {
- for (var iPre = 0; iPre < pres.length; iPre++)
- initPreElem(pres[iPre]);
- }
-
- if (curLang == null){
- var obj = document.all.obj_cook;
- if (obj && obj.object) {
- cook = obj;
- var lang = obj.getValue("lang");
- var iLang = langs.length - 1;
- while (iLang && langs[iLang] != lang)
- iLang--;
- curLang = langs[iLang];
- if (obj.getValue("lang.all") != "1")
- showAll = false;
- }
- }
-
- var iLim = document.body.all.length;
- var head = null;
- for (var i = 0; i < iLim; i++) {
- var elem = document.body.all[i];
- if (elem.tagName.match(/^(P)|(PRE)|([DOU]L)$/))
- break;
- if (elem.tagName.match(/^H[1-6]$/)) {
- head = elem;
- head.insertAdjacentHTML('BeforeEnd', '<SPAN CLASS=ilang></SPAN>');
- }
- }
-
- iLang = 0;
- foundA = false;
- while (iLang != langs.length){
- if (langs[iLang]=="A")
- foundA = true;
- iLang++;
- }
- if (!foundA)
- // don't language button on
- var td = hdr.insertCell(0);
- if (td) {
- // Localizable strings.
- var L_Filter_Tip = "Language Filter"; // tooltip for language button
- var L_Language = "Language"; // heading for menu of programming languages
- var L_Show_All = "Show All"; // label for 'show all languages' menu item
-
- // Add the language button to the button bar.
- td.className = "button1";
- td.onclick = langMenu;
- td.innerHTML = '<IMG SRC="' + baseUrl + 'Filter.gif' + '" ALT="' +
- L_Filter_Tip + '" BORDER=0>';
-
- // Add the menu.
- var div = '<DIV ID="lang_menu" CLASS=langMenu><B>' + L_Language + '</B><UL>';
- for (var i = 0; i < langs.length; i++)
- div += '<LI><A HREF="" ONCLICK="chooseLang(this)">' + langs[i] + '</A><BR>';
- div += '<LI><A HREF="" ONCLICK="chooseAll()">' + L_Show_All + '</A></UL></DIV>';
- document.body.insertAdjacentHTML('BeforeEnd', div);
- }
-
- if (!showAll)
- filterLang();
- }
- }
-
- function initPreElem(pre)
- {
- var htm0 = pre.outerHTML;
-
- var reLang = /<span\b[^>]*class="?lang"?[^>]*>/i;
- var iFirst = -1;
- var iSecond = -1;
-
- iFirst = htm0.search(reLang);
- if (iFirst >= 0) {
- iPos = iFirst + 17;
- iMatch = htm0.substr(iPos).search(reLang);
- if (iMatch >= 0)
- iSecond = iPos + iMatch;
- }
-
- if (iSecond < 0) {
- var htm1 = trimPreElem(htm0);
- if (htm1 != htm0) {
- pre.insertAdjacentHTML('AfterEnd', htm1);
- pre.outerHTML = "";
- }
- }
- else {
- var rePairs = /<(\w+)\b[^>]*><\/\1>/gi;
-
- var substr1 = htm0.substring(0,iSecond);
- var tags1 = substr1.replace(/>[^<>]+(<|$)/g, ">$1");
- var open1 = tags1.replace(rePairs, "");
- open1 = open1.replace(rePairs, "");
-
- var substr2 = htm0.substring(iSecond);
- var tags2 = substr2.replace(/>[^<>]+</g, "><");
- var open2 = tags2.replace(rePairs, "");
- open2 = open2.replace(rePairs, "");
-
- pre.insertAdjacentHTML('AfterEnd', open1 + substr2);
- pre.insertAdjacentHTML('AfterEnd', trimPreElem(substr1 + open2));
- pre.outerHTML = "";
- }
- }
-
- function trimPreElem(htm)
- {
- return htm.replace(/[ \r\n]*((<\/[BI]>)*)[ \r\n]*<\/PRE>/g, "$1</PRE>").replace(
- /\w*<\/SPAN>\w*((<[BI]>)*)\w*\r\n/g, "\r\n</SPAN>$1"
- );
- }
-
- function getBlock(elem)
- {
- while (elem && elem.tagName.match(/^([BIUA]|(SPAN)|(CODE)|(TD))$/))
- elem = elem.parentElement;
- return elem;
- }
-
- function langMenu()
- {
- bodyOnClick();
-
- window.event.returnValue = false;
- window.event.cancelBubble = true;
-
- var div = document.all.lang_menu;
- var lnk = window.event.srcElement;
- if (div && lnk) {
- var x = lnk.offsetLeft + lnk.offsetWidth - div.offsetWidth;
- div.style.pixelLeft = (x < 0) ? 0 : x;
- div.style.pixelTop = lnk.offsetTop + lnk.offsetHeight;
- div.style.visibility = "visible";
- }
- }
-
- function chooseLang(item)
- {
- window.event.returnValue = false;
- window.event.cancelBubble = true;
-
- if (item) {
- closeMenu();
- curLang = item.innerText;
- showAll = false;
- }
-
- if (cook) {
- cook.putValue('lang', curLang);
- cook.putValue('lang.all', '');
- }
-
- filterLang();
- }
-
- function chooseAll()
- {
- window.event.returnValue = false;
- window.event.cancelBubble = true;
-
- closeMenu();
-
- showAll = true;
- if (cook)
- cook.putValue('lang.all', '1');
-
- unfilterLang();
- }
-
- function closeMenu()
- {
- var div = document.all.lang_menu;
- if (div && div.style.visibility != "hidden") {
- var lnk = document.activeElement;
- if (lnk && lnk.tagName == "A")
- lnk.blur();
-
- div.style.visibility = "hidden";
- }
- }
-
- function getNext(elem)
- {
- for (var i = elem.sourceIndex + 1; i < document.all.length; i++) {
- var next = document.all[i];
- if (!elem.contains(next))
- return next;
- }
- return null;
- }
-
- function filterMatch(text, name)
- {
- var a = text.split(",");
- for (var iTok = 0; iTok < a.length; iTok++) {
- var m = a[iTok].match(/([A-Za-z].*[A-Za-z+#])/);
- if (m && m[1] == name)
- return true;
- }
- return false;
- }
-
- function topicHeading(head)
- {
- try{var iLim = nstext.children.length;
- Section = nstext;}
- catch(e){try{var iLim = scrtext.children.length;
- Section = scrtext;}
- catch(e){var iLim = document.body.children.length;
- Section = document.body;
- }
- }
- var idxLim = head.sourceIndex;
- for (var i = 0; i < iLim; i++) {
- var elem = Section.children[i];
- if (elem.sourceIndex < idxLim) {
- if (elem.tagName.match(/^(P)|(PRE)|([DOU]L)$/))
- return false;
- }
- else
- break;
- }
- return true;
- }
-
- function filterLang()
- {
- var spans = document.all.tags("SPAN");
- for (var i = 0; i < spans.length; i++) {
- var elem = spans[i];
- if (elem.className == "lang") {
- var newVal = filterMatch(elem.innerText, curLang) ? "block" : "none";
- var block = getBlock(elem);
- block.style.display = newVal;
- elem.style.display = "none";
-
- if (block.tagName == "DT") {
- var next = getNext(block);
- if (next && next.tagName == "DD")
- next.style.display = newVal;
- }
- else if (block.tagName == "DIV") {
- block.className = "filtered2";
- }
- else if (block.tagName.match(/^H[1-6]$/)) {
- if (topicHeading(block)) {
- if (newVal != "none") {
- var tag = null;
- if (block.children && block.children.length) {
- tag = block.children[block.children.length - 1];
- if (tag.className == "ilang") {
- tag.innerHTML = (newVal == "block") ?
- ' [' + curLang + ']' : "";
- }
- }
- }
- }
- else {
- var next = getNext(block);
- while (next && !next.tagName.match(/^(H[1-6])|(DIV)$/)) {
- next.style.display = newVal;
- next = getNext(next);
- }
- }
- }
- }
- else if (elem.className == "ilang") {
- var block = getBlock(elem);
- if (block.tagName == "H1")
- elem.innerHTML = ' [' + curLang + ']';
- }
- }
-
- if (ie4) {
- document.body.style.display = "none";
- document.body.style.display = "block";
- }
- resizeBan();
- }
-
- function unfilterLang(name)
- {
- var spans = document.all.tags("SPAN");
- for (var i = 0; i < spans.length; i++) {
- var elem = spans[i];
- if (elem.className == "lang") {
- var block = getBlock(elem);
- block.style.display = "block";
- elem.style.display = "inline";
-
- if (block.tagName == "DT") {
- var next = getNext(block);
- if (next && next.tagName == "DD")
- next.style.display = "block";
- }
- else if (block.tagName == "DIV") {
- block.className = "filtered";
- }
- else if (block.tagName.match(/^H[1-6]$/)) {
- if (topicHeading(block)) {
- var tag = null;
- if (block.children && block.children.length) {
- tag = block.children[block.children.length - 1];
- if (tag && tag.className == "ilang")
- tag.innerHTML = "";
- }
- }
- else {
- var next = getNext(block);
- while (next && !next.tagName.match(/^(H[1-6])|(DIV)$/)) {
- next.style.display = "block";
- next = getNext(next);
- }
- }
- }
- }
- else if (elem.className == "ilang") {
- elem.innerHTML = "";
- }
- }
- resizeBan();
- }
-
-
- /*
- * Reftips (parameter popups)
- */
- function initReftips()
- {
- var DLs = document.all.tags("DL");
- var PREs = document.all.tags("PRE");
- if (DLs && PREs) {
- var iDL = 0;
- var iPRE = 0;
- var iSyntax = -1;
- for (var iPRE = 0; iPRE < PREs.length; iPRE++) {
- if (PREs[iPRE].className == "syntax") {
- while (iDL < DLs.length && DLs[iDL].sourceIndex < PREs[iPRE].sourceIndex)
- iDL++;
- if (iDL < DLs.length) {
- initSyntax(PREs[iPRE], DLs[iDL]);
- iSyntax = iPRE;
- }
- else
- break;
- }
- }
-
- if (iSyntax >= 0) {
- var last = PREs[iSyntax];
- last.insertAdjacentHTML(
- 'AfterEnd',
- '<DIV ID=reftip CLASS=reftip STYLE="position:absolute;visibility:hidden;overflow:visible;"></DIV>'
- );
- }
- }
- }
-
- function initSyntax(pre, dl)
- {
- var strSyn = pre.outerHTML;
- var ichStart = strSyn.indexOf('>', 0) + 1;
- var terms = dl.children.tags("DT");
- if (terms) {
- for (var iTerm = 0; iTerm < terms.length; iTerm++) {
- var words = terms[iTerm].innerText.replace(/\[.+\]/g, " ").replace(/,/g, " ").split(" ");
- var htm = terms[iTerm].innerHTML;
- for (var iWord = 0; iWord < words.length; iWord++) {
- var word = words[iWord];
-
- if (word.length > 0 && htm.indexOf(word, 0) < 0)
- word = word.replace(/:.+/, "");
-
- if (word.length > 0) {
- var ichMatch = findTerm(strSyn, ichStart, word);
- while (ichMatch > 0) {
- var strTag = '<A HREF="" ONCLICK="showTip(this)" CLASS="synParam">' + word + '</A>';
-
- strSyn =
- strSyn.slice(0, ichMatch) +
- strTag +
- strSyn.slice(ichMatch + word.length);
-
- ichMatch = findTerm(strSyn, ichMatch + strTag.length, word);
- }
- }
- }
- }
- }
-
- // Replace the syntax block with our modified version.
- pre.outerHTML = strSyn;
- }
-
- function findTerm(strSyn, ichPos, strTerm)
- {
- var ichMatch = strSyn.indexOf(strTerm, ichPos);
- while (ichMatch >= 0) {
- var prev = (ichMatch == 0) ? '\0' : strSyn.charAt(ichMatch - 1);
- var next = strSyn.charAt(ichMatch + strTerm.length);
- if (prev != '<' && !isalnum(prev) && !isalnum(next)) {
- var ichComment = strSyn.indexOf("/*", ichPos);
- while (ichComment >= 0) {
- if (ichComment > ichMatch) {
- ichComment = -1;
- break;
- }
- var ichEnd = strSyn.indexOf("*/", ichComment);
- if (ichEnd < 0 || ichEnd > ichMatch)
- break;
- ichComment = strSyn.indexOf("/*", ichEnd);
- }
- if (ichComment < 0) {
- ichComment = strSyn.indexOf("//", ichPos);
- while (ichComment >= 0) {
- if (ichComment > ichMatch) {
- ichComment = -1;
- break;
- }
- var ichEnd = strSyn.indexOf("\n", ichComment);
- if (ichEnd < 0 || ichEnd > ichMatch)
- break;
- ichComment = strSyn.indexOf("//", ichEnd);
- }
- }
- if (ichComment < 0)
- break;
- }
- ichMatch = strSyn.indexOf(strTerm, ichMatch + strTerm.length);
- }
- return ichMatch;
- }
-
- function isalnum(ch)
- {
- return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '_') || (ch == '-'));
- }
-
- function showTip(link)
- {
- bodyOnClick();
-
- var tip = document.all.reftip;
- if (!tip || !link)
- return;
-
- window.event.returnValue = false;
- window.event.cancelBubble = true;
-
- // Hide the tip if necessary and initialize its size.
- tip.style.visibility = "hidden";
- tip.style.pixelWidth = 260;
- tip.style.pixelHeight = 24;
-
- // Find the link target.
- var term = null;
- var def = null;
- var DLs = document.all.tags("DL");
- for (var iDL = 0; iDL < DLs.length; iDL++) {
- if (DLs[iDL].sourceIndex > link.sourceIndex) {
- var dl = DLs[iDL];
- var iMax = dl.children.length - 1;
- for (var iElem = 0; iElem < iMax; iElem++) {
- var dt = dl.children[iElem];
- if (dt.tagName == "DT" && dt.style.display != "none") {
- if (findTerm(dt.innerText, 0, link.innerText) >= 0) {
- var dd = dl.children[iElem + 1];
- if (dd.tagName == "DD") {
- term = dt;
- def = dd;
- }
- break;
- }
- }
- }
- break;
- }
- }
-
- if (def) {
- window.linkElement = link;
- window.linkTarget = term;
- tip.innerHTML = '<DL><DT>' + term.innerHTML + '</DT><DD>' + def.innerHTML + '</DD></DL>';
- window.setTimeout("moveTip()", 0);
- }
- }
-
- function jumpParam()
- {
- hideTip();
-
- window.linkTarget.scrollIntoView();
- document.body.scrollLeft = 0;
-
- flash(3);
- }
-
- function flash(c)
- {
- window.linkTarget.style.background = (c & 1) ? "#CCCCCC" : "";
- if (c)
- window.setTimeout("flash(" + (c-1) + ")", 200);
- }
-
- function moveTip()
- {
- var tip = document.all.reftip;
- var link = window.linkElement;
- if (!tip || !link)
- return; //error
-
- var w = tip.offsetWidth;
- var h = tip.offsetHeight;
-
- if (w > tip.style.pixelWidth) {
- tip.style.pixelWidth = w;
- window.setTimeout("moveTip()", 0);
- return;
- }
-
- var maxw = document.body.clientWidth;
- var maxh = document.body.clientHeight;
-
- if (h > maxh) {
- if (w < maxw) {
- w = w * 3 / 2;
- tip.style.pixelWidth = (w < maxw) ? w : maxw;
- window.setTimeout("moveTip()", 0);
- return;
- }
- }
-
- var x,y;
-
- var linkLeft = link.offsetLeft - document.body.scrollLeft;
- var linkRight = linkLeft + link.offsetWidth;
-
- var linkTop = link.offsetTop - document.body.scrollTop;
- var linkBottom = linkTop + link.offsetHeight;
-
- var cxMin = link.offsetWidth - 24;
- if (cxMin < 16)
- cxMin = 16;
-
- if (linkLeft + cxMin + w <= maxw) {
- x = maxw - w;
- if (x > linkRight + 8)
- x = linkRight + 8;
- y = maxh - h;
- if (y > linkTop)
- y = linkTop;
- }
- else if (linkBottom + h <= maxh) {
- x = maxw - w;
- if (x < 0)
- x = 0;
- y = linkBottom;
- }
- else if (w <= linkRight - cxMin) {
- x = linkLeft - w - 8;
- if (x < 0)
- x = 0;
- y = maxh - h;
- if (y > linkTop)
- y = linkTop;
- }
- else if (h <= linkTop) {
- x = maxw - w;
- if (x < 0)
- x = 0;
- y = linkTop - h;
- }
- else if (w >= maxw) {
- x = 0;
- y = linkBottom;
- }
- else {
- w = w * 3 / 2;
- tip.style.pixelWidth = (w < maxw) ? w : maxw;
- window.setTimeout("moveTip()", 0);
- return;
- }
-
- link.style.background = "#CCCCCC";
- tip.style.pixelLeft = x + document.body.scrollLeft;
- tip.style.pixelTop = y + document.body.scrollTop;
- tip.style.visibility = "visible";
- }
-
- function hideTip()
- {
- if (window.linkElement) {
- window.linkElement.style.background = "";
- window.linkElement = null;
- }
-
- var tip = document.all.reftip;
- if (tip) {
- tip.style.visibility = "hidden";
- tip.innerHTML = "";
- }
- }
-
- function beginsWith(s1, s2)
- {
- // Does s1 begin with s2?
- return s1.substring(0, s2.length) == s2;
- }
-
- /*
- * See Also popups
- */
- function initSeeAlso()
- {
- // Localizable strings.
- var L_See_Also = "See Also";
- var L_Requirements = "Requirements";
- var L_QuickInfo = "QuickInfo";
-
- var hdr = document.all.hdr;
- if (!hdr)
- return;
-
- var divS = new String;
- var divR = new String;
- var heads = document.all.tags("H4");
- if (heads) {
- for (var i = 0; i < heads.length; i++) {
- var head = heads[i];
- var txt = head.innerText;
- if (beginsWith(txt, L_See_Also)) {
- divS += head.outerHTML;
- var next = getNext(head);
- while (next && !next.tagName.match(/^(H[1-4])|(DIV)$/)) {
- divS += next.outerHTML;
- next = getNext(next);
- }
- }
- else if (beginsWith(txt, L_Requirements) || beginsWith(txt, L_QuickInfo)) {
- divR += head.outerHTML;
- var next = getNext(head);
- var isValid = true;
- while (isValid){
- if (next && !next.tagName.match(/^(H[1-4])$/)){
- if (next.tagName == "DIV" && next.outerHTML.indexOf("tablediv")==-1)
- isValid = false;
- if (isValid){
- divR += next.outerHTML;
- next = getNext(next);
- }
- }
- else
- isValid = false;
- }
- }
- }
- }
-
- var pos = getNext(hdr.parentElement);
- if (pos) {
- if (divR != "") {
- divR = '<DIV ID=rpop CLASS=sapop>' + divR + '</DIV>';
- var td = hdr.insertCell(0);
- if (td) {
- td.className = "button1";
- td.onclick = showRequirements;
- td.innerHTML = '<IMG SRC="' + baseUrl + 'Requirements.gif' + '" ALT="' + L_Requirements + '" BORDER=0>';
- if (advanced)
- document.body.insertAdjacentHTML('AfterBegin', divR);
- else
- document.body.insertAdjacentHTML('BeforeEnd', divR);
- }
- }
- if (divS != "") {
- divS = '<DIV ID=sapop CLASS=sapop>' + divS + '</DIV>';
- var td = hdr.insertCell(0);
- if (td) {
- td.className = "button1";
- td.onclick = showSeeAlso;
- td.innerHTML = '<IMG SRC="' + baseUrl + 'SeeAlso.gif' + '" ALT="' + L_See_Also + '" BORDER=0>';
- if (advanced)
- document.body.insertAdjacentHTML('AfterBegin', divS);
- else
- document.body.insertAdjacentHTML('BeforeEnd', divS);
- }
- }
- }
- }
-
- function showSeeAlso()
- {
- bodyOnClick();
-
- window.event.returnValue = false;
- window.event.cancelBubble = true;
-
- var div = document.all.sapop;
- var lnk = window.event.srcElement;
-
- if (div && lnk) {
- div.style.pixelTop = lnk.offsetTop + lnk.offsetHeight;
- div.style.visibility = "visible";
- }
- }
-
- function showRequirements()
- {
- bodyOnClick();
-
- window.event.returnValue = false;
- window.event.cancelBubble = true;
-
- var div = document.all.rpop;
- var lnk = window.event.srcElement;
-
- if (div && lnk) {
- div.style.pixelTop = lnk.offsetTop + lnk.offsetHeight;
- div.style.visibility = "visible";
- }
- }
-
- function hideSeeAlso()
- {
- var div = document.all.sapop;
- if (div)
- div.style.visibility = "hidden";
-
- var div = document.all.rpop;
- if (div)
- div.style.visibility = "hidden";
- }
- //FIND AREA TO EXPAND/COLLAPSE
- function GrabtheExpandDiv(e){
- var theExpandDiv;
- for (var a = 0; a < 5; a++){
- var theTag = e.sourceIndex + e.children.length + a;
- theExpandDiv= document.all(theTag);
- if ((((theExpandDiv.tagName == 'DIV') || (theExpandDiv.tagName == 'SPAN')) && ((theExpandDiv.className.toLowerCase() == 'expand') || (theExpandDiv.className.toLowerCase() == 'expand2'))) || theTag == document.all.length){break;}}
- return theExpandDiv;}
-
- //ROLLOVERS'S AND EXPAND/COLLAPSE GET IMAGE
- function getImage(){
-
- //DETERMINES IF A CLICK IS ON AN HREF TAG
- for (var a = 0; a < 5; a++){
- if ((e.tagName != 'A') && (e.parentElement != null)){e = e.parentElement;}
- var elemImg = e;
- if(elemImg.tagName == 'A'){elemImg = e.all.tags('IMG')(0); break;}}
- return elemImg;}
-
- //DO EXPAND/COLLAPSE
- function callExpand(){
- e = window.event.srcElement;
-
- //PREVENTS NAVIGATION ON HREF TAGS
- event.returnValue = false;
-
- //FIND THE EXPAND/COLLAPSE PORTION AND ASCERTAIN BLOCK VS NONE
- var theDiv = GrabtheExpandDiv(e);
-
- //THIS PART WRITES THE PROPER IMAGE BESIDE THE TEXT
- if (theDiv.style.display == 'block'){
- var theImg = getImage(e);
- theImg.src = "coe.gif";
- theDiv.style.display = "none";}
- else {
- var theImg = getImage(e);
- theImg.src = "coc.gif";
- theDiv.style.display = "block";}
- return;}
-
- function callExpandAll(){
- e = window.event.srcElement;
- //PREVENTS NAVIGATION ON HREF TAGS
- event.returnValue = false;
-
- //Expand or Collapse?
- if (e.innerHTML.indexOf("Expand All") != -1){eOrC="block"}else{eOrC="none"}
- if (eOrC=="block"){
- e.innerHTML="<IMG CLASS='ExPand' SRC='coc.gif' HEIGHT='9' WIDTH='12' ALT='Expand/Collapse' BORDER='0'>Collapse All";}
- else{
- e.innerHTML="<IMG CLASS='ExPand' SRC='coe.gif' HEIGHT='9' WIDTH='12' ALT='Expand/Collapse' BORDER='0'>Expand All";}
- for (var a = 0; a < document.all.length; a++){
- e=document.all[a];
-
- if (e.id.indexOf('ExPand') != -1){
- if (e.id.indexOf('ExPandAll') == -1){
-
- var theDiv = GrabtheExpandDiv(e);
- if (eOrC == 'none'){
- theImg = getImage(e);
- theImg.src = "coe.gif";
- theDiv.style.display = eOrC;}
- else {
- theImg = getImage(e);
- theImg.src = "coc.gif";
- theDiv.style.display = eOrC;}
- }
- }
- }
- return;}
-
- function resizeBan(){
- //resizes nonscrolling banner
-
- var obanner= document.all.item("nsbanner");
- var oText= document.all.item("nstext");
- var obannerrow1 = document.all.item("bannerrow1");
- var obannerrow2 = document.all.item("bannerrow2");
- if (obannerrow1 != null && obannerrow2 != null){
- var iScrollWidth = bodyID.scrollWidth;
- bannerrow1.style.marginRight = 0 - iScrollWidth;
- bannerrow2.style.marginRight = 0 - iScrollWidth;
- }
- if (oText ==null) return;
- if (obanner != null){
- //Uncomment the following 4 lines for slingshot
- //if (document.all.tags('iframe') !=null){
- // document.body.scroll = "yes"
- // return;
- //}
- document.body.scroll = "no"
- document.all.nstext.style.overflow= "auto";
- document.all.nsbanner.style.width= document.body.offsetWidth-2;
- document.all.nstext.style.width= document.body.offsetWidth-4;
- document.all.nstext.style.top=0;
- //The following line of code is temporary for slingshot support
- //Remove it before ship
- // if (document.all.tags('iframe') !=null) return;
- //end temporary code
- if (document.body.offsetHeight > document.all.nsbanner.offsetHeight)
- document.all.nstext.style.height= document.body.offsetHeight - (document.all.nsbanner.offsetHeight+4)
- else document.all.nstext.style.height=0
- }
- }
-
-
- function set_to_print(){
- //breaks out of divs to print
-
- var i;
-
- if (window.text)document.all.text.style.height = "auto";
-
- for (i=0; i < document.all.length; i++){
- if (document.all[i].tagName == "BODY") {
- document.all[i].scroll = "yes";
- }
- if (document.all[i].id == "nsbanner") {
- document.all[i].style.margin = "0px 0px 0px 0px";
- }
- if (document.all[i].id == "nstext") {
- document.all[i].style.overflow = "visible";
- document.all[i].style.top = "5px";
- document.all[i].style.width = "100%";
- document.all[i].style.padding = "0px 10px 0px 30px";
- }
- if (document.all[i].tagName == "A") {
- document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
- }
- }
- }
-
-
- function reset_form(){
- //returns to the div nonscrolling region after print
-
- document.location.reload();
-
- }
-
- function writefeedbacklink(){
- //writes feedback link
- msdnid = arguments[0];
- contextid = arguments[1];
- topictitle = arguments[2];
- href = "http://testbetaweb2/vstudio/beta/feedback.asp?feedback=doc&msdnid="+msdnid+"&contextid="+contextid+"&topictitle="+topictitle;
- document.writeln("<a href="+href+">"+L_FeedbackLink+"</a>");
- }
-
- function writemessagelink(){
- //Writes jump to PSS web site redirector
- //code tbd
- //Use L_MessageLink variable from Localization Variables located at top of script.
- msdnid = arguments[0];
- href = "http://www.microsoft.com/contentredirect.asp?prd=vs&pver=7.0&id="+msdnid;
- document.writeln("<a href="+href+">"+L_MessageLink+"</a>");
-
- }
-
- function writemailtolink(){
- //writes feedback link
- emailalias = arguments[0];
- contextid = arguments[1];
- topictitle = arguments[2];
-
- href = "mailto:"+emailalias+"?subject=Feedback%20on%20topic%20-%20"+topictitle+",%20URL%20-%20"+contextid;
- alert(href);
- document.writeln("<a href="+href+">Internal Feedback Link</a>");
- }
-