/*  ------------------------------------------------------------------
    Functions -------------------------------------------------------- */
    function verify(username,password,path_query_url){
        location.href = "/adm/verification.asp?username=" + username + "&password=" + password + "&path_query_url=" + path_query_url
    }

    function displayFlashLogin(path,w,h,theid,path_query_url) {
        document.write('<object width='+w+' height='+h+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" id=ShockwaveFlash1><param name="wmode" value="transparent" /><param name="bgcolor" value="#000" /><param name="movie" value="'+path+'?path_query_url='+path_query_url+'" /><embed src="'+path+'?path_query_url='+path_query_url+'" width='+w+' height='+h+' wmode="transparent" bgcolor="#000" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>');
    }


/*  ------------------------------------------------------------------
    Extend jQuery Functions ------------------------------------------ */
    (function ($) {

    /*  ------------------------------------------------------------------
        Center Element --------------------------------------------------- */
        $.fn.centerInClient = function(options) {
            /// <summary>Centers the selected items in the browser window. Takes into account scroll position.
            /// Ideally the selected set should only match a single element.
            /// </summary>    
            /// <param name="fn" type="Function">Optional function called when centering is complete. Passed DOM element as parameter</param>    
            /// <param name="forceAbsolute" type="Boolean">if true forces the element to be removed from the document flow 
            ///  and attached to the body element to ensure proper absolute positioning. 
            /// Be aware that this may cause ID hierachy for CSS styles to be affected.
            /// </param>
            /// <returns type="jQuery" />
            var opt = { forceAbsolute: false,
                        container: window,    // selector of element to center in
                        completeHandler: null
                      };
            $.extend(opt, options);
           
            return this.each(function(i) {
                var el = $(this);
                var jWin = $(opt.container);
                var isWin = opt.container == window;

                // force to the top of document to ENSURE that 
                // document absolute positioning is available
                if (opt.forceAbsolute) {
                    if (isWin)
                        el.remove().appendTo("body");
                    else
                        el.remove().appendTo(jWin.get(0));
                }

                // have to make absolute
                el.css("position", "absolute");

                // height is off a bit so fudge it
                var heightFudge = isWin ? 2.0 : 1.8;

                var x = (isWin ? jWin.width() : jWin.outerWidth()) / 2 - el.outerWidth() / 2;
                var y = (isWin ? jWin.height() : jWin.outerHeight()) / heightFudge - el.outerHeight() / 2;

                el.css("left", x + jWin.scrollLeft());
                el.css("top", y + jWin.scrollTop());

                // if specified make callback and pass element
                if (opt.completeHandler)
                    opt.completeHandler(this);
             });
        }


    })(jQuery);


/*  ------------------------------------------------------------------
    On Load ---------------------------------------------------------- */
    $(function(){
        $("#wrapper_form").centerInClient();
    });


/*  ------------------------------------------------------------------
    Resize & Scroll -------------------------------------------------- */
    $(window).resize(function (){
        $("#wrapper_form").centerInClient();
    });

    $(window).scroll(function (){
        
    });

