// JavaScript Document

function setTitle(titulo) {
	document.title = titulo;
}

function setLocation(direccion) {
	document.location = direccion;
}

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}


function mostrarPopUp(enlace, width, height){  
	var layer1=document.getElementById('popupHolder');
	var layer2=document.getElementById('popup');
	
	layer1.style.visibility = 'visible';
	
	layer2.style.width = width + "px";
	layer2.style.height = height + "px";	
	layer2.style.margin = "-" + (height/2) + "px 0 0 -" + (width/2) + "px";
	
	
	layer2.style.visibility = 'visible';
	layer2.src = enlace;
}

function cerrarPopUp(){
	var layer1=document.getElementById('popupHolder');
	var layer2=document.getElementById('popup');
	
	layer1.style.visibility = 'hidden';
	layer2.style.visibility = 'hidden';
}