function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function infoPopURL(iW,iH,cURL){
	var infoPopup = document.getElementById("infoPopup");
	var fDiv = document.getElementById("frameDiv");
    var ypos = 0;
    var winH = 0;
    var xpos = 0;
    var winW = 0;	
			
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		if (!iW){
			iW = parseInt(infoPopup.currentStyle.width);
		}
		if (!iH) {
			iH = parseInt(infoPopup.currentStyle.height);
		}
        //strict mode
        if(!(document.documentElement.clientWidth == 0))
        {
		    var ypos = document.documentElement.scrollTop;
		    var winH = document.documentElement.clientHeight;
		    var xpos = document.documentElement.scrollLeft;
		    var winW = document.documentElement.clientWidth;
		}
		else //loose mode
		{
			var ypos = document.body.scrollTop;
		    var winH = document.body.clientHeight;
		    var xpos = document.body.scrollLeft;
		    var winW = document.body.clientWidth;
		}
	} 
	else // w3c
	{
		if (!iW){
			iW = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("width"));
		}
		if (!iH){
			iH = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("height"));
		}
		var ypos = window.pageYOffset;
		var winH = window.innerHeight;
		var xpos = window.pageXOffset;
		var winW = window.innerWidth;
	}
	
	iWpx = iW.toString() + "px";
	iHpx = iH.toString() + "px";
	
	fDiv.innerHTML = "<IFRAME id='infoIFrame' frameBorder=0 scrolling='no' style='width:"+iW.toString()+"px; height:"+iH.toString()+"px;' ></IFRAME>";
	var dynFrame = document.getElementById("infoIFrame");
	dynFrame.src = cURL;
			
	infoPopup.style.width = iWpx;
	infoPopup.style.height = iHpx;
	var yVal = Math.round((winH-iH)/2)+ypos;
	if(yVal<100) yVal = 100;
	yVal = yVal.toString()+"px";
	var xVal = Math.round((winW-iW)/2)+xpos;
	xVal = xVal.toString()+"px";
	infoPopup.style.top = yVal;
	infoPopup.style.left = xVal;
	infoPopup.style.display = "block";
}

function infoPop(iW, iH) {
	var infoPopup = document.getElementById("infoPopup");
	//var infoFrame = document.getElementById("infoIFrame");
	var fDiv = document.getElementById("frameDiv")
	
	if(navigator.appName == "Microsoft Internet Explorer"){
		if (!iW){
			iW = parseInt(infoPopup.currentStyle.width);
		}
		if (!iH) {
			iH = parseInt(infoPopup.currentStyle.height);
		}
		//var ypos = document.body.parentNode.scrollTop;
		var ypos = document.body.scrollTop;
		var winH = document.body.clientHeight;
		var xpos = document.body.scrollLeft;
		var winW = document.body.clientWidth;
	} else {
		if (!iW){
			iW = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("width"));
		}
		if (!iH){
			iH = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("height"));
		}
		var ypos = window.pageYOffset;
		var winH = window.innerHeight;
		var xpos = window.pageXOffset;
		var winW = window.innerWidth;
	}
	iW2 = iW - 100;
	iW2px = iW2.toString() + "px";
	iWpx = iW.toString() + "px";
	iHpx = iH.toString() + "px";
	infoPopup.style.width = iWpx;
	infoPopup.style.height = iHpx;
	//infoFrame.style.width = iWpx;
	//infoFrame.style.height = iHpx;
	fDiv.innerHTML = "<IFRAME id='infoIFrame' frameBorder=0 scrolling='no' style='width:"+iW.toString()+"px; height:"+iH.toString()+"px;' ></IFRAME>";
	var yVal = Math.round((winH-iH)/2)+ypos;
	if(yVal<100) yVal = 100;
	yVal = yVal.toString()+"px";
	var xVal = Math.round((winW-iW)/2)+xpos;
	xVal = xVal.toString()+"px";
	infoPopup.style.top = yVal;
	infoPopup.style.left = xVal;
	infoPopup.style.display = "block";
}

function infoPopResize(){
	var infoPopup = parent.document.getElementById("infoPopup");
	var infoScrollDiv = document.getElementById("infoScrollDiv");	
	if (navigator.appName == "Microsoft Internet Explorer"){
		iH = parseInt(infoPopup.currentStyle.height);
		iW = parseInt(infoPopup.currentStyle.width);
		var isdPadd = parseInt(infoScrollDiv.currentStyle.padding);
		var isT = parseInt(infoScrollDiv.currentStyle.top);
		var isW = iW - isdPadd*2;
		var isH = iH - isT - isdPadd*2;
	} else {
		iH = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("height"));
		iW = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("width"));
		var isdPadd = parseInt(document.defaultView.getComputedStyle(infoScrollDiv, '').getPropertyValue("padding-left"));
		var isT = parseInt(document.defaultView.getComputedStyle(infoPopup, '').getPropertyValue("top"));
		var isW = iW - isdPadd*2;
		var isH = iH - isT - isdPadd*4;
	}
	iWpx = iW.toString() + "px";
	iHpx = iH.toString() + "px";
	infoScrollDiv.style.width = isW.toString()+"px";
	infoScrollDiv.style.height = isH.toString()+"px";
}
	
function closeInfoPopup(){
	parent.document.getElementById("infoPopup").style.display="none";
}

function subgroup_js(){
	infoPop(350,150);
	document.getElementById('infoIFrame').src = 'subgroupDetails.aspx';
}