function $(id){ return document.getElementById(id);}
function flash(width, height, url, obj){
	this.width 	= width;
	this.height = height;
	this.url 	= url;
	this.obj	= obj
	
	this.openFlash();
}

flash.prototype.openFlash = function (){
	var objeto;
		objeto = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		objeto +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
		objeto +='width="'+this.width+'" height="'+this.height+'">';
		objeto +='<param name="movie" value="'+this.url+'" />';
		objeto +='<param name="wmode" value="transparent" />';
		objeto +='<param name="quality" value="high" />';
		objeto +='<embed src="'+this.url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
		objeto +=' wmode="transparent" type="application/x-shockwave-flash" width="'+this.width+'" height="'+this.height+'"></embed>';
		objeto +='</object>';	
		
		$(this.obj).innerHTML = objeto;
}

function exibe( id , codigo , url ){
	$(id).style.display="block";
	ajax.open({
			  	'url': url,
				'method': 'post',
				'data': 'id='+codigo,
				'janela': 'pop'
			  });
}
function fecha( id ){
	$(id).style.display="none";	
	$(id).innerHTML="";	
}

function init(){
	
	var banner = $("banner_principal");
	
	if( banner != null )
		new flash("100%" , "100%" , "imagens/banner_flash.swf" , "banner_principal"  );	
}
window.onload=init;
