var divTransparente=document.getElementById('transparencia');
var divMensaje=document.getElementById('transparenciaMensaje');
var claridad=1;
var claridad_central=1;
var claridad_centralIE=100;
var claridad_preload=0;
var nombre;
var apellido;
var email;
var telefono;
var como;
var comentarios;
var temporizador;
var reg=/(^[a-zA-Z0-9._-]{1,30})@([a-zA-Z0-9.-]{1,30}$)/;
var browser=navigator.appName;
var IE;
var tam=0;
var expandido=0;
var num_activo;
var cAyuda=document.getElementById("mensajesAyuda");
var cNombre=document.getElementById("ayudaTitulo");
var	cTex=document.getElementById("ayudaTexto");
var	divTransparente=document.getElementById("transparencia");
var	divMensaje=document.getElementById("transparenciaMensaje");
var mensaje_vista=1;
var tam=0;

var	ayuda=new Array();
	ayuda["Nombre"]="Ingresa tu nombre. De 4 a 50 caracteres. OBLIGATORIO";
	ayuda["Empresa"]="Ingresa el nombre de tu Empresa. De 4 a 50 caracteres.";
	ayuda["Telefono"]="Ingresa un teléfono de contacto.";
	ayuda["Correo"]="Ingresa un e-mail válido. OBLIGATORIO";
	ayuda["Comentario"]="Ingresa tus comentarios. De 5 a 500 caracteres. OBLIGATORIO";
	
	preCarga("ok.gif", "loading.gif", "error.gif");



function validar_contacto(){
		if(document.getElementById('nombre').value=='')
			alert('Debe escribir nombre');
		else if(!reg.test(document.getElementById('email').value))
			alert('Debe escribir un email valido')
		else if(document.getElementById('telefono').value=='')
			alert('Debe escribir telefono');
		else if(document.getElementById('comentarios').value=='')
			alert('Debe escribir algun comentario');
		else{
		
		nombre=document.getElementById('nombre').value;
		email=document.getElementById('email').value;
		telefono=document.getElementById('telefono').value;
		como=document.getElementById('como').value;
		comentarios=document.getElementById('comentarios').value;
		
		limpiar();
		temporizador=setTimeout("printer2(1)",50);
		}
}

function print_form(){
	document.getElementById('central').innerHTML="<img src='images/page7_title_3.png' alt='' width='145' height='23' class='title' /><strong class='br'>Si tiene alguna duda &oacute sugrencia favor llene el siguiente fomulario y pronto nos comunicaremos con usted </strong>Para solicitud de presupuestos haga clic <a href=''>aqui</a><form id='form1'  name='form1' method='post' action='enviar_contacto.php' enctype='multipart/form-data' ><div class='form ind_top'><div class='col_box_1'>Nombre persona de Contacto:<div class='ind_form'><input id='nombre' name='nombre' type='text' /></div>E-mail:<div class='ind_form'><input id='email' name='email' type='text' /></div>Telefono:<div class='ind_form'><input id='telefono' name='telefono' type='text' /></div>Como nos conocio:<div class='ind_form'><select id='como' name='como' style='height:20px; font-size:1em; border:1px solid #7e7e7e; color:#7e7e7e;font-family:Arial;'><option value='0' selected='selected'>-</option><option value='Coffee News'>Coffee News</option><optfion value='La Web'>Web</option><option value='Un amigo'>Un amigo</option></select></div></div><div class='col_box_2'>Your message:<textarea id='comentarios' name='comentarios' cols='2' rows='2'></textarea><a href='#' class='link ind_link'  onclick='document.getElementById('form1').reset()'>Clear</a><a class='link' onclick='validar_contacto()'>Submit</a></div><div class='clear'></div></div></form>";
}

function printer(id){
	if(claridad<1){
		claridad+=.1;
		document.getElementById('central').style.opacity=claridad;
		temporizador=setTimeout("printer("+id+")",50);
		//alert(claridad);
	}
	else if(id==1){ //estamos enviado un formulario
		var myConn = new XHConn();
  		if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
	    	var peticion = function (oXML) { 
				document.getElementById("central").innerHTML =oXML.responseText; 
			};
		myConn.connect("enviar_contacto.php", "post","nombre="+nombre+"&telefono="+telefono+"&email="+email+"&como="+como+"&comentarios="+comentarios,peticion);
	}
}

function printer2(id){
	if(claridad>-0.1){
		claridad-=0.1
		document.getElementById('central').style.opacity=claridad;
		temporizador=setTimeout("printer2("+id+")",50);
	}
	else{
		document.getElementById("central").innerHTML = "<strong class='br'><img src='images/cargando.gif' >Enviando mensaje por favor espere...</strong>";	
		//document.getElementById('central').style.opacity=.9;
		temporizador=setTimeout("printer("+id+")",50);
	}
		
}

