function submitformcontacto(){

	var email=document.getElementById('TEmail').value;
	var observaciones=document.getElementById('TObservaciones').value;

	if(document.getElementById('TNombre').value==''){
		alert('Por favor facilitenos su nombre');
		document.getElementById('TNombre').focus();
		return false;

	}

	if(email.indexOf('@',0) == -1){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;

	}

	if(email.indexOf('.',0) == -1){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;

	}

	if(email.length <7){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;
	}
	
    var sXMLSrc = '/Xml/AspMail/XMLSendEmail.asp'
    var valores = '?Nombre=' + document.getElementById('TNombre').value + '&Email=' + email + '&Observaciones=' + observaciones
    GetxmlField(sXMLSrc + valores);


}

function submitformdemosoft(){

	var email=document.getElementById('TEmail').value;

	if(document.getElementById('TNombre').value==''){
		alert('Por favor facilitenos su nombre');
		document.getElementById('TNombre').focus();
		return false;

	}

	if(email.indexOf('@',0) == -1){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;

	}

	if(email.indexOf('.',0) == -1){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;

	}

	if(email.length <7){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;
	}
	
    var sXMLSrc = '/Xml/EFXDemo/Sugerencia.asp'
    var valores = '?empresa=' + document.getElementById('TNombre').value + '&Email=' + email
    GetxmlField(sXMLSrc + valores);


}


function fecha(){
	fecha = new Date()
	mes = fecha.getMonth()
	diaMes = fecha.getDate()
	diaSemana = fecha.getDay()
	anio = fecha.getFullYear()
	dias = new Array('Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sábado')
	meses = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre')
	document.write('<span id="fecha">')
	document.write (dias[diaSemana] + ", " + diaMes + " de " + meses[mes] + " de " + anio)
	document.write ('</span>')
}

function getFormDemoTiadSoft(){

    var sXMLSrc = '/Xml/EFXDemo/GetDemoForm.asp'
    GetxmlField(sXMLSrc);
}

function submitformemail(){

	var email=document.getElementById('TEmail').value;

	if(document.getElementById('TFile').value==''){
		alert('Por favor facilitenos su fichero');
		document.getElementById('TFile').focus();
		return false;

	}

	if(email.indexOf('@',0) == -1){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;

	}

	if(email.indexOf('.',0) == -1){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;

	}

	if(email.length <7){
		alert('E-Mail no valido');
		document.getElementById('TEmail').focus();
		return false;
	}
	
    var sXMLSrc = '/Xml/AspMail/XMLSendEmailCamp.asp'
    var valores = '?File=' + document.getElementById('TFile').value + '&Email=' + email + '&Observaciones=' + document.forms('WorkForm').TObservaciones.value
    GetxmlField(sXMLSrc + valores);


}

	function OnSubmitLogin(){
		var user = document.getElementById('txtUser').value
		var pass = document.getElementById('txtPass').value
		if(user.length>0 && pass.length>0){
		    
		    //var mitd = document.getElementById('tdiform');
			document.frmOutputLogin.h_User.value = document.getElementById('txtUser').value;
			document.frmOutputLogin.h_Pass.value = document.getElementById('txtPass').value;
			document.frmOutputLogin.hddRememberUser.value = document.getElementById('chkRememberUser').checked ? 'true' : 'false';
			//document.frmOutputLogin.AvailWidth.value = screen.availWidth;
			//document.frmOutputLogin.AvailHeight.value = screen.availHeight;
			document.frmOutputLogin.method='post';
			document.frmOutputLogin.action='/prueba.asp';
			//alert(document.frmOutputLogin.action);
			document.frmOutputLogin.submit();
			//mitd.innerHTML='' //<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" id="table1"><tr><td align="center" valign="top"><div style=" width: 526px; height: 399px; z-index: 1; left:387px; top:131px" class="load" align="center">&nbsp;<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" id="table2"><tr><td>&nbsp;<p align="center"><img border="0" src="/img/tiadsoft/ajax-loader.gif" /></p></td></tr></table></div></td></tr></table>';
		    //mitd.className = 'loading'
		  }
		return false;
	}

function getAccesoEcontaweb(){
    var sXMLSrc = '/Xml/Econtaweb/GetCliente.asp?empresa=ES' + document.getElementById('txtUser').value + '&Password=' + document.getElementById('txtPass').value
    GetxmlField(sXMLSrc);
}


