﻿function toggleMenu(currMenu){
	if (document.getElementById) {
		thisMenu = document.getElementById(currMenu).style;
		if (thisMenu.display == "block") {
			thisMenu.display = "none";
			//show plus
			//eval("tmpPic = document.navImage" + (currMenu));
			//tmpPic.src = "images/navPlusBox.gif"
			//alert(tmpPic.src);
		}
		else {
			thisMenu.display = "block";	
			//show minus
			//eval("tmpPic = document.navImage" + (currMenu));
			//tmpPic.src = "images/navMinusBox.gif"
			//alert(tmpPic.src);
		
			
		}
		return false;
	}
	else {
		return true;
	}//end document.getElementByID
}//end toggleMenu()



function ResizeIFrame()
{  
    
    var heightOfIFrameContent = 0;
    var widthOfIFrameContent = 0;
    var foundIFrame = document.getElementById( "the_iframe" );    
    //alert("found? "+foundIFrame);
    if ( foundIFrame ) //All (modern?) browsers?
    {
        if ( foundIFrame.contentDocument ) //Firefox
        {
            if ( foundIFrame.contentDocument.body ) //Firefox
            {
                if ( foundIFrame.contentDocument.body.scrollHeight ) //Firefox
                {
                    heightOfIFrameContent = foundIFrame.contentDocument.body.scrollHeight + 25;
                }
                if ( foundIFrame.contentDocument.body.scrollWidth ) //Firefox
                {
                    widthOfIFrameContent = foundIFrame.contentDocument.body.scrollWidth + 25;
                }
            }
        }
        if ( heightOfIFrameContent == 0 ) 
        {
            if ( foundIFrame.Document ) //IE
            {
                if ( foundIFrame.Document.body ) //IE
                {
                    if ( foundIFrame.Document.body.scrollHeight ) //IE
                    {
                        heightOfIFrameContent = foundIFrame.Document.body.scrollHeight + 45;
                    }
                    if ( foundIFrame.Document.body.scrollWidth ) //IE
                    {
                        widthOfIFrameContent = foundIFrame.Document.body.scrollWidth + 45;
                    }
                }
            }
        }
    }
    if ( ( heightOfIFrameContent != 0 ) && ( widthOfIFrameContent != 0 ) )
    {
    
    	if (widthOfIFrameContent <= 400) {
    		widthOfIFrameContent = 800;
    	}
        foundIFrame.style.display="block";
        foundIFrame.style.height = heightOfIFrameContent.toString() + "px";
        foundIFrame.style.width = widthOfIFrameContent.toString() + "px";
    }
}


