if (document.images) {
	img1over = new Image();
	img1over.src = url + "MoBotInicio_On.gif";
	img2over = new Image();
	img2over.src = url + "MoBotEmpresa_On.gif";
	img3over = new Image();
	img3over.src = url + "MoBotPromosVta_On.gif";
	img4over = new Image();
	img4over.src = url + "MoBotSegMano_On.gif";
	img5over = new Image();
	img5over.src = url + "MoBotAlquiler_On.gif";
	img6over = new Image();
	img6over.src = url + "MoBotQuieroVender_On.gif";
	img7over = new Image();
	img7over.src = url + "MoBotImprDossier_On.gif";
	img8over = new Image();
	img8over.src = url + "MoBotEnviarAmigo_On.gif";
	img9over = new Image();
	img9over.src = url + "MoBotSolicitarVis_On.gif";
	img10over = new Image();
	img10over.src = url + "MoBotSolicitarInfo_On.gif";
	
	img1out = new Image();
	img1out.src = url + "MoBotInicio_Off.gif";
	img2out = new Image();
	img2out.src = url + "MoBotEmpresa_Off.gif";
	img3out = new Image();
	img3out.src = url + "MoBotPromosVta_Off.gif";
	img4out = new Image();
	img4out.src = url + "MoBotSegMano_Off.gif";
	img5out = new Image();
	img5out.src = url + "MoBotAlquiler_Off.gif";
	img6out = new Image();
	img6out.src = url + "MoBotQuieroVender_Off.gif";
	img7out = new Image();
	img7out.src = url + "MoBotImprDossier_Off.gif";
	img8out = new Image();
	img8out.src = url + "MoBotEnviarAmigo_Off.gif";
	img9out = new Image();
	img9out.src = url + "MoBotSolicitarVis_Off.gif";
	img10out = new Image();
	img10out.src = url + "MoBotSolicitarInfo_Off.gif";
	
}

function turnOn(imgName) {if (document[imgName]){document[imgName].src = eval( imgName + "over.src");}}
function turnOff(imgName) {if (document[imgName]){if (document.images) {document[imgName].src = eval(imgName + "out.src");}}}

function rollOn(obj){
	file=obj.src;
	obj.src=file.replace('_Off','_On');
}

function rollOff(obj){
	file=obj.src;
	obj.src=file.replace('_On','_Off');
}

var Key='';
function keyhandler(e) {
   	if ((Key >=48 && Key <=57) || (Key >=96 && Key <=105) || Key==46 || Key==8 || Key==9 || (Key >=37 && Key <=40)){return true}else{return false};
}

function validarEmail(valor) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
		return (true);
	} else {
		return (false);
	}
}

function runSlideShow(){
	if (document.all){
		document.images.PictureBox.style.filter="blendTrans(duration=2)";
		document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
		document.images.PictureBox.filters.blendTrans.Apply();}
		document.images.PictureBox.src = preLoad[jss].src;
	if (document.all) document.images.PictureBox.filters.blendTrans.Play();
		jss = jss + 1;
		if (jss > (pss)) jss=1;
		tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function printpage(id){
	frames['imprimir'].location.href='imprimir.php?id='+id;
}

function printpageprom(id){
	frames['imprimir'].location.href='imprimirpromocion.php?id='+id;
}

function vaciar(capa){
	if (document.all) {document.all[capa].innerHTML='';}
	if (document.getElementById(capa)){document.getElementById(capa).innerHTML='';}
}

function mostarcaresp(idtipodeinmueble){
	if (document.all) {
		document.all.caresp.innerHTML='';
		document.all.caresp.innerHTML= eval('capa'+idtipodeinmueble);}
	if (document.getElementById('caresp')){
		document.getElementById('caresp').innerHTML='';
		document.getElementById('caresp').innerHTML= eval('capa'+idtipodeinmueble);}
}

function almacenar(capa){
	var htmlcontent='';
	if (document.all) {htmlcontent=document.all[capa].innerHTML;}
	if (document.getElementById(capa)){htmlcontent=document.getElementById(capa).innerHTML;}
	return htmlcontent;
}

var tt0=true;
function autocompletarModalidades(){
	if (tt0){document.buscador.provincia.options[0]=null;tt0=false;}
	frames['autocomplete'].location.href=urlauto+'?panmodalidad='+document.buscador.provincia.options[document.buscador.provincia.options.selectedIndex].text+'&idioma='+idioma;
	tt6=true;
}

var tt1=true;
function autocompletarProvincias(ti,modalidad,idioma){
	if (tt1){document.buscador.tipodeinmueble.options[0]=null;tt1=false;}
	frames['autocomplete'].location.href=urlauto+'?ti='+ti+'&mod='+modalidad+'&idioma='+idioma;
	tt2=true;
}

var tt2=true;
function autocompletarCiudades(ti,provincia,modalidad,idioma){
	if (tt2){document.buscador.provincia.options[0]=null;tt2=false;}
	frames['autocomplete'].location.href=urlauto+'?ti='+ti+'&prov='+provincia+'&mod='+modalidad+'&idioma='+idioma;
	tt3=true;
}

function autocompletarDistritos(ti,provincia,ciudad,modalidad,idioma){
	frames['autocomplete'].location.href=urlauto+'?ti='+ti+'&prov='+provincia+'&ciu='+ciudad+'&mod='+modalidad+'&idioma='+idioma;
}

function modificaClasificacion(titulo){
	inm=document.buscador.tipodeinmueble.options[document.buscador.tipodeinmueble.selectedIndex].text;
	if (document.all) {document.all.titclas.innerHTML = titulo+inm;}
	if (document.getElementById('titclas')) {document.getElementById('titclas').innerHTML = titulo+inm;}
}

var tt7=true;
function modificaClasificacionQV(titulo,ti,modalidad,idioma){
	modificaClasificacion(titulo);
	if (tt7){document.buscador['tipodeinmueble'].options[0]=null;tt7=false;}
	frames['autocomplete'].location.href=urlauto+'?ti='+ti+'&mod='+modalidad+'&idioma='+idioma;
}