function limpiar(){
	document.getElementById('nombre').value="";
	document.getElementById('email').value="";
	document.getElementById('telefono').value="";
	document.getElementById('como').value="";
	document.getElementById('comentarios').value="";
}

/*********************formulario registro***************************************************/

function enviar_reg(){
	
	if(document.getElementById('nombre').value=='')
		alert('Debe su nombre');
	else if(document.getElementById('email').value=='')
		alert('Debe su email');
	else if(document.getElementById('apellido').value=='')
		alert('Debe su apellido');
	else if(document.getElementById('telefono').value=='')
		alert('Debe un telefono de contacto');
	else if(document.getElementById('pass').value=='')
		alert('Debe escribir algun pasword');
	else{
		claridad=.9;
		temporizador=setTimeout("printer2()",50);
	}

}

function limpiar2(){
	document.getElementById('nombre').value="";
	document.getElementById('email').value="";
	document.getElementById('apellido').value="";
	document.getElementById('telefono').value="";
	document.getElementById('pass').value="";
}

function opacar(accion){
	close_compra();
	if(claridad_central>-0.1&&browser!="Microsoft Internet Explorer"){
		document.getElementById("precargar").style.display="block";
		clearTimeout(temporizador);
		/*Buscamos el explorador*/
		claridad_central-=0.1;
		claridad_preload+=0.1;
		document.getElementById('content').style.opacity=claridad_central;
		document.getElementById('precargar').style.opacity=claridad_preload;
		temporizador=setTimeout("opacar('"+accion+"')",10);
	}
	else{
		if(accion=="contacto"){ //estamos enviado un formulario
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
				   temporizador=setTimeout("aclarar()",10);					
			};
			myConn.connect("contacto_js.php", "post","",peticion);
			
		}
		else if(accion=="hosting"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				Nifty("div#inicio","big");Nifty("div#pyme","big");Nifty("div#pro","big");Nifty("div#plus","big");Nifty("ul#hosting h3","top");Nifty("ul#hosting div","bottom same-height");
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("hosting_js.php", "post","",peticion);
			
		}
		else if(accion=="presupuesto"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar()",10);
			};
			myConn.connect("presupuesto_js.php", "post","",peticion);
			
		}
		else if(accion=="principal"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				Nifty("div#ind","big");Nifty("ul#index h3","top");Nifty("ul#index div","bottom same-height");
				FB.init("307bfddfaead8ac065064963c2db5472");
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar()",10);
			};
			myConn.connect("index_js.php", "post","",peticion);
			
		}
		
		
		else if(accion=="campana"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				Nifty("div#ind","big");Nifty("ul#index h3","top");Nifty("ul#index div","bottom same-height");
				FB.init("307bfddfaead8ac065064963c2db5472");
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar()",10);
			};
			myConn.connect("campana_js.php", "post","",peticion);
			
		}
		
		else if(accion=="criterios"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				Nifty("div#ind","big");Nifty("ul#index h3","top");Nifty("ul#index div","bottom same-height");
				FB.init("307bfddfaead8ac065064963c2db5472");
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar()",10);
			};
			myConn.connect("criterios_js.php", "post","",peticion);
			
		}
		
		else if(accion=="portafolio"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				Nifty("div.portafolio","big");
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("portafolio_js.php", "post","",peticion);
			
		}
		else if(accion=="servicios"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				Nifty("ul#split h3","top");
				Nifty("ul#split div","none same-height");
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("servicios_js.php", "post","",peticion);
			
		}
		else if(accion=="noticias"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("noticias.php", "post","",peticion);
			
		}
		else if(accion=="registrar"){ //estamos enviado un formulario
		if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("formulario_registro.php", "post","",peticion);
			
		}else if(accion=="registrar_now"){ //estamos enviado un formulario
			
			name=document.getElementById('name').value;
			apellido=document.getElementById('apellido').value;
			email2=document.getElementById('email').value;
			pais=document.getElementById('pais').value;
			provincia=document.getElementById('provincia').value;
			cel=document.getElementById('cel').value;
			local=document.getElementById('local').value;
			login_user=document.getElementById('login_user').value;
			pass_user=document.getElementById('pass_user').value;
						
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("agregar_registro_db.php", "post","name="+name+"&apellido="+apellido+"&email="+email2+"&pais="+pais+"&provincia="+provincia+"&cel="+cel+"&local="+local+"&login_user="+login_user+"&pass_user="+pass_user,peticion);
			
		}else if(accion=="recuperar"){ //estamos enviado un formulario
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
					
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("formulario_recuperar_clave.php", "post","",peticion);
			
		}else if(accion=="recuperar_now"){ //estamos enviado un formulario
			
			var emailrecuperar=document.getElementById('emailrecuperar').value;
					
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("enviar_registro_db_email.php", "post","emailrecuperar="+emailrecuperar,peticion);
			
		}
		else if(accion=="Mi cuenta"){
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("micuenta.php", "post","emailrecuperar="+emailrecuperar,peticion);	
		}
		else if(accion=="informar pago"){
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				if(oXML.responseText=="e"){
					opacar('principal');
				}
				else{
					document.getElementById("content").innerHTML =oXML.responseText;
					if (browser!="Microsoft Internet Explorer")
						temporizador=setTimeout("aclarar('"+accion+"')",10);
				}
			};
			myConn.connect("cuenta_usuario/pago_curso.php", "post","",peticion);
		}
		else if(accion=="admin"){
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("admin.php", "post","",peticion);	
		}
		else if(accion=="Modificar Registro"){
			if(browser=="Microsoft Internet Explorer")
			document.getElementById("content").innerHTML = "<br><br>Cargando... <br><p class='load'><img src='../images/loader.gif'></p><br><br><br><br><br><br><br><br><br><br><br><br>";
			var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById("content").innerHTML =oXML.responseText;
				if (browser!="Microsoft Internet Explorer")
					temporizador=setTimeout("aclarar('"+accion+"')",10);
			};
			myConn.connect("formulario_mod_registro.php", "post","",peticion);	
		}
	}

}

