var isIE = navigator.userAgent.indexOf('MSIE')>=0?true:false; var isFF = navigator.userAgent.indexOf('Firefox')>=0?true:false; var isNS = navigator.userAgent.indexOf('Netscape')>=0?true:false; var isCH = navigator.userAgent.indexOf('Chrome')>=0?true:false; var isSF = navigator.userAgent.indexOf('Safari')>=0?(isCH?false:true):false; var isOP = window.opera?true:false; var browser = isIE?'Iternet Explorer':(isOP?'Opera':(isFF?'Firefox':(isNS?'Netscape':(isSF?'Safari':(isCH?'Chrome':'Navegador'))))); var isMAC = navigator.platform.indexOf('Mac')>=0?true:false; var isLIN = navigator.platform.indexOf('Linux')>=0?true:false; var isWIN = navigator.platform.indexOf('Win')>=0?true:false; var isVer = navigator.appVersion; var isREXP = (window.RegExp) ? true : false; if(isVer+"" != "NaN" && isREXP) { if(isIE){ isVer.match(/(MSIE)(\s*)([0-9].[0-9]+)/ig); isVer = RegExp.$3; } else if(isSF){ isVer.match(/(Version\/)(\s*)([0-9].[0-9]+)/ig); isVer = RegExp.$3; } else if(isCH){ isVer.match(/(Chrome\/)(\s*)([0-9].[0-9]+)/ig); isVer = RegExp.$3; } } isIE4 =isIE?(isVer>=4.0 && isVer < 5.0?true:false):false; isIE5 =isIE?(isVer>=5.0 && isVer < 6.0?true:false):false; isIE6 =isIE?(isVer>=6.0 && isVer < 7.0?true:false):false; isIE7 =isIE?(isVer>=7.0 && isVer < 8.0?true:false):false; isIE8 =isIE?(isVer>=8.0 && isVer < 9.0?true:false):false; function addLoadEvent(func) { var oldonload = window.onload; if(typeof window.onload != 'function')window.onload = func; else window.onload = function(){ if(oldonload)oldonload(); func(); } } function eObject(id) { if (document.getElementById)return document.getElementById(id); else if(document.all)return document.all[id]; else if(document.layers[id]) return document.layers[id]; else return null; } function eSetClass(id,text) { div = eObject(id); div.setAttribute("class"+(isIE?(isIE8?"":"Name"):""),text); } function eSetValue(id,text) { if (document.getElementById){var idLayer = document.getElementById(id); idLayer.innerHTML = ''; idLayer.innerHTML = text;} else if (document.all){ var idLayer = document.all[id]; idLayer.innerHTML = text; } else if (document.layers){ var idLayer = document.layers[id]; idLayer.document.open(); idLayer.document.write(text); idLayer.document.close();} } function eGetValue(id){ return eObject(id).innerHTML; } function eStyle(id){ var cId =eObject(id); return (cId?((document.getElementById || document.all)?cId.style:cId):null); } function eVisibility(id,ty){ var cId =eStyle(id); if(cId)cId.visibility=document.layers?(ty?'show':'hide'):(ty?'visible':'hidden'); } function eDisplay(id,ty){ var cId =eStyle(id); if(cId)cId.display=document.layers?(ty?'':'none'):(ty?'':'none'); } function eTop(id,valor){ var cId =eStyle(id); if(cId)cId.top=valor+'px'; else return false; return true; } function eLeft(id,valor){ var cId =eStyle(id); if(cId)cId.left=valor+'px'; else return false; return true; } function eWinHeight() { if (self.innerWidth)return self.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight; else if (document.body) return document.body.clientHeight; else if (screen.height) return screen.height; else return; } function eCursor(obj,cur){ try{ obj.style.cursor = cur?cur:"pointer"; } catch(e){ obj.style.cursor = "hand"; } } function eCancelEvent(e) { if (!e || isIE) { window.event.returnValue = false; window.event.cancelBubble = true; return window.event; } else{ e.stopPropagation(); e.preventDefault(); return e; } } function eCancelEvent2(e) { if (!e || isIE){ window.event.cancelBubble = true; return window.event; } else{ if (e.target.type == 'submit'){ e.target.form.submit(); } e.stopPropagation(); return e;} } function eOLeft(elm){ var left = elm.offsetLeft; while((elm = elm.offsetParent) != null)left += elm.offsetLeft; return left; } function eOTop(elm){ var top = elm.offsetTop; while((elm = elm.offsetParent) != null)top += elm.offsetTop; return top; } function setCookie( sName, sValue) { nDays =356; var expires = ""; if ( nDays ) { var d = new Date();d.setTime( d.getTime() + nDays * 24 * 60 * 60 * 1000 ); expires = "; expires=" + d.toGMTString(); } document.cookie = sName + "=" + sValue + expires + "; path=/"; } function delCookie(name) { var d = new Date(); d.setTime(d.getTime()-1); document.cookie = name + "=null; expires=" + d.toGMTString(); } function fontSize(size) { bb = document.getElementById("page"); bb.style.fontSize = size; setCookie('___fontSize',size); ele = new Array('tsmall','tnormal','tbig'); eva = new Array('60%','80%','100%'); for(i=0; i<ele.length; i++) { bb = document.getElementById(ele[i]); bb.className=eva[i]==size?'textOn':''; } } function maximizar() { bb = document.getElementById("page"); bb.style.width ='100%'; bb = document.getElementById("opMax"); bb.style.display='none'; bb = document.getElementById("opMin"); bb.style.display='block'; bb = document.getElementById("body"); bb.style.backgroundImage='none'; bb.style.backgroundColor='#FFFFFF'; setCookie('___width','100%'); } function restaurar() { bb = document.getElementById("page"); bb.style.width ='784px'; bb = document.getElementById("opMin"); bb.style.display='none'; bb = document.getElementById("opMax"); bb.style.display=''; bb = document.getElementById("body"); bb.style.backgroundImage='url('+mkb_bg_body+')'; bb.style.backgroundColor='#FFFFFF'; setCookie('___width','784px'); } function offPanel() { bb = document.getElementById("appMenu"); bb.style.display='none'; bb = document.getElementById("appContent"); bb.style.width='100%'; bb.style.borderRight='0px'; bb = document.getElementById("appX"); bb.style.display='none'; bb = document.getElementById("appH"); bb.style.display=''; setCookie('___panel',1); } function onPanel() { bb = document.getElementById("appMenu"); bb.style.display=''; bb = document.getElementById("appContent"); bb.style.width='73%'; bb.style.borderRight='1px solid #C6C5B3'; bb = document.getElementById("appX"); bb.style.display=''; bb = document.getElementById("appH"); bb.style.display='none'; setCookie('___panel',0); } function setCerrar(){ if(confirm('Quieres salir del sistema?'))window.location.href='index.php?dropSession'; } function setNull(){ } function ventana(url,width,height) { var left = parseInt((screen.availWidth/2) - (width/2)); var top = parseInt((screen.availHeight/2) - (height/2)); var windowFeatures = "width=" + width + ",height=" + height +",status=0,resizable=0,left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top + ",titlebar=0,toolbar=0,scrollbars=1"; win = window.open(url, null, windowFeatures); win.focus(); } function confirmar(str,url,ty) { if(confirm(str)) { if(ty)ventana(url,800,600); else window.location.href=url; } } function ltrim(s) { return s.replace(/^\s+/, "");} function rtrim(s) { return s.replace(/\s+$/, "");} function trim(s) { return rtrim(ltrim(s));} function eVoid(){} /**/ 
