 // Standardize DOM method
if(document.all && !document.getElementById) {
    document.getElementById = function(id) {
         return document.all[id];
    }
}

$(document).ready(function(){
		$("#modalbox").hide(); 
    	$('#mask').css({'filter' : 'alpha(opacity=50)', '-khtml-opacity' : '0.5', '-moz-opacity' : '0.5', 'opacity' : '0.5'});
		$("#mask").hide(); 	
 });

function makemodal() {
		var maskHeight = $(document).height();  
		var maskWidth = $(window).width(); 
		$('#mask').css({'width':maskWidth,'height':maskHeight});  
    	$('#mask').fadeIn(1000);      
    	$('#mask').fadeTo("slow",0.8);
}

function closemodalbox() {
		$("#modalbox").fadeOut("slow");
		document.getElementById("modalbox").innerHTML=""; 
		//$("#flashContainer").load("includes/flashIntro.aspx");
		$("#mask").fadeOut("slow");
		return false;
}

function showVideo() {
	makemodal();
	$("#modalbox").hide();
	//document.getElementById("flashContainer").innerHTML="";
	$("#modalbox").load("includes/flashVideo.aspx");
	$("#modalbox").fadeIn("slow");
}