
//document.oncontextmenu=function(){return false}

function reenviar(){
	top.location.href='/cas'
}

function gInicio() {
	var sAux=top.location.href
	if (sAux!=this.parent.location.href) top.location.href=this.parent.location.href
	oInf=new Info()
}

function gIniCookie() {
	var sAux=top.location.href
	if (sAux!=this.parent.location.href) top.location.href=this.parent.location.href
	else
	{
		oCs=new Cookie()
		asRutas=new Array('Cas','Eus')
		nIdm=oCs.obtener('nIdm')

		if (!esNatural(nIdm)) nIdm=0
		cIdioma(nIdm)
	}
	oInf=new Info()
}

function cIdioma(i) {
	oCs.poner('nIdm',i)
	top.location.href='/'+asRutas[i]
	nIdm=i
}

function dIdioma(i) {
	oCs2=new Cookie()
	oCs2.poner('nIdm',i)
}

function esNatural(t) {
	if (t==null || typeof t=='undefined') return false
	else return t.match(/^\d+$/)
}

function siCond(e,f,t) {
	eval('if (typeof '+e+'=="undefined") setTimeout("siCond(\''+e+'\',\''+f+'\','+t+')",'+t+');else{'+f+'}')
}

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 ''
}