if (document.images) {

}

function turnOff(imgName) {
  if (document.images) {
    document[imgName].src = eval(imgName + "out.src");
  }
}

function turnOn(imgName) {
	if (document[imgName]){
		document[imgName].src = eval( imgName + "over.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 ajuste(tagId,cantidadPorLinea){
	cantidadPorLinea++;
	var i=1;
	var t=1;
	var z=1;
	var maxheight=Array();
	while (document.getElementById(tagId+i)!=null){
		if(!maxheight[t]>=1){maxheight[t]=0;}

		if(document.getElementById(tagId+i).clientHeight>=maxheight[t]){
			maxheight[t]=document.getElementById(tagId+i).clientHeight;
		}

		i++;
		z++;
		if(z==cantidadPorLinea){t++;z=1;}
	}

	i=1;
	t=1;
	z=1;
	pp='';
	while (document.getElementById(tagId+i)!=null){
		document.getElementById(tagId+i).height = maxheight[t]+'px';

		i++;
		z++;
		if(z==cantidadPorLinea){t++;z=1;}
	}

}
