
function menuRollOver(item) {
    item.style.color='#FFFFFF'
}

function menuRollOut(item) {    
    item.style.color='#FF0000';
}

function Left(elem){
    var x=1;        
    if (document.all) x=0; // correct position under IE
    while(elem){
        x+=elem.offsetLeft;
        elem=elem.offsetParent;
    }
    return x;
}

function Top(elem){
    var x=0;
    if (document.all) x=-1; // correct position under IE
    while(elem){
        x+=elem.offsetTop;
        elem=elem.offsetParent;
    }
    return x;
}

function selectValue(id,value) {
    for (var i=0;i<$el(id).options.length;i++)
        if (parseInt($el(id).options[i].value)==parseInt(value))
            $el(id).selectedIndex=i;
}

function show(id) {
    var c =  $el(id);
    //if (c) {
      //  if (id=='menu5') c.style.left = c.offsetLeft;
        c.style.visibility='visible';
    //}
}

function showXY(callingItem,id,isRoot,offlft) {
    if ($el(id)) {
        if (!isRoot) {
            var bwidth=1;
            //alert("!");
            $el(id).style.left=$el(callingItem).offsetWidth;
            $el(id).style.top=(callingItem.substr(callingItem.lastIndexOf('_')+1,callingItem.length)-1)*($el(callingItem).offsetHeight)-bwidth;
        } else {
            var off;
            off=document.all?1:0;
            var loff=document.all?0:1;
            $el(id).style.top=Top($el(callingItem))+$el(callingItem).offsetHeight+off;
            $el(id).style.left=Left($el(callingItem))-loff-offlft;
        }

        $el(id).style.visibility='visible';
    }
}

function hide(id) {
    if ($el(id))
        $el(id).style.visibility='hidden';
}

function loginPrint(id) {
    var el = $el(id);
    if (el && el.className == 'login'){
        el.value = '';
        el.align = 'left';
        el.className = 'loginPrint';
    }
}