// Funciones para mostrar codigo mediante AJAX - AHAH
function cargaDatos(url, elementoPag) {
	document.getElementById(elementoPag).innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="120" height="45"><param name="movie" value="anim/loader.swf"><param name="allowScriptAccess" value="always"><param name="swliveconnect" value="true"><param name=quality value=high><param name=wmode value=transparent><embed src="anim/loader.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="120" height="45" swliveconnect="true" wmode="transparent" allowScriptAccess="always"></embed></object>';
     try {
     http = new XMLHttpRequest(); /* p.e. Firefox */
     } catch(e) {
       try {
       http = new ActiveXObject("Msxml2.XMLHTTP");
  /* algunas versiones IE */
       } catch (e) {
         try {
         http = new ActiveXObject("Microsoft.XMLHTTP");
  /* algunas versiones IE */
         } catch (E) {
          http = false;
         }
       }
     }
     http.onreadystatechange = function() {respuestaAHAH(elementoPag);};
     http.open("GET",url,true);
     http.send(null);
}

function respuestaAHAH(elementoPag) {
   var resultado = '';
   if(http.readyState == 4) {
      if(http.status == 200) {
         resultado = http.responseText;
		 //new Effect.Fade(document.getElementById('inicio'));
         document.getElementById(elementoPag).innerHTML = resultado;
      } else {
    	  alert("Ha habido un problema al acceder al servidor: " + http.statusText);
   	  }
   }
}
function embedFlash2(pelicula,ancho,alto){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
	document.write('codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash');
	document.write('.cab#version=8,0,0,0" width="' + ancho + '" height="' + alto + '">');
    document.write('<param name="movie" value="flash/' + pelicula + '.swf">');
	document.write('<param name="allowScriptAccess" value="always">');
	document.write('<param name="swliveconnect" value="true">');
    document.write('<param name=quality value=high>');
	document.write('<param name=wmode value=transparent>');
    document.write('<embed src="flash/' + pelicula + '.swf" quality=high pluginspage="http://www.macromedia.');
	document.write('com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="');
	document.write('application/x-shockwave-flash" width="' + ancho + '" height="' + alto + '" swliveconnect="true"  allowScriptAccess="always"></embed></object>');
}



