
function ocultamenu(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	menu1.style.display = "none";
	menu2.style.display = "none";
	menu3.style.display = "none";
	}

function ocultamenu1(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	menu2.style.display = "none";
	menu3.style.display = "none";
	}

function ocultamenu2(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	menu1.style.display = "none";
	menu3.style.display = "none";
	}

function ocultamenu3(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	menu1.style.display = "none";
	menu2.style.display = "none";
	}

function despliega1(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	if(menu1.style.display == "none"){
		menu1.style.display = "block";
		menu2.style.display = "none";
		menu3.style.display = "none";
		}
		else{
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			}
		}

function despliega2(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	if(menu2.style.display == "none"){
		menu1.style.display = "none";
		menu2.style.display = "block";
		menu3.style.display = "none";
		}
		else{
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			}
		}

function despliega3(){
	var menu1 = document.getElementById("producto");
	var menu2 = document.getElementById("otroproducto");
	var menu3 = document.getElementById("areacomercial");
	if(menu3.style.display == "none"){
		menu1.style.display = "none";
		menu2.style.display = "none";
		menu3.style.display = "block";
		}
		else{
			menu1.style.display = "none";
			menu2.style.display = "none";
			menu3.style.display = "none";
			}
		}


// funciones de precarga

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//comprobar formulario solicitud información

function comprobar_infor() {

	var empresa=infor.empresa.value;
	var nombre=infor.nombre.value;
	var domi=infor.domicilio.value;
	var postal=infor.postal.value;
	var pobla=infor.poblacion.value;
	var provi=infor.provincia.value;
	var mail=infor.mail.value;
	var tfno=infor.telefono.value;
 	var comentario=infor.comentario.value;
	var msg='Los campos marcados  con " * "  son de obligada cumplimentación';

	if(empresa=="") {
		alert(msg);
		infor.empresa.focus();
		}
		else {
			if(nombre=="") {
				alert(msg);
				infor.nombre.focus();
				}
				else {
					if(domi=="") {
						alert(msg);
						infor.domicilio.focus();
						}
						else {
							if(postal=="") {
								alert(msg);
								infor.postal.focus();
								}
								else {
									if(pobla=="") {
										alert(msg);
										infor.poblacion.focus();
										}
										else {
											if(provi=="") {
												alert(msg);
												infor.provincia.focus();
												}
												else {
													if(mail=="") {
														alert(msg);
														infor.mail.focus();
														}
														else {
															if(tfno=="") {
																alert(msg);
																infor.telefono.focus();
																}
																else {
																	if(comentario=="") {
																		alert("¡ No ha realizado ninguna consulta !");
																		infor.comentario.focus();
																		}
																		else {
																			if(infor.mail.value.indexOf('@',0)==-1 || infor.mail.value.indexOf('.',0)==-1) {
																				alert("Dirección Email incorrecta");
																				infor.mail.focus();
																				}
																				else {
																					infor.action="mailto:comercial@syssa.com";
																					infor.submit();
																					}
																			}
																	}				
															}
													}
											}
									}
							}
					}
			}
	}


//comprobar formulario pedido

function compruebapdo() {
var MSG;
MSG="es un campo obligatorio"

if (datos.cantidad1.value>0){
	if (datos.precio1.value =="") {
	datos.precio1.value=0;
	}
	if (datos.dto1.value=="") {
	datos.dto1.value=0;
	}
}

if (datos.cantidad2.value>0){
	if (datos.precio2.value =="") {
	datos.precio2.value=0;
	}
	if (datos.dto2.value=="") {
	datos.dto2.value=0;
	}
}

if (datos.cantidad3.value>0){
	if (datos.precio3.value =="") {
	datos.precio3.value=0;
	}
	if (datos.dto3.value=="") {
	datos.dto3.value=0;
	}
}

if (datos.cantidad4.value>0){
	if (datos.precio4.value =="") {
	datos.precio4.value=0;
	}
	if (datos.dto4.value=="") {
	datos.dto4.value=0;
	}
}

if (datos.cantidad5.value>0){
	if (datos.precio5.value =="") {
	datos.precio5.value=0;
	}
	if (datos.dto5.value=="") {
	datos.dto5.value=0;
	}
}

if (datos.cantidad6.value>0){
	if (datos.precio6.value =="") {
	datos.precio6.value=0;
	}
	if (datos.dto6.value=="") {
	datos.dto6.value=0;
	}
}

if (datos.cantidad7.value>0){
	if (datos.precio7.value =="") {
	datos.precio7.value=0;
	}
	if (datos.dto7.value=="") {
	datos.dto7.value=0;
	}
}

if (datos.cantidad8.value>0){
	if (datos.precio8.value =="") {
	datos.precio8.value=0;
	}
	if (datos.dto8.value=="") {
	datos.dto8.value=0;
	}
}

if (datos.cantidad9.value>0){
	if (datos.precio9.value =="") {
	datos.precio9.value=0;
	}
	if (datos.dto9.value=="") {
	datos.dto9.value=0;
	}
}

if (datos.cantidad10.value>0){
	if (datos.precio10.value =="") {
	datos.precio10.value=0;
	}
	if (datos.dto10.value=="") {
	datos.dto10.value=0;
	}
}

	if (datos.empresa.value=="") {
		alert("Empresa "+MSG);
		datos.empresa.focus();
		}
		else{
			if (datos.solicitante.value=="") {
				alert("Solicitante "+MSG);
				datos.solicitante.focus();
				}
				else{
					if (datos.email.value=="") {
					alert("Correo electronico "+MSG);
					datos.email.focus();
					}
					else{
					datos.action="enviaPedido.asp"
					datos.submit();
				}
			}
		}
	}


//comprobar formulario oferta

function compruebaOfe() {
var MSG;
MSG="es un campo obligatorio"

	if (datos.empresa.value=="") {
		alert("Empresa "+MSG);
		datos.empresa.focus();
		}
		else{
			if (datos.solicitante.value=="") {
				alert("Solicitante "+MSG);
				datos.solicitante.focus();
				}
				else{
					if (datos.email.value=="") {
					alert("Correo electronico "+MSG);
					datos.email.focus();
					}
					else{
					datos.action="enviaOferta.asp"
					datos.submit();
				}
			}
		}
	}





//cambio color submenu catalogo

function cambio_P0(){
	P0.style.background="olive";
	P0.style.color="white";
	}

function recambio_P0(){
	P0.style.background="white";
	P0.style.color="olive";
	}

function cambio_P1(){
	P1.style.background="olive";
	P1.style.color="white";
	}

function recambio_P1(){
	P1.style.background="white";
	P1.style.color="olive";
	}

function cambio_P2(){
	P2.style.background="olive";
	P2.style.color="white";
	}

function recambio_P2(){
	P2.style.background="white";
	P2.style.color="olive";
	}

function cambio_P3(){
	P3.style.background="olive";
	P3.style.color="white";
	}

function recambio_P3(){
	P3.style.background="white";
	P3.style.color="olive";
	}

function cambio_P4(){
	P4.style.background="olive";
	P4.style.color="white";
	}

function recambio_P4(){
	P4.style.background="white";
	P4.style.color="olive";
	}

function cambio_P5(){
	P5.style.background="olive";
	P5.style.color="white";
	}

function recambio_P5(){
	P5.style.background="white";
	P5.style.color="olive";
	}

function cambio_P6(){
	P6.style.background="olive";
	P6.style.color="white";
	}

function recambio_P6(){
	P6.style.background="white";
	P6.style.color="olive";
	}
