// JavaScript Document
// Código para detectar Flash Player


 <!--
 
 var flash2Installed = false;    
 var flash3Installed = false;    
 var flash4Installed = false;   
 var flash5Installed = false;    
 var flash6Installed = false;  
 var maxVersion = 6; 
 var actualVersion = 0;         
 var hasRightVersion = false; 
 var jsVersion = 1.0;
 var gotflash = 0;
 
 // -->



 <!--
 
 // Check the browser...we're looking for ie/win
 var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    
 var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
 
 // This is a js1.1 code block, so make note that js1.1 is supported.
 jsVersion = 1.1;
 
 // Write vbscript detection on ie win. IE on Windows doesn't support regular
 // JavaScript plugins array detection.
 if(isIE && isWin){
   document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
   document.write('on error resume next \n');
   document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
   document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
   document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
   document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
   document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n'); 
   document.write('</SCR' + 'IPT\> \n'); // break up end tag so it doesn't end our script
 }
 // -->



 <!--
 
 function detectFlash() {  
   // If navigator.plugins exists...
   if (navigator.plugins) {
     // ...then check for flash 2 or flash 3+.
     if (navigator.plugins["Shockwave Flash 2.0"]
         || navigator.plugins["Shockwave Flash"]) {
       var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
       var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
       // alert("Flash plugin description: " + flashDescription);
       var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
      
       flash2Installed = flashVersion == 2;    
       flash3Installed = flashVersion == 3;
       flash4Installed = flashVersion == 4;
       flash5Installed = flashVersion == 5;
       flash6Installed = flashVersion >= 6;
     }
   }
   
   // Loop through all versions we're checking, and
   // set actualVersion to highest detected version.
   for (var i = 2; i <= maxVersion; i++) {  
     if (eval("flash" + i + "Installed") == true) gotflash = i;
   
   }
 }
 
 detectFlash();  // call our detector now that it's safely loaded.  
   
 // -->

 				   
 <!--
 //testing:
 //gotflash=0;
/////////////////////////////////////
// para spot
/////////////////////////////////////
function spot(video){
	var requiredVersion = 6;//para visualizar el spot es necesaria la versión 6
                   
		if (gotflash >= requiredVersion) {
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="350" height="300">');
			document.write('	<param name="movie" value="swf/'+video+'">');//nombre de la pelicula
			document.write('	<param name="quality" value="high">');
			document.write('	<embed src="swf/'+video+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="350" height="300">');
			document.write('	</embed>');
			document.write('</object>');     	
			}
 
		else {
 			document.write('<table width="350" height="300" border="0" cellspacing="0" cellpadding="0">');  
 			document.write('	<tr>');  
 			document.write('		<td>');  
 			document.write('			<img src="imagenes/espacio.gif" width="35" height="1">');  
 			document.write('		</td>');  
 			document.write('		<td>');  
			document.write('			<img src="imagenes/espacio.gif" width="315" height="1">');  
 			document.write('		</td>');  
 			document.write('	</tr>');  
 			document.write('	<tr>');  
 			document.write('		<td>');  
 			document.write('			<img src="imagenes/espacio.gif" width="1" height="290">');  
 			document.write('		</td>');  	
 			document.write('		<td valign="middle" class="texto_negro">');  
 			document.write('			<img src="imagenes/error.gif" width="35" height="35" align="middle">');   
 			document.write('			<br>');  
 			document.write('			Se ha producido un error en la visualizaci&oacute;n del spot, probablemente debido a que no tiene instado el plugin Flash Player.');   
 			document.write('			<a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&P2_Platform=Win32&P3_Browser_Version=MSIE&Lang=Spanish&P5_Language=Spanish" target="_blank" class="texto_azul"> ');   
  			document.write('			<br>');
  			document.write('			<br>');			
			document.write('			Pulse aqu&iacute; para descargarlo');  
 			document.write('			</a>');  
 			document.write('			, y si aun as&iacute; el problema persiste p&oacute;ngase en contacto con:');  
 			document.write('			<a href="mailto:info@eurocastalia.com" class="texto_azul">');   
 			document.write('			webmaster@eurocastalia.com');  
 			document.write('			</a>');  
 			document.write('			<br>');  
 			document.write('			<br>');  
 			document.write('			<br>'); 
 			document.write('			<img src="imagenes/flecha.gif" width="10" height="15" border="0" align="middle">'); 
			document.write('			<a href="spot_tcm.html" class="texto_gris_medio">');  
 			document.write('			Volver');  
 			document.write('			</a> ');
			document.write('            <img src="imagenes/espacio.gif" width="120" height="10" border="0" align="middle">');  
			document.write('            <a href="spot_tcm.html" class="texto_gris_medio">');  
			document.write('            Continuar');  
			document.write('            </a>');  
			document.write('            <img src="imagenes/flecha_negro.gif" width="15" height="15" border="0" align="middle">');   
 			document.write('		</td>');  
 			document.write('	</tr>');  
 			document.write('</table>'); 		 
			}
}

 // -->
 
 
 
 
 
 
 
 
 