function onLoadFunctions() {	        
    try{      
    
        var openDashBoard1 = document.getElementById("hdnFlagForDashboard").value;	
        var flagClicked1 = document.getElementById("hdnFlagForDiv").value;    

        if(eval(flagClicked1))
        {
            if(eval(openDashBoard1))
            {
                SetDashboardPosition(230); 
            }
            else
            {
                SetDashboardPosition(115); 
            }
            
        }
        else
        {
            if(eval(openDashBoard1))
            {
                SetDashboardPosition(40); 
            }
            else
            {
                SetDashboardPosition(40); 
            }
        } 
        
        
        
        SetReminderPosition();
               
    }catch(err){}
    try{
		LoadPage('Pages/Specific/ITNewsContent.aspx', 'ITNewsContent'); 
	}catch(err){}	
}    

function onScrollFunctions() {	                
    try{            
        SetReminderPosition();                
    }catch(err){}	       
}

function onResizeFunctions() {
    try{            
		//SetHelpPosition();
		var openDashBoard1 = document.getElementById("hdnFlagForDashboard").value;	
        var flagClicked1 = document.getElementById("hdnFlagForDiv").value;    

        if(eval(flagClicked1))
        {
            if(eval(openDashBoard1))
            {
                SetDashboardPosition(230); 
            }
            else
            {
                SetDashboardPosition(115); 
            }
            
        }
        else
        {
            if(eval(openDashBoard1))
            {
                SetDashboardPosition(40); 
            }
            else
            {
                SetDashboardPosition(40); 
            }
        }  
        
    }catch(err){}                 
    try{            
        SetReminderPosition();                
    }catch(err){}       
}	 

//dashboard JavaScript
var foo = new Array();
var Hide = "";
var heightOfInfoDiv = 115;
var heightOfDashboardDiv = 210;
var repositionDifference = 65;
var repositionDifferenceForDash = 40;
var repositionDifferenceHeaderForDash = 210;

function SetDashboardPosition(height)
{
     var winsize = GetSize();
     document.getElementById('contentWrap').style.height = (eval(winsize.height) - eval(height)) + 'px';
}

function SetFlagForDashboard(flag)
{    
    if(flag)
    {
       document.getElementById("hdnFlagForDashboard").value = true;
    }
    else
    {
       document.getElementById("hdnFlagForDashboard").value = false;
    }    
}

function GetSize() 
{
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }  
  return{width: myWidth, height: myHeight};
}   



function RepositionOnClick() {

    document.getElementById("container-dashboard").style.paddingTop = '5px';
    foo = document.getElementsByTagName("div");
	for (i=0;i<foo.length;i++) 
	{
		if (foo[i].className == "dashContainer") 
		{
		    Hide = foo[i].id;		    
		}
	}
	
    var openDashBoard = document.getElementById("hdnFlagForDashboard").value;	
	var flagClicked = document.getElementById("hdnFlagForDiv").value;

	y = document.getElementById(Hide).offsetTop;
	
	var x = document.getElementById('contentWrap').offsetLeft;
	  if (typeof document.body.style.maxHeight != "undefined") {
		  // IE 7, mozilla, safari, opera 9
	      x = document.getElementById(Hide).offsetLeft;	      
	      
		} else {
		  // IE6, older browsers
		}
				 
			
	var yDash = y+30;
	var xDash = x;
	
	if(!eval(flagClicked))
	{ 
	    if(!eval(openDashBoard))
	    {   
	        document.getElementById(Hide).style.top = (y - repositionDifference) + 'px';
			document.getElementById(Hide).style.left = x  + 'px';
    	    
	        document.getElementById("footerWrap").style.height = heightOfInfoDiv + 'px';
	        document.getElementById("footerWrap").style.overflow = "";
    	    
	        document.getElementById("hdnFlagForDiv").value = "true";
	        document.getElementById('contentWrap').style.height = (document.getElementById('contentWrap').offsetHeight - repositionDifference) + 'px';
	        
	    }
	    else
	    {
	        document.getElementById(Hide).style.top = (y - repositionDifferenceHeaderForDash) + 'px';
	        document.getElementById(Hide).style.left = x;
	    
   	        document.getElementById("container-dashboard").style.height = heightOfDashboardDiv + 'px';
	        document.getElementById("container-dashboard").style.overflow = "";
	        
	        document.getElementById('contentWrap').style.height = (document.getElementById('contentWrap').offsetHeight - repositionDifferenceHeaderForDash) + 'px';
	        document.getElementById("hdnFlagForDiv").value = "true";
	        document.getElementById("dashboardButton").className = "dashboardButtonDown";	   
	       
	    }
	}
	else
	{
	    if(!eval(openDashBoard))
        {  
	        document.getElementById(Hide).style.top = (y + repositionDifference) + 'px';
	        document.getElementById("footerWrap").style.height = 50 + 'px';
	        document.getElementById("footerWrap").style.overflow = "hidden";
	        
	        document.getElementById("hdnFlagForDiv").value = "false";
   	        document.getElementById('contentWrap').style.height = (document.getElementById('contentWrap').offsetHeight + repositionDifference) + 'px';
   	        
   	    }
	    else
	    {
	        if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
	            var ieversion = new Number(RegExp.$1)
	            if (ieversion <=7) {
	                document.getElementById(Hide).style.top = (y + repositionDifferenceHeaderForDash) + 'px';
	            }
	            if (ieversion >= 8) {
	                document.getElementById(Hide).style.top = (10 + y + repositionDifferenceHeaderForDash) + 'px';
	            }
	        } else {
	            document.getElementById(Hide).style.top = (10 + y + repositionDifferenceHeaderForDash) + 'px';
	        }
	        document.getElementById("container-dashboard").style.paddingTop = '0px';     
	        document.getElementById("container-dashboard").style.height = 0 + 'px';
	        document.getElementById("container-dashboard").style.overflow = "hidden";
	        
	        document.getElementById("hdnFlagForDiv").value = "false";
	        document.getElementById('contentWrap').style.height = (document.getElementById('contentWrap').offsetHeight + repositionDifferenceHeaderForDash) + 'px';
	        document.getElementById("dashboardButton").className = "dashboardButtonUp";       

	    }
	}
}