function aclarar(accion){
	
	if(claridad_central<1.1){
		/*Buscamos el explorador*/
		claridad_central+=0.1
		claridad_preload-=0.1;
		document.getElementById('precargar').style.opacity=claridad_preload;
		document.getElementById('content').style.opacity=claridad_central;
		temporizador=setTimeout("aclarar('"+accion+"')",5);
		
	}
	else if(accion=="hosting"){
		Nifty("div#inicio","big");Nifty("div#pyme","big");Nifty("div#pro","big");Nifty("div#plus","big");Nifty("ul#hosting h3","top");Nifty("ul#hosting div","bottom same-height");
	}
	else if(accion=="portafolio"){
		Nifty("div#porta","big");Nifty("ul#portafolio h3","top");Nifty("ul#portafolio div","bottom same-height");Nifty("div#porta2","big");Nifty("ul#portafolio2 h3","top");Nifty("ul#portafolio2 div","bottom same-height"); Nifty("th.titulo_tabla","top medium");

	}
	else if(accion=="servicios"){
		Nifty("ul#split h3","top");
		Nifty("ul#split div","none same-height");
	}
	else if(accion=="principal"){
		Nifty("div#ind","big");Nifty("ul#index h3","top");Nifty("ul#index div","bottom same-height");
	}
}

function opacarIE(accion){
	if(claridad_central>-10){
		clearTimeout(temporizador);
		claridad_centralIE-=10;
		document.getElementById("content").style.filter="alpha(opacity='"+claridad_centralIE+"')";	
		temporizador=setTimeout("opacarIE('"+accion+"')",1);
	}
}

function expandir(id,num){
	if(expandido==1){
		cerrar_anterior(id,num);
	}
	else if(tam<160){
		document.getElementById(id+num).style.display="block";
		clearTimeout(temporizador);
		tam+=10
		document.getElementById(id+num).style.height=tam+"px";
		temporizador=setTimeout("expandir('"+id+"',"+num+")");
	}
	else{
		document.getElementById(id+num).innerHTML = "Cargando... <br><p class='load'><img src='../images/loader.gif'></p>";
		expandido=1;
		num_activo=num;
		if(num==1)
			document.getElementById("logo"+num).innerHTML = " - <a href=javascript:cerrar('ventana',"+num+")>Ventajas para las empresas</a>  <img src='images/tecnostartweb_arriba.gif' width='19' height='21'>";
		else
			document.getElementById("logo"+num).innerHTML = " - <a href=javascript:cerrar('ventana',"+num+")>Ventajas para los clientes</a>  <img src='images/tecnostartweb_arriba.gif' width='19' height='21'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){ 
				document.getElementById(id+num).innerHTML =oXML.responseText;
			};
		if(num==1)
			myConn.connect("ventajas_os_empresas.php", "post","id="+id+"&num="+num,peticion);
		else if(num==2)
			myConn.connect("ventajas_os_clientes.php", "post","id="+id+"&num="+num,peticion);
	}
}

function cerrar(id,num){ 
	document.getElementById(id+num).innerHTML = "";
	if(tam>0){
		clearTimeout(temporizador);
		tam-=10
		document.getElementById(id+num).style.height=tam+"px";
		temporizador=setTimeout("cerrar('"+id+"',"+num+")",1);
	}
	else{
		document.getElementById(id+num).style.display="none";
		if(num==1)
			document.getElementById("logo"+num).innerHTML = " - <a href=javascript:expandir('ventana',1)>Ventajas para las empresas</a>  <img src='images/tecnostartweb_abajo.gif' width='19' height='21'>";
		else if(num==2)
			document.getElementById("logo"+num).innerHTML = " - <a href=javascript:expandir('ventana',2)>Ventajas para los clientes</a>  <img src='images/tecnostartweb_abajo.gif' width='19' height='21'>";

	}
}

