        var targetConfirmationpage = null;
        function openDisclaimer() {
            // targetConfirmationpage = targetDownload;
            confirmSubmodal('/maonline/pages/confirmDownload.jsp', 'Confirmation');
            return false;
        }

        var OnLoadEvents = new function() {};
        var OnClickEvents = new function() {};

        var pageIsLoaded = false;
        function pageInit() {
           // do nothing
            pageChronometer.DISPLAY_WINDOW_STATUS = true;
            if (OnLoadEvents != null) {
                for (var i in OnLoadEvents) {
                    eval(OnLoadEvents[i]);
                }
            }
//            initjsDOMenu();
           initDropdownMenus();
            document.onclick = pageLeftClickHandler;
            window.onscroll = pageScrollHandler;
            document.onkeypress = pageKeypressHandler;
            window.onresize = pageResizeHandler;
            var preloadImgArray = new Array(
                "images/x.gif", "images/malogo.gif", "images/imyMAnav.gif",
                "images/searchButton.gif"
            );
            preloadImages(preloadImgArray);
            pageIsLoaded = true;
        }
        var activateJsDOMenu = false;
        var showResourcesExist = false;
        var evaluateHideProductResourcesDropdown = true;
        function pageLeftClickHandler(e) {
            if (pageIsLoaded) {
                var targ = getEventTarget(e);
                var escapePageClick = false;
                var evaluateSelectShield = false;
                evaluateHideProductResourcesDropdown = true;
                if (targ) {
                    /*
                        # nodeName, which contains the name of an element (e.g., table, a, meta, img)
                        # nodeValue, which holds the containing text of a text node
                        # nodeType, a number indicating one of the 12 node types. Text nodes share number 3.
                        ID    Node type             nodeName returns 	     nodeValue returns
                        9     Document              #document              null
                        11    DocumentFragment      #document fragment     null
                        10    DocumentType          doctype name           null
                        5     EntityReference       entity reference name  null
                        1     Element               element name           null
                        2     Attr 	                attribute name         attribute value
                        7     ProcessingInstruction target                 content of node
                        8     Comment               #comment               comment text
                        3     Text                  #text                  content of node
                        4     CDATASection          #cdata-section         content of node
                        6     Entity                entity name            null
                        12    Notation              notation name          null
                        # parentNode, a reference to the parent node
                        # firstChild, a reference to the first child node of a node. Corresponds to childNodes[0]
                        # childNodes, a list of nodes containing all child nodes in sequential order. A nodelist is actually its own object; however, current DOM implementations allow you to access a nodelist like an array with JavaScript.
                        var doc_root = document.documentElement;
                        var parent = foo_element.parentNode;
                        var grandpa = parent.parentNode;
                        var the_bunch = parent.childNodes;
                        var Jon_Boy = parent.childNodes[0];
                        document.getElementsByTagName("#text");
                     */
                    // climb tree to see if this node is a descendent of a clickDataType
                    function clickDataTypeTraverse(node) {
                        if (node && node.nodeType == 1) {  // element type
                            if (node.getAttribute('clickDataType')) {
                                escapePageClick = true;
                                var clickDataType = node.getAttribute('clickDataType');
                                if (clickDataType == 'menuNavClick') {
                                    var menuTargetURI = '';
                                    function traverse(node, node_type, node_name) {
                                        if (node.nodeType == node_type) {  // element type
                                            if (node.nodeName == node_name) {
                                                // input element
                                                menuTargetURI = node.getAttribute('href');
                                            }
                                        }
                                        if (node.childNodes != null) {
                                            for ( var i = 0; i < node.childNodes.length; i++) {
                                                traverse(node.childNodes.item(i), node_type, node_name);
                                            }
                                        }
                                    }
                                    traverse(node, 1, 'A');
                                    if (menuTargetURI != '') {
                                        window.location=menuTargetURI;
                                    }
                                } else if (clickDataType == 'tabClick') {
                                    // do nothing
                                } else if (clickDataType == 'toolClick') {
                                    // do nothing
                                } else if (clickDataType == 'dropdownPanelClick') {
                                    // if click in an area with a dropdown then handle ie select tag layer bugs
                                    escapePageClick = false;
                                    evaluateSelectShield = true;
                                } else if (clickDataType == 'productResourcesDropdown') {
                                    // do nothing
                                    evaluateHideProductResourcesDropdown = false;
                                } else {
                                    // do nothing
                                }
                                if (escapePageClick) {
                                    // hide all jsDOMenu items
//                                    hideAllPopupMenuItems();
                                }
                            } else {
                                clickDataTypeTraverse(node.parentNode);
                            }
                        }
                    }
                    clickDataTypeTraverse(targ);
                }
                if (!escapePageClick) {
                    if (activateJsDOMenu) {
//                        leftClickHandler(e); // for jsDOMenu
                        if (evaluateSelectShield) {
//                            menuMaskFrame('DOMenu1'); // for jsDOMenu
                        }
                    }
                }
                if (OnClickEvents != null) {
                    for (var i in OnClickEvents) {
                        eval(OnClickEvents[i]);
                    }
                }
            }
        }
        function pageScrollHandler(e) {
//            var betaLayer = document.getElementById("beta_label");
//            if (betaLayer) {
//                floatBeta();
//            }
        }
        function pageResizeHandler(e) {
//            var betaLayer = document.getElementById("beta_label");
//            if (betaLayer) {
//                floatBeta();
//            }
        }
        function floatBeta(){
            var betaLayer = document.getElementById("beta_label");
            if (betaLayer) {
				var leftSpace = getViewportSize('x', false) + getScrollSize('x') - pxToInt(betaLayer.style.width);
				var topSpace = getViewportSize('y', false) + getScrollSize('y') - pxToInt(betaLayer.style.height);
				betaLayer.style.left = leftSpace + "px";
				betaLayer.style.top = topSpace + "px";
			}
        }
        function pageKeypressHandler(e) {
            // check to see if a menu nav click
            if (getKeyEventCharacterCode(e, 'decimal') == 27) {
//                mainMenu.toggleVisibility();
//                mainMenu.setY('0');
//                mainMenu.setX('0');
            }
        }


		function initDropdownMenus() {
            var horizontalOffsetPixels = 4;
            var verticalOffsetPixels = 11;
            if (ua.ie) {
                verticalOffsetPixels = 12;
            } else if (ua.konqueror) {
                verticalOffsetPixels = 21;
            }
//            var homeNavBeaconImg = getImageCoordinates("homeNavBeacon", horizontalOffsetPixels, verticalOffsetPixels);

            var knowledgeCenterDropdownObj = document.getElementById("MenuLayer414");
            var knowledgeCenterNavBeaconImg = getImageCoordinates("414NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (knowledgeCenterDropdownObj) {
                knowledgeCenterDropdownObj.style.left = knowledgeCenterNavBeaconImg.x + 'px';
                knowledgeCenterDropdownObj.style.top = knowledgeCenterNavBeaconImg.y + 'px';
            }
            var productsDropdownObj = document.getElementById("MenuLayer416");
            var productsNavBeaconImg = getImageCoordinates("416NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (productsDropdownObj) {
                productsDropdownObj.style.left = productsNavBeaconImg.x + 'px';
                productsDropdownObj.style.top = productsNavBeaconImg.y + 'px';
            }
            var researchDropdownObj = document.getElementById("MenuLayer418");
            var researchNavBeaconImg = getImageCoordinates("418NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (researchDropdownObj) {
                researchDropdownObj.style.left = researchNavBeaconImg.x + 'px';
                researchDropdownObj.style.top = researchNavBeaconImg.y + 'px';
            }
            var toolsDropdownObj = document.getElementById("MenuLayer420");
            var toolsNavBeaconImg = getImageCoordinates("420NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (toolsDropdownObj) {
                toolsDropdownObj.style.left = toolsNavBeaconImg.x + 'px';
                toolsDropdownObj.style.top = toolsNavBeaconImg.y + 'px';
            }
            var newsDropdownObj = document.getElementById("MenuLayer422");
            var newsNavBeaconImg = getImageCoordinates("422NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (newsDropdownObj) {
                newsDropdownObj.style.left = newsNavBeaconImg.x + 'px';
                newsDropdownObj.style.top = newsNavBeaconImg.y + 'px';
            }
            var eventsDropdownObj = document.getElementById("MenuLayer424");
            var eventsNavBeaconImg = getImageCoordinates("424NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (eventsDropdownObj) {
                eventsDropdownObj.style.left = eventsNavBeaconImg.x + 'px';
                eventsDropdownObj.style.top = eventsNavBeaconImg.y + 'px';
            }
            var communityDropdownObj = document.getElementById("MenuLayer426");
            var communityNavBeaconImg = getImageCoordinates("426NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (communityDropdownObj) {
                communityDropdownObj.style.left = communityNavBeaconImg.x + 'px';
                communityDropdownObj.style.top = communityNavBeaconImg.y + 'px';
            }
            var magazineDropdownObj = document.getElementById("MenuLayer26");
            var magazineNavBeaconImg = getImageCoordinates("26NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (magazineDropdownObj) {
                magazineDropdownObj.style.left = magazineNavBeaconImg.x + 'px';
                magazineDropdownObj.style.top = magazineNavBeaconImg.y + 'px';
            }
            var myMANavBeaconImg = getImageCoordinates("myMANavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
        }

        function initDropdownMenus_Old() {
            var horizontalOffsetPixels = 4;
            var verticalOffsetPixels = 11;
            if (ua.ie) {
                verticalOffsetPixels = 12;
            } else if (ua.konqueror) {
                verticalOffsetPixels = 21;
            }
//            var homeNavBeaconImg = getImageCoordinates("homeNavBeacon", horizontalOffsetPixels, verticalOffsetPixels);

            var knowledgeCenterDropdownObj = document.getElementById("MenuLayer198");
            var knowledgeCenterNavBeaconImg = getImageCoordinates("198NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (knowledgeCenterDropdownObj) {
                knowledgeCenterDropdownObj.style.left = knowledgeCenterNavBeaconImg.x + 'px';
                knowledgeCenterDropdownObj.style.top = knowledgeCenterNavBeaconImg.y + 'px';
            }
            var productsDropdownObj = document.getElementById("MenuLayer200");
            var productsNavBeaconImg = getImageCoordinates("200NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (productsDropdownObj) {
                productsDropdownObj.style.left = productsNavBeaconImg.x + 'px';
                productsDropdownObj.style.top = productsNavBeaconImg.y + 'px';
            }
            var researchDropdownObj = document.getElementById("MenuLayer202");
            var researchNavBeaconImg = getImageCoordinates("202NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (researchDropdownObj) {
                researchDropdownObj.style.left = researchNavBeaconImg.x + 'px';
                researchDropdownObj.style.top = researchNavBeaconImg.y + 'px';
            }
            var toolsDropdownObj = document.getElementById("MenuLayer204");
            var toolsNavBeaconImg = getImageCoordinates("204NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (toolsDropdownObj) {
                toolsDropdownObj.style.left = toolsNavBeaconImg.x + 'px';
                toolsDropdownObj.style.top = toolsNavBeaconImg.y + 'px';
            }
            var newsDropdownObj = document.getElementById("MenuLayer206");
            var newsNavBeaconImg = getImageCoordinates("206NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (newsDropdownObj) {
                newsDropdownObj.style.left = newsNavBeaconImg.x + 'px';
                newsDropdownObj.style.top = newsNavBeaconImg.y + 'px';
            }
            var eventsDropdownObj = document.getElementById("MenuLayer208");
            var eventsNavBeaconImg = getImageCoordinates("208NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (eventsDropdownObj) {
                eventsDropdownObj.style.left = eventsNavBeaconImg.x + 'px';
                eventsDropdownObj.style.top = eventsNavBeaconImg.y + 'px';
            }
            var communityDropdownObj = document.getElementById("MenuLayer210");
            var communityNavBeaconImg = getImageCoordinates("210NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (communityDropdownObj) {
                communityDropdownObj.style.left = communityNavBeaconImg.x + 'px';
                communityDropdownObj.style.top = communityNavBeaconImg.y + 'px';
            }
            var magazineDropdownObj = document.getElementById("MenuLayer26");
            var magazineNavBeaconImg = getImageCoordinates("26NavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
            if (magazineDropdownObj) {
                magazineDropdownObj.style.left = magazineNavBeaconImg.x + 'px';
                magazineDropdownObj.style.top = magazineNavBeaconImg.y + 'px';
            }
            var myMANavBeaconImg = getImageCoordinates("myMANavBeacon", horizontalOffsetPixels, verticalOffsetPixels);
        }
        
        var currentMouseOverPosition = '';
        function showDropdownMenu(dropdownMenuObjId) {        
            if (pageIsLoaded) {
            
                currentMouseOverPosition = dropdownMenuObjId;
                var dropdownMenuObj = document.getElementById(dropdownMenuObjId);
                if (dropdownMenuObj.style.visibility == "hidden") {
                   // hideAllDropdowns();
                   
                    dropdownMenuObj.style.visibility = "";
                }
            }
        }
        var hideDropdownTimeout = 300;// in milliseconds  to wait before hiding dropdown after leaving focus
        function hideDropdownMenu(dropdownMenuObjId) {
            currentMouseOverPosition = '';
            var tmpNextFunction = "hideDropdownMenuRequest('" + dropdownMenuObjId + "')";
            setTimeout(tmpNextFunction, hideDropdownTimeout)
        }
        function hideDropdownMenuRequest (dropdownMenuObjId) {
            if (currentMouseOverPosition != dropdownMenuObjId) {
                var dropdownMenuObj = document.getElementById(dropdownMenuObjId);
                dropdownMenuObj.style.visibility = "hidden";
            }
        }
//        function hideAllDropdowns(){
//            document.getElementById("knowledgeCenterMenuLayer").style.visibility = "hidden";
//            document.getElementById("productMenuLayer").style.visibility = "hidden";
//            document.getElementById("researchMenuLayer").style.visibility = "hidden";
//            document.getElementById("toolsMenuLayer").style.visibility = "hidden";
//            document.getElementById("newsMenuLayer").style.visibility = "hidden";
//            document.getElementById("newsMenuLayer").style.visibility = "hidden";
//            document.getElementById("magazineMenuLayer").style.visibility = "hidden";
//            document.getElementById("communityMenuLayer").style.visibility = "hidden";
//        }


        function hideSelectDropdowns( oPopup ) {
            var arr = document.getElementsByTagName("SELECT");

            self._dropdowns_ = new Array( arr.length );
            self._dropdowns_state_ = new Array( arr.length );
            self._dropdowns_enabled_ = new Array( arr.length );
            for( var i=0,n=arr.length; i < n; i++ ) {
                self._dropdowns_[ i ] = arr[ i ];
                self._dropdowns_state_[ i ] = new String( arr[ i ].style.visibility );
                self._dropdowns_enabled_[ i ] = new String( arr[ i ].disabled );
                var overlap = ( self.isOverlapped ? self.isOverlapped( arr[ i ], oPopup ) : true );
                arr[ i ].style.visibility = ( overlap ? "hidden" : "visible" );
                arr[ i ].disabled = true;
                arr[ i ].style.cursor="wait";
            }
        }
        function restoreSelectDropdowns() {
            self._dropdowns_ = ( self._dropdowns_ ) || document.getElementsByTagName("SELECT");
            self._dropdowns_state_ = ( self._dropdowns_state_ ) || new Array( self._dropdowns_.length );
            for( var i=0, n=self._dropdowns_.length; i < n; i++ ) {
                self._dropdowns_[ i ].style.visibility = self._dropdowns_state_[ i ];
                self._dropdowns_[ i ].disabled = ( "true" == self._dropdowns_enabled_[ i ] );
                self._dropdowns_[ i ].style.cursor="default";
            }
        }
        function menuMaskFrame(handlerId) {
            var handlerObj = document.getElementById(handlerId);
            if (handlerObj) {
                if (gHideSelects == true) {
                    var showStateDisplay = handlerObj.style.display.toLowerCase();
                    var showStateVisibility = handlerObj.style.visibility.toLowerCase();
                    var showState = true;
                    if (showStateVisibility.indexOf('hidden') > -1 || showStateDisplay.indexOf('none') > -1) {
                        showState = false;
                    }
                    if (!showState) {
                        restoreSelectDropdowns();
                    } else {
                        hideSelectDropdowns( handlerObj );
                    }
                }
            }
        }

        // hitbox patches
        function hbxStrip(a) {
             a = a.split("|").join("");
             a = a.split("&").join("");
             a = a.split("'").join("");
             a = a.split("#").join("");
             a = a.split("$").join("");
             a = a.split("%").join("");
             a = a.split("^").join("");
             a = a.split("*").join("");
             a = a.split(":").join("");
             a = a.split("~").join("");
             a = a.split(";").join("");
             a = a.split(" ").join("+");
             return a;
        }
		// foldover javascript controls
		function activateTheFoldover() {
			var obj1 = document.getElementById("foldoverOpen");
			var obj2 = document.getElementById("foldoverClosed1");
			var obj3 = document.getElementById("foldoverClosed2");
			obj1.style.visibility = "visible";
			obj1.style.zIndex = "12";
			obj2.style.visibility = "hidden";
			obj3.style.visibility = "hidden";
		}
		
		function deactivateTheFoldover() {
			var obj1 = document.getElementById("foldoverOpen");
			var obj2 = document.getElementById("foldoverClosed1");
			var obj3 = document.getElementById("foldoverClosed2");
			obj1.style.visibility = "hidden";
			obj1.style.zIndex = "-12";
			obj2.style.visibility = "visible";
			obj3.style.visibility = "visible";
		}
		
		function foldover_DoFSCommand(command, args) {
			deactivateTheFoldover();
		}

        function checkCookieDisabled() {
            var tmpcookie = new Date();
            chkcookie = (tmpcookie.getTime() + '');
            document.cookie = "chkcookie=" + chkcookie + "; path=/";
            if (document.cookie.indexOf(chkcookie,0) < 0) {
                document.getElementById("cookieAlertMsg").style.display='';
            } else {
                // do nothing, it exists
            }
        }


        // global variables
        var thisIsAComparePage = false;
        var thisIsANewsletterPage = false;
        var thisIsANewsPage = false;
        var thisIsAnArticlePage = false;
        var thisIsAResourcesPage = false;

        // global tooltips
        //var tooltip_myma = new TooltipKeyword("", "Update your profile, edit your product lists, manage your newsletter subscriptions.");
        //var tooltip_awards = new TooltipKeyword("", "Nominate your project for inclusion in Managing Automation's Progressive Manufacturing 50 Awards Program &ndash; and get recognized for your company's extraordinary business accomplishments.");
        //var tooltip_search = new TooltipKeyword("", "Search Managing Automation for news, articles, and product information.");
        //var tooltip_vendor_central = new TooltipKeyword("", "Visit the MA Product Dashboard to list your products, update your company information, and more.");
        //var tooltip_subscribe = new TooltipKeyword("", "Receive <i>Managing Automation</i> Magazine. Available in print or digital.");
//        var tooltip_signin = new TooltipKeyword("", "Sign in for complete access to articles, webcasts, tools, and other resources.");
//        var tooltip_signout = new TooltipKeyword("", "Sign-out/Log-off.");
 
        //var tooltip_feedback = new TooltipKeyword("", "Let us know what you think!  Did our comparison tool meet your expectations?  How can it be improved?  You opinion matters to us.");

		//START - Added or Modified for RFI Express 

		//var tooltip_RFI_Express = new TooltipKeyword("", "Submit a request for information to this vendor.");	

		//END - Added or Modified for RFI Express 
		//Start - MA - Added or Modified for RFI Express

            //var tooltip_Home_Brows = new TooltipKeyword("", "View directory listings by product or supplier.");
            //var tooltip_Home_Compare = new TooltipKeyword("", "Choose from Enterprise Software, RFID, Industrial Computers and Networks.");
            //var tooltip_Home_Match = new TooltipKeyword("", "Rank and weight your features and functions.");

        //End - MA added for RFI Express




		
		
function WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit) {
    this.eventTarget = eventTarget;
    this.eventArgument = eventArgument;
    this.validation = validation;
    this.validationGroup = validationGroup;
    this.actionUrl = actionUrl;
    this.trackFocus = trackFocus;
    this.clientSubmit = clientSubmit;
}
function WebForm_DoPostBackWithOptions(options) {
    var validationResult = true;
    if (options.validation) {
        if (typeof(Page_ClientValidate) == 'function') {
            validationResult = Page_ClientValidate(options.validationGroup);
        }
    }
    if (validationResult) {
        if ((typeof(options.actionUrl) != "undefined") && (options.actionUrl != null) && (options.actionUrl.length > 0)) {
            theForm.action = options.actionUrl;
        }
        if (options.trackFocus) {
            var lastFocus = theForm.elements["__LASTFOCUS"];
            if ((typeof(lastFocus) != "undefined") && (lastFocus != null)) {
                if (typeof(document.activeElement) == "undefined") {
                    lastFocus.value = options.eventTarget;
                }
                else {
                    var active = document.activeElement;
                    if ((typeof(active) != "undefined") && (active != null)) {
                        if ((typeof(active.id) != "undefined") && (active.id != null) && (active.id.length > 0)) {
                            lastFocus.value = active.id;
                        }
                        else if (typeof(active.name) != "undefined") {
                            lastFocus.value = active.name;
                        }
                    }
                }
            }
        }
    }
    if (options.clientSubmit) {
        __doPostBack(options.eventTarget, options.eventArgument);
    }
}
var __pendingCallbacks = new Array();
var __synchronousCallBackIndex = -1;
function WebForm_DoCallback(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync) {
    var postData = __theFormPostData +
                "__CALLBACKID=" + WebForm_EncodeCallback(eventTarget) +
                "&__CALLBACKPARAM=" + WebForm_EncodeCallback(eventArgument);
    if (theForm["__EVENTVALIDATION"]) {
        postData += "&__EVENTVALIDATION=" + WebForm_EncodeCallback(theForm["__EVENTVALIDATION"].value);
    }
    var xmlRequest,e;
    try {
        xmlRequest = new XMLHttpRequest();
    }
    catch(e) {
        try {
            xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(e) {
        }
    }
    var setRequestHeaderMethodExists = true;
    try {
        setRequestHeaderMethodExists = (xmlRequest && xmlRequest.setRequestHeader);
    }
    catch(e) {}
    var callback = new Object();
    callback.eventCallback = eventCallback;
    callback.context = context;
    callback.errorCallback = errorCallback;
    callback.async = useAsync;
    var callbackIndex = WebForm_FillFirstAvailableSlot(__pendingCallbacks, callback);
    if (!useAsync) {
        if (__synchronousCallBackIndex != -1) {
            __pendingCallbacks[__synchronousCallBackIndex] = null;
        }
        __synchronousCallBackIndex = callbackIndex;
    }
    if (setRequestHeaderMethodExists) {
        xmlRequest.onreadystatechange = WebForm_CallbackComplete;
        callback.xmlRequest = xmlRequest;
        xmlRequest.open("POST", theForm.action, true);
        xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xmlRequest.send(postData);
        return;
    }
    callback.xmlRequest = new Object();
    var callbackFrameID = "__CALLBACKFRAME" + callbackIndex;
    var xmlRequestFrame = document.frames[callbackFrameID];
    if (!xmlRequestFrame) {
        xmlRequestFrame = document.createElement("IFRAME");
        xmlRequestFrame.width = "1";
        xmlRequestFrame.height = "1";
        xmlRequestFrame.frameBorder = "0";
        xmlRequestFrame.id = callbackFrameID;
        xmlRequestFrame.name = callbackFrameID;
        xmlRequestFrame.style.position = "absolute";
        xmlRequestFrame.style.top = "-100px"
        xmlRequestFrame.style.left = "-100px";
        try {
            if (callBackFrameUrl) {
                xmlRequestFrame.src = callBackFrameUrl;
            }
        }
        catch(e) {}
        document.body.appendChild(xmlRequestFrame);
    }
    var interval = window.setInterval(function() {
        xmlRequestFrame = document.frames[callbackFrameID];
        if (xmlRequestFrame && xmlRequestFrame.document) {
            window.clearInterval(interval);
            xmlRequestFrame.document.write("");
            xmlRequestFrame.document.close();
            xmlRequestFrame.document.write('<html><body><form method="post"><input type="hidden" name="__CALLBACKLOADSCRIPT" value="t"></form></body></html>');
            xmlRequestFrame.document.close();
            xmlRequestFrame.document.forms[0].action = theForm.action;
            var count = __theFormPostCollection.length;
            var element;
            for (var i = 0; i < count; i++) {
                element = __theFormPostCollection[i];
                if (element) {
                    var fieldElement = xmlRequestFrame.document.createElement("INPUT");
                    fieldElement.type = "hidden";
                    fieldElement.name = element.name;
                    fieldElement.value = element.value;
                    xmlRequestFrame.document.forms[0].appendChild(fieldElement);
                }
            }
            var callbackIdFieldElement = xmlRequestFrame.document.createElement("INPUT");
            callbackIdFieldElement.type = "hidden";
            callbackIdFieldElement.name = "__CALLBACKID";
            callbackIdFieldElement.value = eventTarget;
            xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement);
            var callbackParamFieldElement = xmlRequestFrame.document.createElement("INPUT");
            callbackParamFieldElement.type = "hidden";
            callbackParamFieldElement.name = "__CALLBACKPARAM";
            callbackParamFieldElement.value = eventArgument;
            xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement);
            if (theForm["__EVENTVALIDATION"]) {
                var callbackValidationFieldElement = xmlRequestFrame.document.createElement("INPUT");
                callbackValidationFieldElement.type = "hidden";
                callbackValidationFieldElement.name = "__EVENTVALIDATION";
                callbackValidationFieldElement.value = theForm["__EVENTVALIDATION"].value;
                xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement);
            }
            var callbackIndexFieldElement = xmlRequestFrame.document.createElement("INPUT");
            callbackIndexFieldElement.type = "hidden";
            callbackIndexFieldElement.name = "__CALLBACKINDEX";
            callbackIndexFieldElement.value = callbackIndex;
            xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement);
            xmlRequestFrame.document.forms[0].submit();
        }
    }, 10);
}
function WebForm_CallbackComplete() {
    for (i = 0; i < __pendingCallbacks.length; i++) {
        callbackObject = __pendingCallbacks[i];
        if (callbackObject && callbackObject.xmlRequest && (callbackObject.xmlRequest.readyState == 4)) {
            WebForm_ExecuteCallback(callbackObject);
            if (!__pendingCallbacks[i].async) {
                __synchronousCallBackIndex = -1;
            }
            __pendingCallbacks[i] = null;
            var callbackFrameID = "__CALLBACKFRAME" + i;
            var xmlRequestFrame = document.getElementById(callbackFrameID);
            if (xmlRequestFrame) {
                xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);
            }
        }
    }
}
function WebForm_ExecuteCallback(callbackObject) {
    var response = callbackObject.xmlRequest.responseText;
    if (response.charAt(0) == "s") {
        if ((typeof(callbackObject.eventCallback) != "undefined") && (callbackObject.eventCallback != null)) {
            callbackObject.eventCallback(response.substring(1), callbackObject.context);
        }
    }
    else if (response.charAt(0) == "e") {
        if ((typeof(callbackObject.errorCallback) != "undefined") && (callbackObject.errorCallback != null)) {
            callbackObject.errorCallback(response.substring(1), callbackObject.context);
        }
    }
    else {
        var separatorIndex = response.indexOf("|");
        if (separatorIndex != -1) {
            var validationFieldLength = parseInt(response.substring(0, separatorIndex));
            if (!isNaN(validationFieldLength)) {
                var validationField = response.substring(separatorIndex + 1, separatorIndex + validationFieldLength + 1);
                if (validationField != "") {
                    var validationFieldElement = theForm["__EVENTVALIDATION"];
                    if (!validationFieldElement) {
                        validationFieldElement = document.createElement("INPUT");
                        validationFieldElement.type = "hidden";
                        validationFieldElement.name = "__EVENTVALIDATION";
                        theForm.appendChild(validationFieldElement);
                    }
                    validationFieldElement.value = validationField;
                }
                if ((typeof(callbackObject.eventCallback) != "undefined") && (callbackObject.eventCallback != null)) {
                    callbackObject.eventCallback(response.substring(separatorIndex + validationFieldLength + 1), callbackObject.context);
                }
            }
        }
    }
}
function WebForm_FillFirstAvailableSlot(array, element) {
    var i;
    for (i = 0; i < array.length; i++) {
        if (!array[i]) break;
    }
    array[i] = element;
    return i;
}
var __nonMSDOMBrowser = (window.navigator.appName.toLowerCase().indexOf('explorer') == -1);
var __theFormPostData = "";
var __theFormPostCollection = new Array();
function WebForm_InitCallback() {
    var count = theForm.elements.length;
    var element;
    for (var i = 0; i < count; i++) {
        element = theForm.elements[i];
        var tagName = element.tagName.toLowerCase();
        if (tagName == "input") {
            var type = element.type;
            if ((type == "text" || type == "hidden" || type == "password" ||
                ((type == "checkbox" || type == "radio") && element.checked)) &&
                (element.id != "__EVENTVALIDATION")) {
                WebForm_InitCallbackAddField(element.name, element.value);
            }
        }
        else if (tagName == "select") {
            var selectCount = element.options.length;
            for (var j = 0; j < selectCount; j++) {
                var selectChild = element.options[j];
                if (selectChild.selected == true) {
                    WebForm_InitCallbackAddField(element.name, element.value);
                }
            }
        }
        else if (tagName == "textarea") {
            WebForm_InitCallbackAddField(element.name, element.value);
        }
    }
}
function WebForm_InitCallbackAddField(name, value) {
    var nameValue = new Object();
    nameValue.name = name;
    nameValue.value = value;
    __theFormPostCollection[__theFormPostCollection.length] = nameValue;
    __theFormPostData += name + "=" + WebForm_EncodeCallback(value) + "&";
}
function WebForm_EncodeCallback(parameter) {
    if (encodeURIComponent) {
        return encodeURIComponent(parameter);
    }
    else {
        return escape(parameter);
    }
}
var __disabledControlArray = new Array();
function WebForm_ReEnableControls() {
    if (typeof(__enabledControlArray) == 'undefined') {
        return false;
    }
    var disabledIndex = 0;
    for (var i = 0; i < __enabledControlArray.length; i++) {
        var c;
        if (__nonMSDOMBrowser) {
            c = document.getElementById(__enabledControlArray[i]);
        }
        else {
            c = document.all[__enabledControlArray[i]];
        }
        if ((typeof(c) != "undefined") && (c != null) && (c.disabled == true)) {
            c.disabled = false;
            __disabledControlArray[disabledIndex++] = c;
        }
    }
    setTimeout("WebForm_ReDisableControls()", 0);
    return true;
}
function WebForm_ReDisableControls() {
    for (var i = 0; i < __disabledControlArray.length; i++) {
        __disabledControlArray[i].disabled = true;
    }
}
var __defaultFired = false;
function WebForm_FireDefaultButton(event, target) {
    if (!__defaultFired && event.keyCode == 13 && !(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea"))) {
        var defaultButton;
        if (__nonMSDOMBrowser) {
            defaultButton = document.getElementById(target);
        }
        else {
            defaultButton = document.all[target];
        }
        if (defaultButton && typeof(defaultButton.click) != "undefined") {
            __defaultFired = true;
            defaultButton.click();
            event.cancelBubble = true;
            if (event.stopPropagation) event.stopPropagation();
            return false;
        }
    }
    return true;
}
function WebForm_GetScrollX() {
    if (__nonMSDOMBrowser) {
        return window.pageXOffset;
    }
    else {
        if (document.documentElement && document.documentElement.scrollLeft) {
            return document.documentElement.scrollLeft;
        }
        else if (document.body) {
            return document.body.scrollLeft;
        }
    }
    return 0;
}
function WebForm_GetScrollY() {
    if (__nonMSDOMBrowser) {
        return window.pageYOffset;
    }
    else {
        if (document.documentElement && document.documentElement.scrollTop) {
            return document.documentElement.scrollTop;
        }
        else if (document.body) {
            return document.body.scrollTop;
        }
    }
    return 0;
}
function WebForm_SaveScrollPositionSubmit() {
    if (__nonMSDOMBrowser) {
        theForm.elements['__SCROLLPOSITIONY'].value = window.pageYOffset;
        theForm.elements['__SCROLLPOSITIONX'].value = window.pageXOffset;
    }
    else {
        theForm.__SCROLLPOSITIONX.value = WebForm_GetScrollX();
        theForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY();
    }
    if ((typeof(this.oldSubmit) != "undefined") && (this.oldSubmit != null)) {
        return this.oldSubmit();
    }
    return true;
}
function WebForm_SaveScrollPositionOnSubmit() {
    theForm.__SCROLLPOSITIONX.value = WebForm_GetScrollX();
    theForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY();
    if ((typeof(this.oldOnSubmit) != "undefined") && (this.oldOnSubmit != null)) {
        return this.oldOnSubmit();
    }
    return true;
}
function WebForm_RestoreScrollPosition() {
    if (__nonMSDOMBrowser) {
        window.scrollTo(theForm.elements['__SCROLLPOSITIONX'].value, theForm.elements['__SCROLLPOSITIONY'].value);
    }
    else {
        window.scrollTo(theForm.__SCROLLPOSITIONX.value, theForm.__SCROLLPOSITIONY.value);
    }
    if ((typeof(theForm.oldOnLoad) != "undefined") && (theForm.oldOnLoad != null)) {
        return theForm.oldOnLoad();
    }
    return true;
}
function WebForm_TextBoxKeyHandler(event) {
    if (event.keyCode == 13) {
        var target;
        if (__nonMSDOMBrowser) {
            target = event.target;
        }
        else {
            target = event.srcElement;
        }
        if ((typeof(target) != "undefined") && (target != null)) {
            if (typeof(target.onchange) != "undefined") {
                target.onchange();
                event.cancelBubble = true;
                if (event.stopPropagation) event.stopPropagation();
                return false;
            }
        }
    }
    return true;
}
function WebForm_AppendToClassName(element, className) {
    var current = element.className;
    if (current) {
        if (current.charAt(current.length - 1) != ' ') {
            current += ' ';
        }
        current += className;
    }
    else {
        current = className;
    }
    element.className = current;
}
function WebForm_RemoveClassName(element, className) {
    var current = element.className;
    if (current) {
        if (current.substring(current.length - className.length - 1, current.length) == ' ' + className) {
            element.className = current.substring(0, current.length - className.length - 1);
            return;
        }
        if (current == className) {
            element.className = "";
            return;
        }
        var index = current.indexOf(' ' + className + ' ');
        if (index != -1) {
            element.className = current.substring(0, index) + current.substring(index + className.length + 2, current.length);
            return;
        }
        if (current.substring(0, className.length) == className + ' ') {
            element.className = current.substring(className.length + 1, current.length);
        }
    }
}
function WebForm_GetElementById(elementId) {
    if (document.getElementById) {
        return document.getElementById(elementId);
    }
    else if (document.all) {
        return document.all[elementId];
    }
    else return null;
}
function WebForm_GetElementByTagName(element, tagName) {
    var elements = WebForm_GetElementsByTagName(element, tagName);
    if (elements && elements.length > 0) {
        return elements[0];
    }
    else return null;
}
function WebForm_GetElementsByTagName(element, tagName) {
    if (element && tagName) {
        if (element.getElementsByTagName) {
            return element.getElementsByTagName(tagName);
        }
        if (element.all && element.all.tags) {
            return element.all.tags(tagName);
        }
    }
    return null;
}
function WebForm_GetElementDir(element) {
    if (element) {
        if (element.dir) {
            return element.dir;
        }
        return WebForm_GetElementDir(element.parentNode);
    }
    return "ltr";
}
function WebForm_GetElementPosition(element) {
    var result = new Object();
    result.x = 0;
    result.y = 0;
    result.width = 0;
    result.height = 0;
    if (element.offsetParent) {
        result.x = element.offsetLeft;
        result.y = element.offsetTop;
        var parent = element.offsetParent;
        while (parent) {
            result.x += parent.offsetLeft;
            result.y += parent.offsetTop;
            var parentTagName = parent.tagName.toLowerCase();
            if (parentTagName != "table" &&
                parentTagName != "body" && 
                parentTagName != "html" && 
                parentTagName != "div" && 
                parent.clientTop && 
                parent.clientLeft) {
                result.x += parent.clientLeft;
                result.y += parent.clientTop;
            }
            parent = parent.offsetParent;
        }
    }
    else if (element.left && element.top) {
        result.x = element.left;
        result.y = element.top;
    }
    else {
        if (element.x) {
            result.x = element.x;
        }
        if (element.y) {
            result.y = element.y;
        }
    }
    if (element.offsetWidth && element.offsetHeight) {
        result.width = element.offsetWidth;
        result.height = element.offsetHeight;
    }
    else if (element.style && element.style.pixelWidth && element.style.pixelHeight) {
        result.width = element.style.pixelWidth;
        result.height = element.style.pixelHeight;
    }
    return result;
}
function WebForm_GetParentByTagName(element, tagName) {
    var parent = element.parentNode;
    var upperTagName = tagName.toUpperCase();
    while (parent && (parent.tagName.toUpperCase() != upperTagName)) {
        parent = parent.parentNode ? parent.parentNode : parent.parentElement;
    }
    return parent;
}
function WebForm_SetElementHeight(element, height) {
    if (element && element.style) {
        element.style.height = height + "px";
    }
}
function WebForm_SetElementWidth(element, width) {
    if (element && element.style) {
        element.style.width = width + "px";
    }
}
function WebForm_SetElementX(element, x) {
    if (element && element.style) {
        element.style.left = x + "px";
    }
}
function WebForm_SetElementY(element, y) {
    if (element && element.style) {
        element.style.top = y + "px";
    }
}

