document.oncontextmenu=new Function("return false")

function agregaFavoritos() {
 var url="http://www.gvilafranca.com"
 var title="Griferia Vilafranca, S.L."
 if(window.external)  window.external.AddFavorite(url,title)
 else if(navigator.appName=="Netscape") alert("Pulsa Control+D para a&ntilde;adir esta web a los bookmarks")
}
function precarga() {
 ims = new Array()
 for(var i=0; i<arguments.length; i++) {
  ims[i] = new Image()
  ims[i].src = arguments[i]}
}
function abreHtm(url,anch,alt_) {var f0="resizable=yes,left=0,top=0, scrollbars=yes";
  if(!anch || anch>screen.availWidth-100) ancho=",width="+(screen.availWidth-100);
    else ancho=",width="+anch
  if(!alt_ || alt_>screen.availHeight-29) alto=",height="+(screen.availHeight-29); 
    else alto=",height="+alt_
  var feat=f0+ancho+alto
  pop= window.open(url,'',feat);
  pop.resizeBy(140,30);
}
function aireador(num) {
air=new Array('H22','M18','M24x1','M28x1')
return air[num]
}
function cartucho(num) {
car=new Array('Montura cer&aacute;mica 90&deg;','Montura 1/2','Cartucho cer&aacute;mico &Oslash; 25 fijo','Cartucho cer&aacute;mico &Oslash; 35 fijo','Cartucho cer&aacute;mico &Oslash; 40 fijo','Cartucho cer&aacute;mico &Oslash;35 Joystick','Cartucho termost&aacute;tico (temp.)<br />&nbsp;&nbsp;Montura cer&aacute;mica 90&deg; (caudal)')
return car[num]
}
function complementos(val) {
com=new Array()
com['a']="<li>Flexo 1,75m</li><li>Mango de ducha &eacute;poca</li><li>Soporte &eacute;poca</li><li>2 Bolsa flor&oacute;n y exc&eacute;ntrica</li><li style='list-style-type:square;font-style:italic'>Complementos del mismo color"
com['b']="<li>Flexo 1,75m</li><li>Mango de ducha cil&iacute;ndrico</li><li>Soporte cil&iacute;ndrico</li><li>2 Bolsa flor&oacute;n y exc&eacute;ntrica"
com['c']="<li>Base</li><li>Anclaje</li><li>Juego de latiguillos</li><li>V&aacute;lvula click"
com['e']="<li>Flexo 1,50m con plomo</li><li>Mango de ducha 2 funciones</li><li>Anclaje</li><li>Juego de latiguillos"
com['f']="<li>Flor&oacute;n 1/2"
com['j']="<li>Conjunto sujeci&oacute;n"
com['k']="<li>Base</li><li>Anclaje</li><li>Juego de latiguillos"
com['l']="<li>Anclaje</li><li>Juego de latiguillos"
com['m']="<li>Flexo 1,75m</li><li>Mango ducha 2 funciones</li><li>Soporte Combi</li><li>2 Bolsa flor&oacute;n y exc&eacute;ntrica"
com['o']="<li>Flexo 1,75m</li><li>Mango ducha Jazm&iacute;n (5 funciones)</li><li>Soporte Combi</li><li>2 Bolsa flor&oacute;n y exc&eacute;ntrica"
com['p']="<li>2 Bolsa flor&oacute;n y exc&eacute;ntrica"
com['s']="<li>Flexo 1,5m PVC Blanco</li><li>Mango de ducha blanco</li><li>Soporte c&oacute;nico blanco</li><li>2 Bolsa flor&oacute;n y exc&eacute;ntrica"
com['t']=com['m']+"</li><li>2 Filtro exc&eacute;ntrica"
com['v']="<li>Flexo 1,75m</li><li>Mango de ducha cromo</li><li>Soporte</li><li>2 Bolsa exc&eacute;ntrica y flor&oacute;n"
com['z']="<li>Flexo 1,75m</li><li>Mango de ducha cuadrado</li><li>Soporte cuadrado</li><li>2 Bolsa flor&oacute;n cuadrado y exc&eacute;ntrica"
com['E']=com['e']+"</li><li>Tubo conexi&oacute;n a flexo y tuerca"
com['K']="kit:<li>Mango de ducha</li><li>Barra deslizante &oslash;25mm (Ref. 1010)</li><li>Flexo lat&oacute;n 1,75m"
com['S']=com['v']+" cuadrado"
com['Z']=com['z']+"</li><li>Filtro exc&eacute;ntrica"
com['0']="<li>Conjunto sujeci&oacute;n</li><li style='list-style-type:square;font-style:italic'>2 por caja: agua fr&iacute;a y agua caliente</li><li style='list-style-type:square;color:red'>P.V.P. por unidad"
com['1']="<li>Barra lat&oacute;n cromado con soporte</li><li>Inversor</li><li>Duch&oacute;n cuadrado con racor</li><li>Soporte pared</li><li>Flexo 0,5m</li><li>Flexo 1,7m</li><li>Mango Zeta cromo"
com['2']="<li>Barra lat&oacute;n cromado con soporte</li><li>Inversor</li><li>Duch&oacute;n redondo con racor</li><li>Soporte pared</li><li>Flexo 0,5m</li><li>Flexo 1,7m</li><li>Mango Boss cromo"
com['3']="<li>Barra lat&oacute;n cromo</li><li>Ducha termost&aacute;tica</li><li>2 Bolsa flor&oacute;n y exc&eacute;ntrica</li><li>Duch&oacute;n redondo con racor</li><li>Inversor</li><li>Flexo 1,7m</li><li>Mango Salvia"
com['4']="<li style='list-style-type:square;font-style:italic'>2 por caja: agua fr&iacute;a y agua caliente</li><li style='list-style-type:square;color:red'>P.V.P. por unidad"
com['5']=com['f']+"</li><li style='list-style-type:square;font-style:italic'>2 por caja (agua fr&iacute;a)</li><li style='list-style-type:square;color:red'>P.V.P. por unidad"
com['6']="<li>Latiguillos 1/2</li><li>Conjunto sujeci&oacute;n ca&ntilde;o</li><li>2 Conjunto sujeci&oacute;n llave lateral"
com['7']=com['f']+"</li><li style='list-style-type:square;font-style:italic'>2 por caja: agua fr&iacute;a y agua caliente</li><li style='list-style-type:square;color:red'>P.V.P. por unidad"
com['9']="<li>Barra lat&oacute;n cromo</li><li>Ducha termost&aacute;tica</li><li>2 Bolsa flor&oacute;n cuadrado y exc&eacute;ntrica</li><li>Duch&oacute;n cuadrado con racor</li><li>Inversor</li><li>Flexo 1,7m</li><li>Mango Zeta"
return com[val]
}
function ventana(imag,C,CO,CM,BC,nR,vR,msg,props) { //v4.0 2008
var talt="", dim=true; iurl=(imag.length==5)?imag:imag.slice(imag.length-5), durl=imag+".gif", color=new Array()
if(props!="nnn") {var aired=(props.substring(0,1)!="n"), cartu=(props.substring(1,2)!="n"),propis=(props.substring(2)!="n"), tabla2=true
 if(aired) var aire=aireador(props.substring(0,1))
 if(cartu) var cart=cartucho(props.substring(1,2))
 if(propis) {
	var comp=complementos(props.substring(2))
	if(comp&&comp.indexOf('kit')==0) {dim=false; durl="kits.gif"}
 }
}
for(var i=0; i<document.images.length; i++)			//Toma el texto alternativo de la imagen en doc pral.
	{if(document.images[i].src.indexOf(iurl)!=-1) talt=document.images[i].alt} 
if(talt=="" || msg.indexOf('alt=')!=-1) {talt=msg.slice(msg.indexOf('alt=')+4); msg=msg.substring(0,msg.indexOf('alt='))}
img1=new Image(); img1.src=imag+".jpg"; img2=new Image(); img2.src=imag+".gif"

if(imag.length == 5) var titulo=":: GV :: "+imag.substring(0,2)+"."+imag.substring(2)
 else {var titulo=":: GV :: "+msg; msg=""}
if(msg) {if(msg.indexOf('tit=')!=-1) {titulo=":: GV :: "+msg.substring(msg.indexOf('tit=')+4,msg.indexOf('=;')); msg=""}}
var cs=new Array(), cv=new Array(); num=0
color['C']='CROMO'; color['CO']='CROMO ORO'; color['BC']='BLANCO CROMO'; color['BO']='BLANCO ORO'; color['BRA']='BRASIL'; color['CM']='CROMO MATE'; color['CB']='COBRE'; color['BR']='BRONCE'; color['TF']='TIERRA FRANCIA'; color['kit']='Kit Cromo'
cs[num]="C"; cv[num++]=C
if(CO) {cs[num]="CO"; cv[num++]=CO}
if(CM) {cs[num]="CM"; cv[num++]=CM}
if(BC) {cs[num]="BC"; cv[num++]=BC}
if(nR) {
	switch(nR) {
		case "CB": cs[num]="BR"; cv[num]=vR; cs[++num]="CB"; cv[num++]=vR; break;	//si nR=BR -> BR=CB
		case "BRA": cs[num]="TF"; cv[num]=vR; cs[++num]="BRA"; cv[num++]=vR; break;	//si nR=BRA -> TF=BRA
		case "kit": cs[num]=nR; cv[num++]=vR; color['C']='Mango antical cromo'; cs[0]=imag; color[imag]='Mango cromo'; cs[1]=parseInt(imag)+11; color[parseInt(imag)+11]='kit cromo'; break;
		default: cs[num]=nR; cv[num++]=vR;
	}
}
var ancho=img1.width+40, alto=img1.height+22*num+114
if(tabla2) ancho+=220
var pos=talt.indexOf('.'), ntalt=talt
if(pos!=-1) {ntalt=talt.substring(0,pos)+'<br />'+talt.slice(pos+1); alto+=10}
var feat="resizable,left=0,top=0,scrollbars=auto,"
 if(alto>=screen.availHeight-27) feat+="scrollbars=yes,height="+(screen.availHeight-27)+",width="+(ancho+20)
 else feat+="width="+ancho+",height="+alto
if(nR&&nR=='kit') dim=false
pop=window.open('','',feat); pop.document.open()
pop.document.write('<!--[if !IE]><?xml version="1.0" encoding="UTF-8"?><![endif]--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><head><title>'+titulo+'<\/title><link rel="stylesheet" type="text/css" href="../comunes/he.css" /></head><body style="padding-top:5px; background-image:url(../comunes/f2.jpg)">');
//pop.document.body.style.background="white url(../comunes/f2.jpg)"
if(tabla2) {
	pop.document.write('<div id="pop2" style="float:right">');
	if(dim) pop.document.write('<img src="'+durl+'" alt="'+titulo.slice(9)+'" width="200" onmouseover="return false" oncontextmenu="return false" />');
	if(cartu) pop.document.write('<h2 class="tipoth" style="font-weight:normal; font-size:9pt">&nbsp;&nbsp;'+cart+'</h2>');
	if(aired) pop.document.write('<h2 class="tipoth" style="font-weight:normal; font-size:9pt">&nbsp;&nbsp;Aireador: '+aire+'</h2>');
	if(propis) pop.document.write('<h2 class="tipoth" style="margin-top:5px; margin-bottom:0px">&nbsp;&nbsp;Contenido</h2><div class="tipotd"><ul>'+comp+'<\/li><\/ul></div>');
	pop.document.write('</div>');
}
pop.document.write('<div id="pop1"><table cellspacing="0" cellpadding="0" style="width:'+(img1.width+2)+'px; font-size:12px"><tr><th colspan="3">'+ntalt+'<\/th><\/tr><tr><th colspan="3"><img src="'+imag+'.jpg" alt="'+ntalt+'"  onmouseover="return false" oncontextmenu="return false" /><\/th><\/tr><tr><th style="text-align:left" class="thpu"><span class="am">::&nbsp;</span>'+titulo.slice(9)+'<\/th><th>Ref.<\/th><th>&euro;<\/th><\/tr>')
for(var i=0; i<num; i++) {pop.document.writeln('<tr><td>'+color[cs[i]]+'<\/td><td>'+cs[i]+'<\/td><td>'+cv[i]+'<\/td><\/tr>')}
pop.document.write('<tr><td colspan="3">P.V.P.- IVA no incluido<\/td><\/tr><\/table><\/div><\/body><\/html>');
var trs=pop.document.getElementsByTagName('tr');
for(var i=1; i<trs.length; i++) {
	trs[i].onmouseover=new Function('this.style.backgroundColor="#AABBFF"');
	trs[i].onmouseout=new Function('this.style.backgroundColor="white"');
}
pop.oncontextmenu = new Function('pop.close()')
if(!img1.complete) red=setTimeout("redim()",1000)
pop.document.close()
}
function vcm(im,c,cm,props) {
 if(!cm) ventana(im,c,'','','','','','',props)
	else ventana(im,c,'',cm,'','','','',props)
}
function vc(im,c,msg,props) {ventana(im,c,'','','','','',msg,props)}
function redim() {
	if(img1.complete) pop.resizeTo(img1.width+230,img1.height+22*num+148)
		else red=setTimeout("redim()",1000)
}
function fecha() {
 if(window.dia) {var fecha2=new Date(); dia2=fecha2.getDate()
		if(dia==dia2) return
		else location.reload()
 }
 else {
 var meses=new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre')
 var diasem=new Array('Domingo','Lunes','Martes','Mi�rcoles','Jueves','Viernes','S�bado')
 var ahora=new Date()
 dia=ahora.getDate()
 var mes=ahora.getMonth(), dias=ahora.getDay()
 var fecha=diasem[dias]+" "+dia+" de "+meses[mes]+" de "+ahora.getFullYear()+"&nbsp;"
 setInterval("fecha()",100000)
 return fecha
 }
}
function resalta(capa,foto,bg) {
if(!document.all) capa.style.MozOpacity="1"
capa.style.backgroundColor=bg
document.getElementById('fotomenu').src="../comunes/"+foto+".jpg"
document.getElementById('divfotomenu').style.visibility="visible"
}
function apaga(capa,bg) {
if(!document.all) capa.style.MozOpacity=".9"
capa.style.backgroundColor=bg
document.getElementById('divfotomenu').style.visibility="hidden"
}
function menuGV() {
ims = new Array()
var is=new Array('fe','or','si','no','ka','ba','ze','bo','sy','vi','ve','ac','ma','ch','pl','ir','se','al','st','tm','te')
for(var k in is) {ims[k] = new Image(); ims[k].src="../comunes/"+is[k]+".jpg"}
mons=new Array('FENIX','ORION','SIRA','NORVIC','KA','BASIC','ZETA','BOSS','SYMBOL','VIT','VENECIA','ACTIVA','MAXIM','CHRONOS')
otros=new Array('PLUS','IRIS','SELECTA','ALHAMBRA','STILO')
yotros=new Array('TEMPORIZADOS','TERMOSTATICOS')
var menu1HTML="",menu2HTML="",menu3HTML=""
document.write('<div id="divfotomenu"><img id="fotomenu" src="../comunes/gvs.jpg" alt="" /><\/div>')
document.write('<div id="flechamenu"><img src="../comunes/fmenu.gif" alt="" /><\/div>')
document.write('<div id="series" onmouseover="this.style.visibility=\'visible\'" onmouseout="this.style.visibility=\'hidden\'"><\/div>')

for(var i=0; i<mons.length; i++) {
	if(i%2==0) {var clase="par", fondo="#BEEEEE", vuelve="#EEEEFF", pinchao="yellow"}
	else {var clase="impar", fondo="#071079", vuelve="#5678FF", pinchao="red"}
	if(document.title.indexOf(mons[i])!=-1) clase+=" docactual"

	menu2HTML+='<div class="'+clase+'" style="-Moz-Opacity:.9" onmouseover="resalta(this,\''+is[i]+'\',\''+fondo+'\')" onmouseout="apaga(this,\''+vuelve+'\')" onclick="window.location.href=\'../'+mons[i].toLowerCase()+'/index.html\'" onmousedown="apaga(this,\''+pinchao+'\')">'+mons[i]+'<\/div>'
}
for(var j=0; j<otros.length; j++) {
	if(j%2==0) {var clase="par0", fondo="#FFBB00", vuelve="#FFFFAA", pinchao="red"}
	else {var clase="impar0", fondo="#DDBB00", vuelve="#FFFF22", pinchao="#AA8800"}
	if(document.title.indexOf(otros[j])!=-1) clase+=" docactual"

	menu1HTML+='<div class="'+clase+'" style="-Moz-Opacity:.9" onmouseover="resalta(this,\''+is[j+mons.length]+'\',\''+fondo+'\');this.style.color=\'white\'" onmouseout="apaga(this,\''+vuelve+'\');this.style.color=\'black\'" onclick="window.location.href=\'../'+otros[j].toLowerCase()+'/index.html\'" onmousedown="apaga(this,\''+pinchao+'\')">'+otros[j]+'<\/div>'
}
for(var k=0; k<yotros.length; k++) {
	if(k%2==0) {var clase="par1", fondo="#751010", vuelve="#D80000", pinchao="#251010"}
	else {var clase="impar1", fondo="#491010", vuelve="RED", pinchao="#201010"}
	if(document.title.indexOf(yotros[k])!=-1) clase+=" docactual"

	menu3HTML+='<div class="'+clase+'" style="-Moz-Opacity:.9" onmouseover="resalta(this,\''+is[k+mons.length+otros.length]+'\',\''+fondo+'\')" onmouseout="apaga(this,\''+vuelve+'\')" onclick="window.location.href=\'../'+yotros[k].toLowerCase()+'/index.html\'" onmousedown="apaga(this,\''+pinchao+'\')">'+yotros[k]+'<\/div>'
}
document.getElementById("series").innerHTML=menu2HTML+menu1HTML+menu3HTML
}
function inicia() {
document.getElementById("contacto").href="javascript:abreHtm(\'../comunes/contacto.html\',700,470)"
document.getElementById("menuG").innerHTML='<a id="CabeceraMenuJS">Griferia</a>&nbsp;&nbsp;|'
menuGV()
//oMo="this.style.borderColor='black #FF3322 #FF3322 black'"	// Efecto onMouseOver en las fotos
oMo="this.width=this.width-10; this.height=this.height-10; this.style.border='5px solid white'"
//oMf="this.style.borderColor='white'"	// Efecto onMouseFuera en fotos
oMf="this.width=this.width+10; this.height=this.height+10; this.style.borderWidth='0'"
oMd="this.style.borderWidth='3px 1px 1px 3px'"
oMu="this.style.borderWidth='1px 3px 3px 1px'"
}
