window.onscroll = scroll;

function scroll(){

	var ns=(document.layers);
	var ie=(document.all);
	
	if (ie){
		var str = document.body.scrollTop;
	}else{
		var str = window.pageYOffset;
	}
	
	if(window.home) window.document["home"].SetVariable("myObject.scrollPos", str);
	if(document.home) document.home.SetVariable("myObject.scrollPos", str);
	
	reda_tela();
}
inicio = 0;
gInicio = 0;
function homer(){
	var myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myHeight = window.innerHeight;
	}else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		myHeight = document.documentElement.clientHeight;
	}else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myHeight = document.body.clientHeight;
	}
	return(myHeight);
}
function aumenta(inicio){
	if(inicio < 525){
		inicio = 525;	
	}
	$('flash').style.height = inicio;
	gInicio = inicio;
	reda_tela();
}




function reda_tela(){
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
  
	var largura = myWidth;
	var altura = myHeight;
	if(largura <= 1000){
		document.getElementById('flash').style.width = '1000px';
	}else {
		document.getElementById('flash').style.width = '100%';
	}
	if(altura <= 515){
		if(gInicio > altura){
			$('flash').style.height = gInicio;
		}else{
			document.getElementById('flash').style.height = '515px';
		}
	}else {
		if(gInicio > altura){
			$('flash').style.height = gInicio;
		}else{
			document.getElementById('flash').style.height = '100%';
		}
	}
}