﻿// JScript File

/*
         Initialize and render the Menu when its elements are ready 
         to be scripted.
    */
    YAHOO.util.Event.onContentReady("basicmenu", function () {
        /*
             Instantiate a Menu:  The first argument passed to the 
             constructor is the id of the element in the page 
             representing the Menu; the second is an object literal 
             of configuration properties.
        */
		var a = getposOffset(document.getElementById('ddlTxtField'), 'top');
		var b = getposOffset(document.getElementById('ddlTxtField'), 'left');
        var oMenu = new YAHOO.widget.Menu("basicmenu", { position: "dynamic", x: b, y: a });
        /*
             Call the "render" method with no arguments since the 
             markup for this Menu instance is already exists in the page.
        */
        oMenu.render();
        // Set focus to the Menu when it is made visible
        oMenu.subscribe("show", oMenu.focus);
        YAHOO.util.Event.addListener("quickLinksButton", "click", oMenu.show, null, oMenu);
		/*
		a = getposOffset(document.getElementById('search'), 'top');
		b = getposOffset(document.getElementById('search'), 'left');
		var searchMenu = new YAHOO.widget.Menu("basicmenu2", { position: "dynamic", x: b, y: a });
		searchMenu.render();
		searchMenu.subscribe("show", searchMenu.focus);
		YAHOO.util.Event.addListener("searchButton", "click", searchMenu.show, null, searchMenu);
    */
    });
