
function getWindowHeight() 
	{
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') 
		{ windowHeight=window.innerHeight; }
	else 
		{
		if (document.documentElement&&document.documentElement.clientHeight) 
			{ windowHeight = document.documentElement.clientHeight; }
		else 
			{
			if (document.body&&document.body.clientHeight) 
				{ windowHeight=document.body.clientHeight; }
			}
		}
	return windowHeight;
	}



// change the height of the container and content to match the browser height
function resize()
	{
	var windowHeight = getWindowHeight();

	document.getElementById('content').style.height = windowHeight - 225 + "px";
	}
	
// attach resize() function to window
window.onload = function() { resize(); }
window.onresize = function() { resize(); }


//Identifies whether the checkbox acknowledging the terms and conditions has been checked. If not puts a red border around it and alerts the user 
// that the need to checkit to continue with the download.
function checkCheckBox(f, mb){
    if (f.agree.checked == false )
    {
       var x=document.getElementById("messageBox");
        if(x)
        {
            x.style.border="Solid 2px #FF0000"; 
            x.style.marginLeft="-2px";
            x.style.marginTop="-2px";
            
         }
        alert("To continue, you need to tick the check box to acknowledge your acceptance of the terms and conditions of the competition.");
        
        return false;
    }
      
     return true;
}

//Removes the red border from the terms and conditions checkBox when selected
function onCheck()
{
   var x=document.getElementById("messageBox");
   if(x){
        x.style.borderStyle="none";   
        x.style.margin="0";
   } 
}


/*
// attach the above if we're in ie
if  (window.attachEvent) 
	{ window.attachEvent("onload", setupFocus); }
*/