//inicio
var color = 0;
var suma = 10;
function aparecer(){
	var obj = document.getElementById('escondido');
	obj.style.display = "block";
	color += suma;
	if (!(color>=110)){
		obj.style.filter = 'alpha(opacity='+color+')';
		 obj.style.opacity = color /100;
		 obj.style.MozOpacity = color /100;
		 obj.style.KHTMLOpacity = color /100;
		window.setTimeout ("aparecer();", 10);
	}
}
function desvanecer() {
	var obj2 = document.getElementById('escondido');
	color -= suma;
	if (!(color <=-10)){
		obj2.style.filter = 'alpha(opacity='+color+')';
		obj2.style.opacity = color /100;
		obj2.style.MozOpacity = color /100;
		obj2.style.KHTMLOpacity = color /100;
		window.setTimeout ("desvanecer();", 10);
	}
}

function boton(f,o){
	document.getElementById(f).src = o;
	return;
}
function showdiv(event,texto)
{
	//La variable IE determina si estamos utilizando IE
	var IE = document.all?true:false;
	//Si no utilizamos IE capturamos el evento del mouse
	if (!IE) document.captureEvents(Event.MOUSEMOVE)

	var tempX = 0;
	var tempY = 0;

	if(IE)
	{ //para IE
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
	}else{ //para netscape
		tempX = event.pageX;
		tempY = event.pageY;
	}
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}
	//k = "<img src='image/fachadaTiopoldo.jpg' alt='tio poldo' width='180' height='115'>"
	//modificamos el valor del id "posicion" para indicar la posicion del mouse
	document.getElementById('flotante').innerHTML="Click para ver imagen";
	document.getElementById('flotante').style.top = (tempY+10)+"px";
	document.getElementById('flotante').style.left = (tempX+20)+"px";
	document.getElementById('flotante').style.display='block';
	return;
}
function enviames() {
	document.form2.submit()
}
function comprobar() {
	ok = false;
	if ((document.form1.Email.value == "") && (document.form1.Telefono.value == "" )) {
		alert ("ATENCION, es necesario que indique o E-MAIL o TELEFONO");
	} else {
		ok = true;
	}
	if (document.form1.Nombre.value == ""){
		 alert ("ATENCION, es necesario que indique un Nombre");
	} else { 
		ok = true;
	}
	//if (ok=true){
	//	document.form1.submit();
	//} else {
	//	alert("Algun dato es incorrecto");
	//}
	return ok
}
function vacio(q) {  
         for ( i = 0; i < q.length; i++ ) {  
                 if ( q.charAt(i) != " " ) {  
                         return true  
                 }  
         }  
         return false  
 }  
   
 //valida que el campo no este vacio y no tenga solo espacios en blanco  
 function valida(F) {  
           
         if( vacio(F.Email.value) == false ) {  
                 alert("Introduzca un cadena de texto.")  
                 return false  
         } else {
		 	if ( vacio(F.Telefono.value) == false ) {  
					 alert("Introduzca un cadena de texto.")  
					 return false
			}
			return true
         }  
 }
function banner(k){
	//var url = "pedidok.asp?pedido="+orden+"&importe="+total+"&transaccion="+transaccion+"&neto="+importe;
	window.location.href = k;
}
