function getWindowSize() {
  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 Array(myWidth, myHeight)
}

function getWindowWidth() {
	return	getWindowSize()[0];
}
function getWindowHeight() {
	return	getWindowSize()[1];
}

xmlhttp=null
// code for Mozilla, etc.
if (window.XMLHttpRequest)
{
  xmlhttp=new XMLHttpRequest()
}
// code for IE
else if (window.ActiveXObject)
{
	try
	{
  		xmlhttp=new ActiveXObject("MSXML2.ServerXMLHTTP")
	}catch(ex)
	{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
}

function displayUpdateDialog(message)
{
	var updateLayer = document.getElementById("updateLayer");
	updateLayer.style.display = 'block';
	updateLayer.style.width = '415px';
	updateLayer.style.height = '238px';
	updateLayer.style.top = ((getWindowHeight() / 2) - (238 / 2)).toString() + 'px';
	updateLayer.style.left = ((getWindowWidth() / 2) - (415 / 2)).toString() + 'px';
	updateLayer.innerHTML = '<div style="padding-top:60px; text-align:center"><img alt="Please Wait..." src="images/updating.gif" ></div><div style="padding-top:30px; text-align:center; font-weight:bold">' + message + '</div>'
}

//Menu functions
function updateExpanded(element)
{
	var menuGroup;
	menuGroup = element.parentNode.parentNode;
	if (menuGroup.offsetHeight == 22) {
		menuGroup.style.height = 'auto';
	} else {
		menuGroup.style.height = '16px';
	}
}

//Function to confirm user navigation
function confirmNavigation(strMessage, strAction)
{if (confirm(strMessage)){window.location = strAction;}}



