function modalDialogShow_IE(url,width,height)
    {
    return window.showModalDialog(url,window,
    "dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:Yes;help:No;Resizable:Yes;Maximize:Yes");
    }
function modalDialogShow_Moz(url,width,height)
    {
    var left = screen.availWidth/2 - width/2;
    var top = screen.availHeight/2 - height/2;
    activeModalWin = window.open(url, "", "width="+width+"px,height="+height+",left="+left+",top="+top+",scrollbars=yes,resizable=yes");
    window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};
    }
function modalDialog2(url,width,height)
    {
    if(navigator.appName.indexOf('Microsoft')!=-1)
    return modalDialogShow_IE(url,width,height);
    else
    modalDialogShow_Moz(url,width,height); 
    }
function modalDialog(url,width,height,title)
    {
    if(navigator.appName.indexOf('Microsoft')!=-1)
    return modalDialogShow_IE(url,width,height);
    else
    modalDialogShow_Moz(url,width,height); 
    }
function icCloseDlg()
    {

    }
 function ShowHideMenu(id)
 {
   if (document.all)
   {
                                 if(document.all[id].style.display == 'none')
                                 {
                                                document.all[id].style.display = '';
                                 } 
                                 else 
                                 {
                                                document.all[id].style.display = 'none';
                                 }
                
                                return false;
                } 
                else if (document.getElementById)
                {
                                 if(document.getElementById(id).style.display == 'none')
                                 {
                                                document.getElementById(id).style.display = 'block';
                                 } 
                                 else 
                                 {
                                                document.getElementById(id).style.display = 'none';
                                 }

                return false;
   }
 }

function turnOffMenu(id)
{

                  if (document.all)
                  {
                                                document.all[id].style.display = 'none';
                  }
                  else if (document.getElementById)
                  {
                                document.getElementById(id).style.display = 'none';
      }
}

function turnOnMenu(id)
{
                  if (document.all)
                  {
                                document.all[id].style.display = '';
      }
                  else if (document.getElementById)
                  {
                                                document.getElementById(id).style.display = 'block';
      }
}

function turnOffAllMenu()
{
                if (document.all)
                {
                                document.all[projects].style.display = 'none';
                                alert("hi!")
                                document.all[employees].style.display = 'none';
                                document.all[reports].style.display = 'none';
                                document.all[company].style.display = 'none';
                                document.all[clients].style.display = 'none';
                                return false;
                }
}

function changeStyleById(id){
if (document.getElementById)
   {
   var nodeObj = document.getElementById(id)
   nodeObj.style.backgroundColor = '#383f8d';
   }
}

function resetchangeStyleById(id){
if (document.getElementById)
   {
   var nodeObj = document.getElementById(id)
   nodeObj.style.backgroundColor = '#6673a0';
   }
}
