//========================================================
//main nav actions

    function onMainHeaderOver(nav_id){
        var index = nav_id.split("_");
        var cell = document.getElementById("CDAHeader_bnav_" + index[2]);
        cell.className = "nav_on"; 
        var cell1 = document.getElementById("CDAHeader_bcap_" + index[2]);
        cell1.className = "cap_on";
    }

    function onMainHeaderOut(nav_id){
        var index = nav_id.split("_");
        var cell = document.getElementById("CDAHeader_bnav_" + index[2]);
        cell.className = "nav_off";
        var cell1 = document.getElementById("CDAHeader_bcap_" + index[2]);
        cell1.className = "cap_off";  
    }
    
     function onMainOver(nav_id){
        var index = nav_id.split("_");
        var cell = document.getElementById("bnav_" + index[1]);
        cell.className = "nav_on";         
    }

    function onMainOut(nav_id){
        var index = nav_id.split("_");
        var cell = document.getElementById("bnav_" + index[1]);
        cell.className = "nav_off";       
    }
    
    
//========================================================
//button nav actions

    function onButtonsOver(nav_id){
        var index = nav_id.split("_");
        var cell = document.getElementById("bcap_" + index[1]);
        cell.className = "cap_on";      
    }

    function onButtonsOut(nav_id){
        var index = nav_id.split("_");
        var cell = document.getElementById("bcap_" + index[1]);
        cell.className = "cap_off";     
    }
    
//========================================================
//typical form button
    
    function overButton(elem)
    {
        
            elem.className = "button-typical_over";
       
    }
    
    function offButton(elem)
    {   
        elem.className = "button-typical";        
    }
    
     function overLrgButton(elem){
        elem.className = "button-typical_over-lrg";
    }
    
    function offLrgButton(elem){
        elem.className = "button-typical-lrg";
    }
    
//========================================================
//handle list changes
    
    function changeViewMode(value){
        alert("Mode handler here");
    }
    
    function changeContract(value){
        alert("Contract handler here");
    }
    
    function changeBuilding(value){
        alert("Building handler here");
    }
    
    function changeUnits(value){
        alert("Units handler here");
    }
    
    function selectReport(value){
        if(value == "0"){ document.location = "ReportAvailability.aspx"; }
        else if(value == "1"){ document.location = "ReportAvailability.aspx"; }
        else if(value == "5"){ document.location = "ReportAvailability.aspx"; }
        else { alert("Put report loader here."); }
    }
    
//========================================================
//open popups
    
    function openModifyRange(){
     var newWin=window.open('ModifyRange.aspx','popup','width=390,height=200,scrollbars=no,resizable=no,toolbar=no,status=no,location=no,left=295,top=300');
          
       //  var newWin=window.open('ModifyRange.aspx');
        newWin.focus();
    }
    
    function openCalendar(input_name){
        alert("Put open calendar handler here.");
    }
    
    function openClock(input_name){
        alert("Put open clock handler here.");
    }
    
    function openApplicationDefinition(lblLabelName) {
        var iLeft=screen.width/2;
        var iTop=screen.height/2;
        //Start of TD#11174 by Dipti S. 
        //In IE7 on popup window scroll bar is not visible and some text get cut off so increase the height and width of the window
        //var iHeight=310;
        //var iWidth=315;
          var iHeight=350;
          var iWidth=400;
        //End of TD#11174 by Dipti S. 
        
        var newWin=window.open('ApplicationDefinition.aspx?LabelName='+lblLabelName,'this','height='+iHeight+',width='+iWidth+',resizable=0,left='+(iLeft-iWidth/2)+',top='+(iTop-iHeight/2)+'')
          
       //  var newWin=window.open('ModifyRange.aspx');
        newWin.focus();
    }
    
    function openNewWindow(windowName) {
            
            var iHeight=screen.height-5;
            var iWidth=screen.width-5;
            var newWin=window.open('PrinterFriendly.aspx','_blank','height='+iHeight+',width='+iWidth+',resizable=1,left=0,top=0')
              
            newWin.focus();
    } 
         
    function PrintWindow() {
        window.print();
        return false
    }
    
    