function cerrar_anterior(id,num){
	document.getElementById(id+num_activo).innerHTML = "";
	if(tam>0){
		clearTimeout(temporizador);
		tam-=10
		document.getElementById(id+num_activo).style.height=tam+"px";
		temporizador=setTimeout("cerrar_anterior('"+id+"',"+num+")",1);
	}
	else{
		document.getElementById(id+num_activo).style.display="none";
		if(num_activo==1)
			document.getElementById("logo"+num_activo).innerHTML = " - <a href=javascript:expandir('ventana',1)>Ventajas para las empresas</a>  <img src='images/tecnostartweb_abajo.gif' width='19' height='21'>";
		else if(num_activo==2)
			document.getElementById("logo"+num_activo).innerHTML = " - <a href=javascript:expandir('ventana',2)>Ventajas para los clientes</a>  <img src='images/tecnostartweb_abajo.gif' width='19' height='21'>";
		expandido=0;
		expandir(id,num)
	}
}

function print_estado(){
	alert("valor expandido "+expandido);
	alert("valor num_activo "+num_activo);
}



function user(accion){
	
	if(accion==2){
		login=document.getElementById('login2').value;
		pass=document.getElementById('pass2').value;
	}
	else{
		login=document.getElementById('login').value;
		pass=document.getElementById('pass').value;
	}
	document.getElementById("user").innerHTML = "<br>Cargando... <img src='../images/loader.gif'>";
	var myConn = new XHConn();
    	if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
	    	var peticion = function (oXML){  
			document.getElementById("user").innerHTML = oXML.responseText;
			if(accion==2){
				open_compra("Formas de Pago");
			}
	};
	myConn.connect("validar_usuario.php", "post","login="+login+"&pass="+pass,peticion);
}

function user_logout(){
	document.getElementById("user").innerHTML = "<br>Cargando... <img src='../images/loader.gif'>";
	var myConn = new XHConn();
    	if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
	    	var peticion = function (oXML){  
			document.getElementById("user").innerHTML = oXML.responseText; 
			opacar('servicios');
	};
	myConn.connect("logout.php", "post","",peticion);
	
}


/*funciones ventanas*/
// Variables para setear

function preCarga()
{
	imagenes=new Array();
	for(i=0; i<arguments.length; i++)
	{
		imagenes[i]=document.createElement("img");
		imagenes[i].src=arguments[i];
	}
}

