// JavaScript Document
function preCarga(imagenes) {
	var i; 
	var lista_imagenes = new Array();

	for(i in imagenes){ 
		lista_imagenes[i] = new Image(); 
		lista_imagenes[i].src = imagenes[i];
	}
}

function cambiarImagen(vObj,vImagen){
	vObj.src=vImagen;
}

function cambiarFondo(vObj,vImagen){
	vObj.style.backgroundImage="url('"+vImagen+"')";
}

function miAjax(){
	var xmlhttp=false;
	var ajaxs = ["Msxml2.XMLHTTP","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"];
	
	for(var i=0 ; !xmlhttp && i<ajaxs.length ; i++){
		try{
			xmlhttp = new ActiveXObject(ajaxs[i]);
		}catch(e){
			xmlhttp = false;
		}
	}

	if(!xmlhttp && typeof XMLHttpRequest!='undefined'){
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function vAncho(){
  var tamanio = 0;
  if (typeof window.innerWidth != 'undefined'){
    	tamanio = window.innerWidth;
  }else if (typeof window.offsetWidth != 'undefined'){
	  tamanio = window.offsetWidth;
  }else if (typeof document.documentElement != 'undefined'
      && typeof document.documentElement.clientWidth !=
      'undefined' && document.documentElement.clientWidth != 0){
 		tamanio = document.documentElement.clientWidth;
  }else{
    	tamanio = document.getElementsByTagName('body')[0].clientWidth;
  }
  return tamanio;
}

function vAlto(){
  var tamanio =0;
  if (typeof window.innerHeight != 'undefined'){
    tamanio = window.innerHeight;
  }else if (typeof window.offsetHeight != 'undefined'){
	  tamanio = window.offsetHeight;
  }else if (typeof document.documentElement != 'undefined'
      && typeof document.documentElement.clientHeight !=
      'undefined' && document.documentElement.clientHeight != 0){
 	tamanio = document.documentElement.clientHeight;
  }else{
    tamanio = document.getElementsByTagName('body')[0].clientHeight;
  }
  return tamanio;
}

function quitarPX(valor){
	var miPX = "px";
	var miValor = valor;
	miValor=miValor.replace(miPX,'');
	return miValor;
}

function xDes(objeto){
	objeto.style.display="none";
}

function xApa(objeto){
	objeto.style.display="block";
}


// ******************************************************************
// ******************************************************************
