﻿/*
make by yin 21-01-2010
for the nav menu bar
*/
var x = 0;
var y = 0;
function showimage(i) {
    document.getElementById("arrow" + i).style.display = "block";
}
function hiddenimage(i) {
    document.getElementById("arrow" + i).style.display = "none";
}

function showmenu() {

    document.getElementById("pullmenu").style.display = "block";
    document.getElementById("pullmenu").style.left = getElementPosition("content_bottom").left + 'px';

    if (jQuery.browser.msie) {
        document.getElementById("pullmenu").style.top = getElementPosition("content_bottom").top - 10 + 'px';
    } else {
        document.getElementById("pullmenu").style.top = getElementPosition("content_bottom").top - 10 + 'px';
    }

}
function getElementPosition(elemID) {
    var offsetTrail = document.getElementById(elemID);
    var offsetLeft = 0;
    var offsetTop = 0;
    while (offsetTrail) {
        offsetLeft += offsetTrail.offsetLeft;
        offsetTop += offsetTrail.offsetTop;
        offsetTrail = offsetTrail.offsetParent;
    }
    return { left: offsetLeft, top: offsetTop };
}
function hiddenmenu() {
        document.getElementById("pullmenu").style.display = "none";
}

function cns_li_hover(obj, changeornot) {

    var browser = navigator.appName;
    var b_version = navigator.appVersion;
    var version = parseFloat(b_version);
    if (browser == "Microsoft Internet Explorer") {
        if (changeornot == 1) {

            obj.style.background = "url(arrow.gif) no-repeat position:center left";
            obj.style.color = "#f40000";

        } else {

            obj.style.background = "#D3D2CE";
            obj.style.color = "black";
        }
    }
}