function nuevoAjax()
{ 
	var xmlhttp=false; 
	try 
	{ 
		// No IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e)
	{ 
		try
		{ 
			// IE 
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		catch(E) { xmlhttp=false; }
	}
	if (!xmlhttp && typeof XMLHttpRequest!="undefined") { xmlhttp=new XMLHttpRequest(); } 
	return xmlhttp; 
}

function limpiaForm()
{
	for(i=0; i<=4; i++)
	{
		form.elements[i].className=claseNormal;
	}
	document.getElementById("inputComentario").className=claseNormal;
}

function campoError(campo)
{
	campo.className=claseError;
	error=1;
}

function ocultaMensaje()
{
	divTransparente.style.display="none";
}

function muestraMensaje(mensaje)
{
	divMensaje.innerHTML=mensaje;
	divTransparente.style.display="block";
}

function eliminaEspacios(cadena)
{
	// Funcion para eliminar espacios delante y detras de cada cadena
	while(cadena.charAt(cadena.length-1)==" ") cadena=cadena.substr(0, cadena.length-1);
	while(cadena.charAt(0)==" ") cadena=cadena.substr(1, cadena.length-1);
	return cadena;
}

function validaLongitud(valor, permiteVacio, minimo, maximo)
{
	var cantCar=valor.length;
	if(valor=="")
	{
		if(permiteVacio) return true;
		else return false;
	}
	else
	{
		if(cantCar>=minimo && cantCar<=maximo) return true;
		else return false;
	}
}

function validaCorreo(valor)
{
	var reg=/(^[a-zA-Z0-9._-]{1,30})@([a-zA-Z0-9.-]{1,30}$)/;
	if(reg.test(valor)) return true;
	else return false;
}

function validaForm()
{
	limpiaForm();
	error=0;
	
	nombre=eliminaEspacios(form.inputNombre.value);
	empresa=eliminaEspacios(form.inputEmpresa.value);
	telefono=eliminaEspacios(form.inputTelefono.value);
	correo=eliminaEspacios(form.inputCorreo.value);
	comentarios=eliminaEspacios(form.inputComentario.value);
	
	if(!validaLongitud(nombre, 0, 4, 50)) campoError(form.inputNombre);
	if(!validaLongitud(empresa, 1, 4, 50)) campoError(form.inputEmpresa);
	if(!validaLongitud(telefono, 1, 4, 50)) campoError(form.inputTelefono);
	if(!validaCorreo(correo)) campoError(form.inputCorreo);
	if(!validaLongitud(comentarios, 0, 5, 500)) campoError(form.inputComentario);
	
	if(error==1)
	{
		var texto="<img src='error.gif' alt='Error'><br><br>Error: revise los campos en rojo.<br><br><button style='width:45px; height:18px; font-size:10px;' onClick='ocultaMensaje()' type='button'>Ok</button>";
		muestraMensaje(texto);
	}
	else
	{
		var texto="<img src='loading.gif' alt='Enviando'><br>Enviando. Por favor espere.<br><br><button style='width:60px; height:18px; font-size:10px;' onClick='ocultaMensaje()' type='button'>Ocultar</button>";
		muestraMensaje(texto);
		
		var ajax=nuevoAjax();
		ajax.open("POST", urlDestino, true);
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		ajax.send("nombre="+nombre+"&empresa="+empresa+"&telefono="+telefono+"&correo="+correo+"&comentarios="+comentarios);
		
		ajax.onreadystatechange=function()
		{
			if (ajax.readyState==4)
			{
				var respuesta=ajax.responseText;
				if(respuesta=="OK")
				{
					var texto="<img src='ok.gif' alt='Ok'><br>Gracias por su mensaje.<br>Le responderemos a la brevedad.<br><br><button style='width:45px; height:18px; font-size:10px;' onClick='ocultaMensaje()' type='button'>Ok</button>";
				}
				else var texto="<img src='error.gif'><br><br>Error: intente más tarde.<br><br><button style='width:45px; height:18px; font-size:10px;' onClick='ocultaMensaje()' type='button'>Ok</button>";
				
				muestraMensaje(texto);
			}
		}
	}
}

// Mensajes de ayuda

if(navigator.userAgent.indexOf("MSIE")>=0) navegador=0;
else navegador=1;

function colocaAyuda(event,pos)
{
	if(navegador==0)
	{
		var corX=window.event.clientX+document.documentElement.scrollLeft;
		var corY=window.event.clientY+document.documentElement.scrollTop;
	}
	else
	{
		var corX=event.clientX+window.scrollX;
		var corY=event.clientY+window.scrollY;
	}
	
	
	if(pos==1){
		cAyuda.style.top=corY+20+"px";
		corX=corX-500;
		cAyuda.style.left=corX+"px";
	}
	else if(pos==2){
		cAyuda.style.top=corY+20+"px";
		cAyuda.style.left=corX-100+"px";
	}
}

function ocultaAyuda()
{
	cAyuda.style.display="none";
	if(navegador==0) 
	{
		document.detachEvent("onmousemove", colocaAyuda);
		document.detachEvent("onmouseout", ocultaAyuda);
	}
	else 
	{
		document.removeEventListener("mousemove", colocaAyuda, true);
		document.removeEventListener("mouseout", ocultaAyuda, true);
	}
}

function muestraAyuda(event,campo,pos)
{
	colocaAyuda(event,pos);
	if(navegador==0) 
	{ 
		document.attachEvent("onmousemove", colocaAyuda);
		document.attachEvent("onmouseout", ocultaAyuda); 
	}
	else 
	{
		document.addEventListener("mousemove", colocaAyuda, true);
		document.addEventListener("mouseout", ocultaAyuda, true);
	}
	if(campo=="Plan promocional de paginas web"){
		cNombre.innerHTML=campo;
		cTex.innerHTML = "<br>Cargando... <img src='images/loader.gif'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				cTex.innerHTML = oXML.responseText;
				mensaje_vista=0;
		};
		myConn.connect("detalles_servicio_pagina.php", "post","login=luis&pass=1234",peticion);
		cAyuda.style.display="block";
	}
	else if(campo=="Tienda virtual"){
		cNombre.innerHTML=campo;
		cTex.innerHTML = "<br>Cargando... <img src='images/loader.gif'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				cTex.innerHTML = oXML.responseText;
				mensaje_vista=0;
		};
		myConn.connect("detalles_tienda_pagina.php", "post","",peticion);
		cAyuda.style.display="block";
	}
	else if(campo=="Hosting"){
		cNombre.innerHTML=campo;
		cTex.innerHTML = "<br>Cargando... <img src='images/loader.gif'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				cTex.innerHTML = oXML.responseText;
				mensaje_vista=0;
		};
		myConn.connect("detalles_hosting.php", "post","",peticion);
		cAyuda.style.display="block";	
	}
	else if(campo=="Publicidad en su pagina Web"){
		cNombre.innerHTML=campo;
		cTex.innerHTML = "<br>Cargando... <img src='images/loader.gif'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				cTex.innerHTML = oXML.responseText;
				mensaje_vista=0;
		};
		myConn.connect("detalles_publicidad.php", "post","",peticion);
		cAyuda.style.display="block";	
	}
	else if(campo=="Soporte Online"){
		cNombre.innerHTML=campo;
		cTex.innerHTML = "<br>Cargando... <img src='images/loader.gif'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				cTex.innerHTML = oXML.responseText;
				mensaje_vista=0;
		};
		myConn.connect("detalles_soporte.php", "post","",peticion);
		cAyuda.style.display="block";
	}
	
	
}

