// JavaScript Document
(function($) {
	$(document).ready(function(){
							    //passes document height AFTER the page has been loaded to iframe
		//350 is the minimum height needed for the menu to display correctly.
		//alert($(document).height());
        if($(document).height() < 350)
		{
			window.parent.GetHeight(350);
		}
		else
		{
			//docHeight = $(document).height();
			//docHeight2 = $(document).height();
			//alert($(window).height());
			//alert(docHeight2);
			window.parent.GetHeight($(document).height());
		}
    });
})(jQuery);

var reloaded = false;
var loc=""+document.location;
loc = loc.indexOf("?reloaded=")!=-1?loc.substring(loc.indexOf("?reloaded=")+10,loc.length):"";
loc = loc.indexOf("&")!=-1?loc.substring(0,loc.indexOf("&")):loc;
reloaded = loc!=""?(loc=="true"):reloaded;

function reloadOnceOnly() {
    if (!reloaded) 
        window.location.replace(window.location+"?reloaded=true");
}
reloadOnceOnly(); //You can call this via the body tag if desired
