function ventana_norma(page){
	w = 545
	h = 572
	posx = (780-w)/2;
   	posy = (screen.availHeight-h)/2;
	window.open(page, 'DATOS','toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width='+w+',height='+h+',top='+posy+',left='+posx)
}

function ventana(page){
	w = 545
	h = 522
	posx = (780-w)/2;
   	posy = (screen.availHeight-h)/2;
	window.open(page, 'DATOS','toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width='+w+',height='+h+',top='+posy+',left='+posx)
}

function cambiar(w, h, page){
	posx = (780-w)/2;
   	posy = (screen.availHeight-h)/2;
	window.open(page, 'CAMBIAR','toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width='+w+',height='+h+',top='+posy+',left='+posx)
}

function espacios(string) {
	var temp = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(v = 0; v < splitstring.length; v++)
	temp += splitstring[v];
	//devuelve vacio o relleno
	return temp;
}

function validarEmail(valor) {
  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
     return (false);
   else 
      return (true);
}
function cidioma (idioma){
	loca=location.toString()
	loca=loca.replace("&idioma","")
	loca=loca.replace("idioma","")
	loca=loca.replace("=es","")
	loca=loca.replace("=fr","")
	loca=loca.replace("=po","")
	loca=loca.replace("?&","?")
	loca=loca+'&idioma='+idioma
	loca=loca.replace("?&","?")
	loca=loca.replace("asp&","asp?")	
	window.location=loca
	//alert(loca)
}
