function getParameter(parameterName)
{
	var queryString = window.top.location.search.substring(1);
	var parameterName = parameterName + "=";
	
	if(queryString.length > 0)
	{
    	begin = queryString.indexOf ( parameterName );
    	
    	if(begin != -1)
    	{
        	begin += parameterName.length;
        	end = queryString.indexOf ("&", begin);
        	
	    	if(end == -1)
	    	{
	        	end = queryString.length;
	    	}
	    	
	    	return unescape(queryString.substring(begin, end));
		}
		
		return "null";
	}
}

function openPopUp(URL)
{
	var day = new Date();
	var id = day.getTime();
	var win = window.open(URL, id);
	
	win.window.focus();
}

function resizeHolder(h)
{
	document.getElementById("swfcontainer").style.height = h + "px";
}

window.onload = onLoadHandler;

function onLoadHandler()
{
	var headerHeight = document.getElementById("header").offsetHeight;
	var footerHeight = document.getElementById("footerHolder").offsetHeight;
	var fullHeight;
	
	if(typeof(window.innerWidth) == 'number')
	{
		//Non-IE
		fullHeight = window.innerHeight;
	}
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
	{
		//IE 6+ in 'standards compliant mode'
    	fullHeight = document.documentElement.clientHeight;
	}
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{
	    //IE 4 compatible
	    fullHeight = document.body.clientHeight;
    }
	
	resizeHolder(fullHeight - headerHeight - footerHeight);
	
	document.getElementById("footer").style.display = "block";
	document.getElementById("swfcontainer").style.display = "block";
}
