
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;


function high(objeto) {
	objeto.filters.alpha.opacity=75;
}

function low(objeto) {
	objeto.filters.alpha.opacity=100;
}

function MuestraBanner(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=no,resizable=no,width=580,height=250');
}


function Muestra_Presentacion(theURL) { //v1.0
  window.open(theURL,'Presentación','scrollbars=no,resizable=no,width=450,height=550');
}

function MuestraPV(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=yes,resizable=yes, width=400, height=400');
}


function Muestra_Noticia(theURL) { //v1.0
  window.open(theURL,'Noticia','scrollbars=yes,resizable=yes,width=800,height=600');
}


function MuestraFoto(theURL) { //v1.0
  window.open(theURL,'Ver','scrollbars=no,resizable=no,width=350,height=365');
}

function MuestraFotoGrande(theURL) { //v1.0
  window.open(theURL,'Ver','scrollbars=no,resizable=no,width=650,height=665');
}


function MuestraObra(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=yes,resizable=yes, width=600, height=600');
}

function MuestraAviso(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=yes,resizable=yes, width=600, height=600');
}

function MuestraAvisoPeq(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=yes,resizable=yes, width=600, height=380');
}

function MuestraBusqueda(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=yes,resizable=yes, width=600, height=400');
}

function MuestraGaleria(theURL) { //v2.0
  window.open(theURL,'Ver','scrollbars=yes,resizable=yes, width=800, height=600');
}

function cerrar()
{
	 ventana = window.self;
	 ventana.opener = window.self;
	 ventana.close(); 
} 



function presImagen()
//Debe estar definido antes el array de elementos Imagenes
{
if (document.all){
	 document.getElementById('foto').filters.blendTrans.apply()
	 document.getElementById('foto').src=imagenes[cont].src
	 document.getElementById('foto').filters.blendTrans.play()
}
else
	{
	document.images.foto.src = imagenes[cont].src
	}
if (cont < imagenes.length-1)
	   	 {cont ++}
	 else
	 		 {cont=0}
 tiempo=window.setTimeout('presImagen()',5000)
}



function redireccionar() 
{
location.href=pagina;
} 

function cambiarImagen(antigua, nueva, i) {
  document.images[antigua].src=nueva[i].src;
  titulo.value	= titulos[i];
  anio.value = anios[i];	
  referencia.value  = referencias[i];	
  medida.value = medidas[i];
  precio.value = precios[i]; 
  comentario.value=comentarios[i];
  medida.value = tecnicas[i];
 }

function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
{
 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
   	// loop backwards through the versions until we find the newest version	
	for (i=25;i>0;i--) {	
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
	return (reqVer ? false : 0.0);
}


