﻿// JScript File

var curr_menuid = '';
var tm;
var th;
var bclk=false;

var imgSrchOver = new Image();
imgSrchOver.src = 'searchbox/images/search-button_OVER.png';

function showsubmenu(menuid)
{
    var sm = document.getElementById(menuid);
        
    if (menuid.length>0)
    {
        if (sm.style.display=='none')
        {
            // hide current menu 
            showsubmenu(curr_menuid);
            
            Effect.BlindDown(menuid, { duration: 0.2 });
            if (curr_menuid==menuid)
                curr_menuid='';
            else
                curr_menuid = menuid;
              }
        else    
        {
            Effect.BlindUp(menuid, { duration: 0.2 });
            if (curr_menuid==menuid)
                curr_menuid='';
            clearTimeout(th);

        }
    }
   
}

function showsbitems()
{
    document.getElementById('gpsb_searchrow').style.display='block';
    document.getElementById('gpsb_pppouter').style.display='block';
    document.getElementById('gpsb_meterouter').style.display='block';    
}

function morphbar(imgid, value)
{
    Effect.Morph(imgid,{ style: 'height:17px; width:' + value + 'px;'});

}

function highlight_item(menuid,forecolor,backcolor,flag)
{
    var smi = document.getElementById(menuid);
    
    if (flag==1)   
    {    
        smi.style.backgroundColor=backcolor;
        smi.style.color=forecolor;
    }
    else
    {
        smi.style.backgroundColor='';
        smi.style.color='';
    }
    
}

function border_item(menuid,bordercolor,flag)
{
    var smi = document.getElementById(menuid);
    
    if (flag==1)   
    {    
        smi.style.border='1px solid ' + bordercolor;     
    }
    else
    {
        smi.style.border='';        
    }
    
}

function sendinput(ctlid)
{    
    __doPostBack(ctlid,'');        
}

