function uno(src,color_entrada) 
{ src.bgColor=color_entrada;
src.style.cursor="hand"; 
src.style.textDecoration="underline";} 

function dos(src,color_default) 
{ src.bgColor=color_default;
src.style.cursor="default"; 
src.style.textDecoration="none";}

function nueva(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function ira(src,color_entrada) {
 if (!src.contains(event.fromElement)) {
	 src.style.cursor = "hand";
	}
 }

				
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' debe ser un e-mail.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '-Hay un campo vacio.\n'; }
  } if (errors) alert('Hay errores :\n'+errors);
  document.MM_returnValue = (errors == '');
}

function ft(xUrl,xform,campo1,campo2) {
var xform=xform
var c1=campo1
var c2=campo2
if (document.getElementById(xform).ft.value=="no" && document.getElementById(c2).value!="")  {
					  var xmlhttp = false;
					  try {
						xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
					   } catch (e) {
						  try {
							xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
						  } catch (E) {
							xmlhttp = false;
						  }
					   }
					  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
						xmlhttp = new XMLHttpRequest();
					  }
				xUrl=xUrl + '?n=1'
				   for (i = 0; i < document.getElementById(xform).elements.length; i++){
						xUrl=xUrl + '&' + document.getElementById(xform).elements[i].name + '=' + document.getElementById(xform).elements[i].value
					}
					  xmlhttp.open("GET", xUrl,true);
					  xmlhttp.send(null)
}
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}					
function chkprovincia(pro)
{
var chkpp="";
pro=parseInt(pro);
switch (pro) {
   	case 100 :  	chkpp="Fuera de España";break;
	case 1:		chkpp="Álava";break;
	case 2:		chkpp="Albacete";break;
	case 3:		chkpp="Alicante";break;
	case 4:		chkpp="Almeria";break;
	case 5:			chkpp="Ávila";break;
	case 6:			chkpp="Badajoz";break;
	case 7:			chkpp="Baleares";break;
	case 8:			chkpp="Barcelona";break;
	case 9:			chkpp="Burgos";break;
	case 10:		chkpp="Cáceres";break;
	case 11:		chkpp="Cádiz";break;
	case 12:		chkpp="Castellón";break;
	case 13:		chkpp="Ciudad Real";break;
	case 14:		chkpp="Córdoba";break;
	case 15:		chkpp="A Coruña";break;
	case 16:		chkpp="Cuenca";break;
	case 17:		chkpp="Girona";break;
	case 18:		chkpp="Granada";break;
	case 19:		chkpp="Guadalajara";break;
	case 20:		chkpp="Guipúzcoa";break;
	case 21:		chkpp="Huelva";break;
	case 22:		chkpp="Huesca";break;
	case 23:		chkpp="Jaén";break;
	case 24:		chkpp="León";break;
	case 25:		chkpp="Lleida";break;
	case 26:		chkpp="La Rioja";break;
	case 27:		chkpp="Lugo";break;
	case 28:		chkpp="Madrid";break;
	case 29:		chkpp="Málaga";break;
	case 30:		chkpp="Murcia";break;
	case 31:		chkpp="Navarra";break;
	case 32:		chkpp="Ourense";break;
	case 33:		chkpp="Asturias";break;
	case 34:		chkpp="Palencia";break;
	case 35:		chkpp="Las Palmas";break;
	case 36:		chkpp="Pontevedra";break;
	case 37:		chkpp="Salamanca";break;
	case 38:		chkpp="Tenerife";break;
	case 39:		chkpp="Cantabria";break;
	case 40:		chkpp="Segovia";break;
	case 41:		chkpp="Sevilla";break;
	case 42:		chkpp="Soria";break;
	case 43:		chkpp="Tarragona";break;
	case 44:		chkpp="Teruel";break;
	case 45:		chkpp="Toledo";break;
	case 46:		chkpp="Valencia";break;
	case 47:		chkpp="Valladolid";break;
	case 48:		chkpp="Vizcaya";break;
	case 49:		chkpp="Zamora";break;
	case 50:		chkpp="Zaragoza";break;
	case 51:		chkpp="Ceuta";break;
	case 52:		chkpp="Melilla";break;
	} 
return chkpp;
}