function soporte(){
	window.open("http://www.tswca.com/soporte/",'bank','status=yes,menubar=no,scrollbars=yes,resizable=no,height=400,width=550');
}

/*Funcion que se encarga de posicionar el div donde se desliega la forma de pago*/
function posicionar_compra(event,id,pos){
			
	if(navigator.userAgent.indexOf("MSIE")>=0) 
		navegador=0;
	else 
		navegador=1;

	if(navegador==0)
	{
		var corX=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;
		var corY=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;
	}
	else
	{
		var corX=event.clientX+window.scrollX;
		var corY=event.clientY+window.scrollY;
	}
	
	if(pos==1){
		document.getElementById("compra").style.top=corY+20+"px";
		corX=corX-500;
		document.getElementById("compra").style.left=corX+"px";
	}
	else if(pos==2){
		document.getElementById("compra").style.top=corY+20+"px";
		document.getElementById("compra").style.left=corX-100+"px";
	}
		
	document.getElementById("compra").style.display="block";	
	open_compra(id);
}
function open_compra(id){
	if(tam<150){
		tam+=10
		document.getElementById('compra').style.height=tam+"px";
		setTimeout("open_compra('"+id+"')",1);
	}
	else{
		document.getElementById("compra").innerHTML = "<br>Cargando... <img src='images/loader.gif'>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				document.getElementById("compra").innerHTML = oXML.responseText; 
		};
		if(id=="Formas de Pago")
			myConn.connect("formas_de_pago.php","post","id=15&bs=1.800,00&$=325,00&accion=pb", peticion);
		else if(id=="carrito")
			myConn.connect("formas_de_pago.php","post","id=16&bs=3.800,00&$=500,00&accion=tienda", peticion);
		else if(id=="hostingpi")
			myConn.connect("formas_de_pago.php","post","id=17&bs=168,00&$=46,00&accion=hpi", peticion);
		else if(id=="hostingpy")
			myConn.connect("formas_de_pago.php","post","id=19&bs=250,00&$=63,00&accion=hpy", peticion);	
		else if(id=="hostingpro")
			myConn.connect("formas_de_pago.php","post","id=20&bs=290,00&$=73,00&accion=hpro", peticion);				
		else if(id=="hostingplus")
			myConn.connect("formas_de_pago.php","post","id=21&bs=590,00&$=148,00&accion=hplus", peticion);				
		else if(id=="soporte")
			myConn.connect("formas_de_pago.php","post","id=18&bs=300,00&$=42,00&accion=soporte", peticion);
	}
}

function close_compra(){
	document.getElementById('compra').innerHTML="";
	if(tam>0){
		tam-=10
		document.getElementById('compra').style.height=tam+"px";
		setTimeout("close_compra()",1);
	}
	else
		document.getElementById("compra").style.display="none";	
}

/***********************FUNCIONES PARA COMPRAR************************/
function DB_comprar(id){
	document.getElementById("compra").innerHTML = "<p class='load'><img src='images/loader.gif' alt='' > Cargando...</p>"; 
	var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				document.getElementById("compra").innerHTML = oXML.responseText;
				//Sclose_compra();

	};
	myConn.connect("DB_comprar.php","post","id="+id, peticion);
}

function posicionar(event,id,funcion,preciobs,preciods){
	precio_bs=parseFloat(preciobs);
	precio_ds=parseFloat(preciods);
		
	if(navigator.userAgent.indexOf("MSIE")>=0) 
		navegador=0;
	else 
		navegador=1;

	if(navegador==0)
	{
		var corX=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;
		var corY=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;
	}
	else
	{
		var corX=event.clientX+window.scrollX;
		var corY=event.clientY+window.scrollY;
	}
	document.getElementById("compra").style.top=corY-20+"px";
	document.getElementById("compra").style.left=corX-500+"px";
	document.getElementById("compra").style.display="block";	
	if(funcion==1)
		open_pagos(id,preciobs,preciods);
	else
		open_motivo(id);
}


function open_motivo(id){
	if(tam<80){
		tam+=5
		document.getElementById('compra').style.height=tam+"px";
		setTimeout("open_motivo("+id+")",1);
	}
	else
		document.getElementById('compra').innerHTML="<font color='#AC8044' size='3' face='Century Gothic'>Ingrese el motivo por el cual fue rechazado el pago </font><textarea id='pago_motivo_texto' name='pago_motivo' style='width:380px; height:40px'></textarea><div id='pagos_rechazo'><a href='javascript:cambio_estado(0,"+id+")'>Rechazar</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:close_motivo()'>Cerrar</a></div>";
}

/*
	Funcionq ue cierra l DIV que fue crerrado de forma previa
*/

function close_motivo(){
	document.getElementById('compra').innerHTML="";
	if(tam>0){
		tam-=10
		document.getElementById('compra').style.height=tam+"px";
		setTimeout("close_motivo()",1);
	}
	else
		document.getElementById("compra").style.display="none";	
}

