function nuevoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");  		// Creaci�n del objeto ajax para navegadores diferentes a Explorer
	} catch (e) {
		try {								// o bien
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");		// Creaci�n del objeto ajax para Explorer
		} catch (E) {
			xmlhttp = false;
		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function obtenerTalla(event,id_producto){
	if(event.value!=""){
		ajax2=nuevoAjax();
		ajax2.open("GET", "cargar_combo.php?tabla=talla&id="+event.value+"&prod="+id_producto);
		ajax2.onreadystatechange=function() {
		   if (ajax2.readyState==4) {
				document.getElementById("tallaColor").innerHTML=ajax2.responseText;
				document.getElementById("tallaColor").style.display="";
		   }
		}
		ajax2.send(null);
	}else{
		document.getElementById("tallaColor").style.display="none";
		document.frmCestaAgregar.cmbTalla.value="";
	}
}
function loginProfesional(){
		ajax2=nuevoAjax();
		ajax2.open("GET", "login.php?email="+document.frmLogin.txtEmail.value+document.frmLogin.txtEmail.value);
		ajax2.onreadystatechange=function() {
		   if (ajax2.readyState==4) {
				document.getElementById("tallaColor").innerHTML=ajax2.responseText;
				document.getElementById("tallaColor").style.display="";
		   }
		}
		ajax2.send(null);
}

function flashEstudio(id,ruta_v){
	clearInterval(iTemp);
	var flashvars = {};
	var params = {wmode: 'transparent' };
	var attributes = {};
	
	swfobject.embedSWF('flash/imagenes.swf?ruta='+ruta_v, 'imagenFlash', '923', '295', '9.0.0', 'flash/expressInstall.swf', flashvars, params, attributes);
	
	if(id!=""){
		document.getElementById(aux_estudio).className="listaProyectoElemento";
		document.getElementById(id).className="listaProyectoElementoSeleccionado";
		if(id!=""){
			aux_estudio=id;
			aux_ruta=ruta_v;	
		}
	}
	iTemp=setInterval("flashEstudio(vectorIdEstudio[contadorVector],vectorRutaEstudio[contadorVector])",5000);
	contadorVector++;
	if(contadorVector>totalEstudio-1){
		contadorVector=0;
	}
}
function capturarTeclaLogin(evento){
	switch(evento.keyCode){
		case 13:
		validarLogin();
		break;
	}
}


