
//document.oncontextmenu=function(){return false}

function gInicio() {
	var sAux=top.location.href
	if (sAux!=this.parent.location.href) top.location.href=this.parent.location.href
	oInf=new Info()
}

function siCond(e,f,t) {
	eval('if (typeof '+e+'=="undefined") setTimeout("siCond(\''+e+'\',\''+f+'\','+t+')",'+t+');else{'+f+'}')
}

function esCorreo(t) {
	return /^(\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+)$/.test(t)
}

function esFecha(t) {
	if (/^((0?[1-9]|[12]\d|3[01])\/(0?[1-9]|1[012])\/\d{4})$/.test(t)) {
		var asPs=t.split(/\//)
		if (asPs[2]<1752 || asPs[2]>9999) return false
		if (asPs[1]==2 && (asPs[0]>29 || (asPs[0]==29 && !(asPs[2]%4==0 && (asPs[2]%100!=0 || asPs[2]%400==0))))) return false
		if ((asPs[1]==4 || asPs[1]==6 || asPs[1]==9 || asPs[1]==11) && asPs[0]>30) return false
		return true
	}
	return false
}

function cMensaje(u) {
	var wW=150+30
	var wH=60+50
	var sW=screen.width
	var sH=screen.height
	var X=0
	var Y=0
	if (sW>wW) X=(sW-wW)/2
	if (sH>wH) Y=(sH-wH)/2
	var sNombre=' Prueba '
	window.open(u,null,'menubar=no,resiable=no,status=no,titlebar=no,screenX='+X+',left='+X+',screenY='+Y+',top='+Y+',width='+wW+',height='+wH)
}

String.prototype.trim=function() {
	var i=0
	var j=this.length-1
	while (i<this.length && (this.charAt(i)==' ' || this.charCodeAt(i)==10 || this.charCodeAt(i)==13)) i++
	while (j>i && (this.charAt(j)==' ' || this.charCodeAt(j)==10 || this.charCodeAt(j)==13)) j--
	if (j>=i) return this.substring(i,j+1)
	return ''
}