function open_pagos(id){
	if(tam<150){
		tam+=10
		document.getElementById('compra').style.height=tam+"px";
		setTimeout("open_pagos("+id+")",1);
	}
	else{
		document.getElementById("compra").innerHTML = "<p class='load'><img src='images/loader.gif' alt='' > Cargando...</p>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				document.getElementById("compra").innerHTML = oXML.responseText; 
		};
		myConn.connect("vista_medios_pago.php","post","id="+id, peticion);
	}
}
function formatMoneda(num, decSep, thousandSep, decLength)
{
	if(num == '') return '';
	var arg, entero, decLengthpow, sign = true;cents = '';
	if(typeof(num) == 'undefined') return;
	if(typeof(decLength) == 'undefined') decLength = 2;
	if(typeof(decSep) == 'undefined') decSep = ',';
	if(typeof(thousandSep) == 'undefined') thousandSep = '.';
	if(thousandSep == '.') arg=/\./g;
	else if(thousandSep == ',') arg=/\,/g;
	if(typeof(arg) != 'undefined') num = num.toString().replace(arg, '');
	num = num.toString().replace(/,/g,'.');
	if(num.indexOf('.') != -1)
		entero = num.substring(0, num.indexOf('.'));
	else
		entero = num;
	if(isNaN(num))
		return "0";
	if(decLength > 0)
	{
		decLengthpow = Math.pow(10, decLength);
		sign = (num == (num = Math.abs(num)));
		num = Math.round(num * decLengthpow);
		cents = num % decLengthpow;
		num = Math.floor(num / decLengthpow).toString();
		if(cents < 10)
			cents = "0" + cents;
	}
	if(thousandSep != '')
		for(var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
			num = num.substring(0, num.length - (4 * i + 3)) + thousandSep + num.substring(num.length - (4 * i + 3));
	else
		for(var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
			num = num.substring(0, num.length - (4 * i + 3)) + num.substring(num.length - (4 * i + 3));
	if(decLength > 0)
		return (((sign) ? '' : '-') + num + decSep + cents);
	else
		return (((sign) ? '' : '-') + num);
}

function onlyDigits(e, value, allowDecimal, allowNegative, decSep, thousandSep, decLength){
	var _ret = true, key;
	if(window.event) { key = window.event.keyCode; isCtrl = window.event.ctrlKey }
	else if(e) { if(e.which) { key = e.which; isCtrl = e.ctrlKey; }}
	if(key == 8) return true;
	if(isNaN(key)) return true;
	if(key < 44 || key > 57) { return false; }
	keychar = String.fromCharCode(key);
	if(decLength == 0) allowDecimal = false;
	if(!allowDecimal && keychar == decSep || !allowNegative && keychar == '-') return false;
	if(value.indexOf('-') > -1 && keychar == '-') return false;
	if(value.indexOf(decSep) > -1 && (keychar == decSep)) return false;
	return _ret;
}

function ver_ordenes(tipo_consulta){
	var ordenes=document.getElementById("ordenes").value;
	document.getElementById("central").innerHTML = "<p class='load'><img src='images/loader.gif' alt='' > Cargando...</p>"; 
	close_motivo();
	var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				document.getElementById("central").innerHTML = oXML.responseText; 
	};
	if(tipo_consulta==1)
		myConn.connect("filtro.php","post","ordenes="+ordenes, peticion);	
	else
		myConn.connect("filtro_admin.php","post","ordenes="+ordenes, peticion);	
}

function enviar_pago(id){
	var paso=0;
	var banco=document.getElementById("banco").value;
	var tipo_pago=document.getElementById("tipo_pago").value;
	var deposito=document.getElementById("deposito").value;
	var monto=parseFloat(document.getElementById("monto").value);
	
	if(banco==1&&monto>=precio_ds){
		paso=1;
	}
	else if(banco==2&&monto>=precio_bs){
		paso=1;
	}
	else if(banco==3&&monto>=precio_bs){
		paso=1;
	}
	else{
		if(tipo_pago==1)
			alert ("El monto transferido es inferior al costo del curso");
		else if(tipo_pago==2)
			alert ("El monto depositado es inferior al costo del curso");
	}
	
	if(paso==1){
		document.getElementById("pago"+id).innerHTML = "<p class='load'><img src='images/loader.gif' alt='' > Cargando...</p>"; 
		close_motivo();
		var myConn = new XHConn();
				if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
					var peticion = function (oXML){  
					document.getElementById("pago"+id).innerHTML = oXML.responseText; 
		};
		myConn.connect("enviar_pago.php","post","banco="+banco+"&tipo_pago="+tipo_pago+"&deposito="+deposito+"&monto="+monto+"&id="+id, peticion);	
	}
}

/***********CODIGO DE LA PARTE ADMINISTRATIVA*******************/
function cambio_estado(estado,id){
	if(estado==1){
		if(tam>0)
			close_motivo();
			
		document.getElementById("pago"+id).innerHTML = "<p class='load'><img src='images/loader.gif' alt='' > Cargando...</p>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				document.getElementById("pago"+id).innerHTML = oXML.responseText; 
		};
		myConn.connect("cambio_estado.php","post", "estado="+estado+"&id="+id, peticion);
	}
	else if(document.getElementById("pago_motivo_texto").value==""){
		alert("Debe ingresar el motivo por el cual fue rechazado el pago ");
	}
	else{
		motivo=document.getElementById("pago_motivo_texto").value;
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){  
				document.getElementById("pago"+id).innerHTML = oXML.responseText; 
		};
		myConn.connect("cambio_estado.php","post", "estado="+estado+"&id="+id+"&motivo="+motivo, peticion);
		close_motivo();
	}
}
function historial_pago(event,id){
	if(navigator.userAgent.indexOf("MSIE")>=0) 
		navegador=0;
	else 
		navegador=1;

	if(navegador==0)
	{
		var corX=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;
		var corY=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;
	}
	else
	{
		var corX=event.clientX+window.scrollX;
		var corY=event.clientY+window.scrollY;
	}
	document.getElementById("compra").style.top=corY-20+"px";
	document.getElementById("compra").style.left=corX-500+"px";
	document.getElementById("compra").style.display="block";	
	open_historial(id);				
}

