
Event.observe(window, 'load', function()
{
	if($('grayOut')){
		$('grayOut').observe('click',function(){
			grayOut('off');
		});
		
		screenDimensions();
		
	}
	
	
});


function screenDimensions(){
	
	var bodyHeight = document.viewport.getHeight();
	var allcontentHeight = $('allContent').getHeight();

	if(bodyHeight < allcontentHeight){
		if($('grayOut')){
			$('grayOut').setStyle({ height: allcontentHeight+'px' });
		}
	}else{
		if($('grayOut')){
			$('grayOut').setStyle({ height: bodyHeight+'px' });
		}	
	}		
}


function getFlashMovie(movieName){
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

function grayOut(event){
	if(event == 'off'){
		$('grayOut').hide();
		getFlashMovie("flashVideo").getWhiter();
	}
	
	if(event == 'on'){
		$('grayOut').show();
	}
}

	
/*

function formSend() {
	var text = document.htmlForm.sendField.value;
	getFlashMovie("ExternalInterfaceExample").sendTextToFlash(text);
}
 
function getTextFromFlash(str) {
	document.htmlForm.receivedField.value = "From Flash: " + str;
	return str + " received";
}

*/


