/*********************************************************
 * Mostrar todas las propiedades y eventos de un objeto  *
 *********************************************************/
function MostrarPropiedadesObjeto(obj) {
   res='<font class=verdana>';

   for (var temp in obj) {
      if ((temp != 'innerHTML') && (temp != 'outerHTML') && (temp != 'outerText')  && (temp != 'innerText')) {
         res+='<b>'+temp+'</b>';
         res+=':<i> ';
         eval("res+=obj."+temp+";");
         res+="</i><br>";
      }
   }

   res+='</font>';
   var win=window.open('','PropiedadesObjeto','width=800,height=670,scrollbars=yes');
   win.document.write(res);
}


function getSize() {
	
	var anchoPagina = document.body.scrollWidth;
		
	// alert(anchoPagina);
	if (anchoPagina <= 950) {
		anchoFlash="758";
	} else {
		anchoFlash="950";
	}
	return anchoFlash;
}

function printFlash() {
	var obj = document.getElementById('fma');
		
	anchoFlash = getSize();
	
	var html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+anchoFlash+'" height="125"  id="flash_fma">';
	html += ' <param name="movie" value="images/banner01.swf" />';	
	html += '	<param name="quality" value="high" />';	
	html += '	<param name="wmode" value="transparent" />';	
	html += '	<embed src="images/banner01.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" height="125" width="'+anchoFlash+'" name="flash_fma" wmode="transparent"></embed>';
	html += '</object>';
	
	obj.innerHTML = html;	
}

function changeWidth() {
	var obj = document.getElementById('flash_fma');
	// alert(typeof(obj));
	if (typeof(obj) != 'undefined') {		
		
		obj.width = getSize();
		//alert("width: "+obj.width);
	}
}

function changeBanner() {
	var obj = document.getElementById('flash_fma');
	// alert(typeof(obj));
	if (typeof(obj) != 'undefined') {		
		
		// MostrarPropiedadesObjeto(obj)
		obj.movie = 'images/banner0'+contBanner+'.swf';
		// alert(obj.movie);
	}
		
	contBanner++;
	if (contBanner == 5) {
		contBanner =1;
	}
	setTimeout("changeBanner()",7000);
}