function open_historial(id){
	if(tam<80){
		tam+=5
		document.getElementById('compra').style.height=tam+"px";
		setTimeout("open_historial("+id+")");
	}
	else{
		document.getElementById("compra").innerHTML = "<p class='load'><img src='images/loader.gif' alt='' > Cargando...</p>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){
				contenido="<font color='#AC8044' size='3' face='Century Gothic'>Ultimo motivo por el cual fue rechazado el pago</font><textarea id='pago_motivo_texto' name='pago_motivo' style='width:380px; height:40px'>";
				contenido+=oXML.responseText;
				contenido+="</textarea><div id='pagos_rechazo'><a href='javascript:close_motivo()'>Cerrar</a></div>";
				document.getElementById("compra").innerHTML = contenido; 
		};
		myConn.connect("historial_pago.php","post","id="+id, peticion);
	}
}

function validar_mod_datos(){
	
		name=document.getElementById('name').value;
		apellido=document.getElementById('apellido').value;
		email=document.getElementById('email').value;
		email2=document.getElementById('email2').value;
		pais=document.getElementById('pais').value;
		provincia=document.getElementById('provincia').value;
		cel=document.getElementById('cel').value;
		local=document.getElementById('local').value;
		login_user=document.getElementById('login_user').value;
		pass_user=document.getElementById('pass_user').value;
		pass2=document.getElementById('pass2').value;
		
		if(name==""){
			alert("El nombre no puede estar vacio");
			return false;
		}
		else if(apellido==""){
			alert("El apellido no puede estar vacio");
			return false;
		}
		else if(email==""){
			alert("Debe escribir una e-mail valido");
			return false;
		}
		else if(email!=email2){
			alert("El campo repetir e-mail debe ser igual al campo e-mail");
			return false;
		}
		else if(cel==""&&local==""){
			alert("Debe de escribir al menos un telefono celular");
			return false;	
		}
		else if(pass_user!=pass2){
			alert("Los campos Password y Repetir Password deben ser iguales");
			return false;	
		}
		opacar("Mi cuenta");
		document.getElementById("compra").innerHTML = "<p class='load'> Cargando... <img src='images/loader.gif' alt=''></p>";
		var myConn = new XHConn();
			if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
				var peticion = function (oXML){
				alert("Datos modificados con exito");
			};
		myConn.connect("modificar_registro_db.php", "post","name="+name+"&apellido="+apellido+"&email="+email2+"&pais="+pais+"&provincia="+provincia+"&cel="+cel+"&local="+local+"&login_user="+login_user+"&pass_user="+pass_user,peticion);
}

function Ver_registro2(){
	document.getElementById("V_email").innerHTML = "Validando email ...";
	var myConn = new XHConn();
		if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
			var peticion = function (oXML){  
			document.getElementById("V_email").innerHTML = oXML.responseText; 
	};
	myConn.connect("V_email.php","post", "email="+document.getElementById("email").value, peticion);
	
}

function Ver_registro(){
	document.getElementById("V_titulo").innerHTML = "Validando login ...";
	var myConn = new XHConn();
		if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
			var peticion = function (oXML){  
			document.getElementById("V_titulo").innerHTML = oXML.responseText; 
	};
	myConn.connect("V_registro.php","post", "login_user="+document.getElementById("login_user").value, peticion);
	
}

function phponline(){
		window.open("http://www.tswca.com/images/phponline_vivo.PNG",'bank','status=yes,menubar=no,scrollbars=yes,resizable=no,height=1276,width=344');

}