

/*******************菜单移动JS开始*******************/

function HighlightLine(lineid, hotelid) {
    getObj(lineid).className = "ht_item on";
    mouseoverBgImage(hotelid);
}
function LostfocusLine(lineid, hotelid) {
    getObj(lineid).className = "ht_item";
    mouseoutBgImage(hotelid);
}


//get element by id
function elt(id) {
    return document.getElementById(id);
}

//get element's css property
function gds(o) {
    return elt(o).currentStyle ? elt(o).currentStyle["top"] : document.defaultView.getComputedStyle(elt(o), false)["top"];
}

function hidev(idw) {
    elt(idw).style.display = "none";
}
function showv(idw) {
    elt(idw).style.display = "block";
}


//mouse over/out
function hv(id, idw) {
    if (elt(id) && elt(idw)) {
        elt(id).onmouseover = function() {
            elt(idw).style.display = "block";
        }
        elt(id).onmouseout = function() {
            elt(idw).style.display = "none";
        }
    }
}
//关闭自定义价格窗口
function CloseCustomPriceForm() {
    //取消冒泡
    if (navigator.userAgent.indexOf('MSIE') >= 0) {
        event.cancelBubble = true;
    }
    else {
        CloseCustomPriceForm.caller.arguments[0].cancelBubble = true;
    }
    if (elt("apricew")) {
        elt("apricew").style.display = "none";
    }
}

//单击自定义价格，弹出自定义价格窗口
function OpenCustomPriceForm() {
    //取消冒泡
    if (navigator.userAgent.indexOf('MSIE') >= 0) {
        event.cancelBubble = true;
    }
    else {
        OpenCustomPriceForm.caller.arguments[0].cancelBubble = true;
    }
    if (elt("apricew") && elt("apricew").style.display == "none") {
        elt("apricew").style.display = "";
        this.className = "b";
        var price1 = elt('price1');
        price1.focus();
    }
    return false
}




//菜单移动
function ScrollMap() {
    var num = -10;
//    if (window.location.href.toLowerCase().indexOf("coco365.net") != -1) num = 100;
    var slt = elt("search_rs").offsetHeight, flt = elt("search_fl").offsetHeight, fst = elt("search_rs").offsetParent.offsetTop;
    if (slt < flt) { elt("search_rs").style.height = flt + "px"; }
    var th = document.documentElement.scrollTop || document.body.scrollTop;
    var ftt = elt("hotelfoot").offsetTop;
    if (th > fst) {
        elt("search_fl").style.top = th - fst - num + "px";
    } else {
        elt("search_fl").style.top = "0";
    }
    if ((ftt - flt) < th) {
        if (slt > flt) {
           // elt("search_fl").style.top = slt - flt + "px";
            elt("search_fl").style.top = ftt - fst - flt - -100 + "px";
        } else elt("search_fl").style.top = "0";
    }
}

/*******************菜单移动JS结束*******************/
