
(function () {
    var exit = document.getElementById("exit");
    exit.onclick = function () {
        loginout();

    };

    var nav = document.getElementById("nav");
    var navonbtn = document.getElementById("navonbtn");
    navonbtn.onclick = function () {
        nav.style.display = "block";
        orderbiu.style.display = "none";
        trimbiu.style.display = "none";
    };

    window.onscroll = function computedDisplay() {
        if (document.body.clientWidth <= 769) {
            nav.style.display = "none";
            orderbiu.style.display = "none";
            trimbiu.style.display = "none";
        }
    }
    var navoffbtn = document.getElementById("navoffbtn");
    navoffbtn.onclick = function () {
        nav.style.display = "none";
        orderbiu.style.display = "none";
        trimbiu.style.display = "none";
    }
    var orderbtn = document.getElementById("orderbtn");
    var trimbtn = document.getElementById("trimbtn");
    var orderbiu = document.getElementById("orderbiu");
    var trimbiu = document.getElementById("trimbiu");
    orderbtn.onclick = function () {
        orderbtnfn();
    }

    trimbtn.onclick = function () {
        trimbtnfn();
    }
    var ordershow = false;
    var trimshow = false;

    function sizefn() {
        if (document.body.clientWidth <= 769) {

        } else {
            orderbiu.style.left = window.event.clientX + "px";
            orderbiu.style.top = window.event.clientY + "px";
            trimbiu.style.left = window.event.clientX + "px";
            trimbiu.style.top = window.event.clientY + "px";
        }
    }
    function orderbtnfn() {
       // alert(ordershow);
        if (ordershow == true)
        {
            orderbiu.style.display = "none";
        } else

        {
            sizefn();
            orderbiu.style.display = "block";
            trimbiu.style.display = "none";
            trimshow = false;
        } 
        ordershow = !ordershow;
    }
    function trimbtnfn() {
        if (trimshow == true)
{
            trimbiu.style.display = "none";
        }else
        {
            sizefn();
            trimbiu.style.display = "block";
            orderbiu.style.display = "none";
            ordershow = false;
        } 
        trimshow = !trimshow;

    }
    var navbox = document.getElementById("navbox");
    navbox.onclick = function () {
        navboxfn();
    }
    function navboxfn() {
        if (document.body.clientWidth <= 769) {
            nav.style.display = "none";
        }
    }
    ////以下要动态生成
    //var orderbiua = document.getElementById("orderbiua");

    //orderbiua.onclick = function () {
    //    orderbiuafn();
    //}
    //function orderbiuafn() {
    //    orderbiu.style.display = "none";
    //    ordershow = false;
    //    window.location.href = "#"
    //}
    ////以上要动态生成

    //var orderbiub = document.getElementById("orderbiub");
    //var orderbiuc = document.getElementById("orderbiuc");
    //var trimbiua = document.getElementById("trimbiua");
    //var trimbiub = document.getElementById("trimbiub");
    //var trimbiuc = document.getElementById("trimbiuc");
  
    //orderbiub.onclick = function () {
    //    orderbiubfn();
    //}
    //orderbiuc.onclick = function () {
    //    orderbiucfn();
    //}
    //trimbiua.onclick = function () {
    //    trimbiuafn();
    //}
    //trimbiub.onclick = function () {
    //    trimbiubfn();
    //}
    //trimbiuc.onclick = function () {
    //    trimbiucfn();
    //}
   
    //function orderbiubfn() {
    //    orderbiu.style.display = "none";
    //    ordershow = false;
    //    window.location.href = "#"
    //}
    //function orderbiucfn() {
    //    orderbiu.style.display = "none";
    //    ordershow = false;
    //    window.location.href = "#"
    //}
    //function trimbiuafn() {
    //    trimbiu.style.display = "none";
    //    trimshow = false;
    //    window.location.href = "#"
    //}
    //function trimbiubfn() {
    //    trimbiu.style.display = "none";
    //    trimshow = false;
    //    window.location.href = "#"
    //}
    //function trimbiucfn() {
    //    trimbiu.style.display = "none";
    //    trimshow = false;
    //    window.location.href = "#"
    //}


 
})();
