/* 
   Simple JQuery Collapsing menu.
   HTML structure to use:

   <ul id="menu">
     <li><a href="#">Sub menu heading</a>
     <ul>
       <li><a href="http://site.com/">Link</a></li>
       <li><a href="http://site.com/">Link</a></li>
       <li><a href="http://site.com/">Link</a></li>
       ...
       ...
     </ul>
     <li><a href="#">Sub menu heading</a>
     <ul>
       <li><a href="http://site.com/">Link</a></li>
       <li><a href="http://site.com/">Link</a></li>
       <li><a href="http://site.com/">Link</a></li>
       ...
       ...
     </ul>
     ...
     ...
   </ul>

Copyright 2007 by Marco van Hylckama Vlieg

web: http://www.i-marco.nl/weblog/
email: marco@i-marco.nl

Free for non-commercial use
*/

function initMenu() {
    $('#menu ul').hide();
    //        $('#menu ul:first').show();
    $('#menu li a').click(
function () {
    var checkElement = $(this).next();
    if ((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
    }
    if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
    }
    }
);
}
$(document).ready(function () { initMenu(); });


function initMenu2() {
    $('#menu2 ul').hide();
    //        $('#menu ul:first').show();
    $('#menu2 li a').click(
function () {
    var checkElement = $(this).next();
    if ((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
    }
    if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu2 ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
    }
}
);
}
$(document).ready(function () { initMenu2(); });


//<script type="text/javascript">
//    $(document).ready(function () {
//        $("button").click(function () {
//            $.ajax({ url: "test1.txt", success: function (result) {
//                $("div").html(result);
//            }
//            });
//        });
//    });
//</script>


//<script type="text/javascript">
//    //function changeHeight(iframe)
//    //      {
//    //        try
//    //        {
//    //          var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
//    //          if (innerDoc.body.offsetHeight) //ns6 syntax
//    //          {
//    //             iframe.height = innerDoc.body.offsetHeight + 32; //Extra height FireFox
//    //          }
//    //          else if (iframe.Document && iframe.Document.body.scrollHeight) //ie5+ syntax
//    //          {
//    //             iframe.height = iframe.Document.body.scrollHeight;
//    //          }
//    //        }
//    //        catch(err)
//    //        {
//    //          alert(err.message);
//    //        }
//    //      }
//    //      function UR_Start() 
//    //    {
//    //        UR_Nu = new Date;
//    //        UR_Indhold = showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());
//    //        document.getElementById("ur").innerHTML = UR_Indhold;
//    //        setTimeout("UR_Start()",1000);
//    //    }
//    //    function showFilled(Value) 
//    //    {
//    //        return (Value > 9) ? "" + Value : "0" + Value;
//    //    }
////    function initMenu() {

////        $('#menu ul').hide();

////        //        $('#menu ul:first').show();

////        $('#menu li a').mousemove(

////function () {

////    var checkElement = $(this).next();

////    if ((checkElement.is('ul')) && (checkElement.is(':visible'))) {

////        return false;

////    }

////    if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) {

////        $('#menu ul:visible').slideUp('normal');

////        checkElement.slideDown('normal');

////        return false;

////    }

////}

////);

////    }

////    $(document).ready(function () { initMenu(); });

//</script>
//<%--<style type="text/css">
//        .style2
//        {
//            width: 665px;
//        }
//        .style3
//        {
//            width: 172px;
//        }
//    </style>--%>
