﻿function checkPeerData(sender, args)
  {
    var peerString = args.Value;
    
    var col_array=peerString.split(",");

    if(col_array.length > 7)
      {
         args.IsValid = false;
         alert("Please enter maximum of 7 Companies");
         return;
      }

    args.IsValid = true;
  }
  function loadbody()
{
    _dom=document.all?3:(document.getElementById?1:(document.layers?2:0));
    //document.getElementById("ctl00_txtCompanysuggest").focus();
    //ddaccordion.collapseall('submenuheader');
    setTheMenuBgColor();
    strPrefix = 'ctl00_';
}

function setTheMenuBgColor()
{
    var idmenu = document.getElementById("leftnav_analytics3");
    var image = "url(App_Themes/images/navigation_button_submenu_over.gif)";
    if((idmenu != null) && (image != null))
    {
        //Replace the image to highlight
        idmenu.style.backgroundImage = image;
        idmenu.style.color = "#154f71";
        
    }
}
function loadPageControls()
{
    if(_dom==3)
    {
        location = document.getElementById('ctl00_ContentPlaceHolder1_startApp').href;       
    }
    else
    {
        location = document.getElementById('ctl00_ContentPlaceHolder1_startApp').href;        
    }

}

function OnItemSelected() {

    var varSearch = document.getElementById("ctl00_ContentPlaceHolder1_linkSearch");
    if (varSearch != null) {
        //This causes the graph loading in the update panel
        location = varSearch.href;
    }
}
