function nextm(show,hide) {
	var tid = document.getElementById(show);
	tid.style.display = '';
	var tid = document.getElementById(hide);
	tid.style.display = 'none';
}
function mOvr(src,clrOver) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
	}
}
function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;
	}
}
function mClk(src) {
	if (event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
	}
}
function GP_popupConfirmMsg(msg) { //v1.0
	document.MM_returnValue = confirm(msg);
}
function changeCursor(obj) {
	obj.style.cursor = 'hand';
	return true;
}



function switchDiv(obj) {
	var tid = document.getElementById(obj);
	tid.style.display = (tid.style.display == 'none') ? '' : 'none';
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
function excursiones() {
MM_openBrWindow('index.php?page=excursiones','','status=yes,width=600,height=505');
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='./imgprev.php?imagen="+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex = 0;
}
function MM_jumpMenu1(targ,selObj,restore){ //v3.0
	eval(targ+".location='./imgprev.php?type=icon&imagen="+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function confirmar(url) {
	var is_confirmed = confirm('Realmente desea borrar el Documento?');
	if (is_confirmed) {
		location = url;
		return true;
	}
}
// CAMBIAR FUENTES
FuenteNormal = 12;
FuenteAnt = FuenteNormal;
function chgFont(elemento,mom) {
	if (mom == '+') {
		if (FuenteAnt <= 17) {
			FuenteAnt++;
			document.getElementById(elemento).style.fontSize = FuenteAnt+'px';
		}
	}
	else { 
		if (mom == '-') {
			if (FuenteAnt >= 10) {
				FuenteAnt--;
				document.getElementById(elemento).style.fontSize = FuenteAnt+'px';
			}		
		}
		else {
			FuenteAnt = FuenteNormal;
			document.getElementById(elemento).style.fontSize = FuenteNormal+'px';
		}
	}
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
  
function switchVis(obj) {
	var tid = document.getElementById(obj);
	tid.style.display = '';
}
function switchHidd(obj) {
	var tid = document.getElementById(obj);
	tid.style.display =  'none';
}
function switchActive(elem,types) {
		for(i=0;i<document.elements.length;i++) {
			thiselm = elements[i];
			if(thiselm.name.substring(0,5) == types) {
				if(thiselm.value != elem)
				thiselm.style.display = 'none';
			}
		}
}
function setX(k) {
return findPosX(k);
}
function setY(k) {
return findPosY(k);
}
function getPosDiv(el,child) {
var y = setY(el) + 13;
var x = setX(el) - 10;
oid = document.getElementById(child);
oid.style.top = y;
oid.style.left = x;
}

function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight ;
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight ;
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" ;
    eval(this.obj + "=this") ;
    return this ;
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y ;
    this.css.left=this.x ;
    this.css.top=this.y ;
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) ;
    if(loop) setTimeout(this.obj+".up("+move+")",speed) ;
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) ;
		else objScroller.up(speed) ;
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) ;
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') ;
    objScroller=new ConstructObject('divContent','divContainer') ;
    objScroller.MoveArea(0,0) ;
    objContainer.css.visibility='visible' ;
    initialised=true; 
} 

