/* Copyright 2005-2006 gPremper S.A. de C.V - Developed by Niels Fröhling */

 var MSIE = false;
var Vjo = false;
var Vjw = false;

 if (navigator.appName.substr(0,9) == 'Microsoft')
 MSIE = true;
else if (navigator.appName.substr(0,8) == 'Netscape')
 Vjo= true;
if (document.compatMode == 'CSS1Compat')
 Vjw= true;

 function Fb(id) {
 if (id == null)
 return document;
if (document != null)
 return document.getElementById(id);
if (window.document != null)
 return window.document.getElementById(id);
if (this.document != null)
 return this.document.getElementById(id);
return null;
}
function Faä(id) {
 if (id == null)
 return window;
if (window.frames != null)
 return window.frames[id];
if (this.window.frames != null)
 return this.window.frames[id];
return null;
}
function Fu(name) {
 var Ved = document.getElementsByName(name);
for (var e = 0; Ved&& (e < Ved.length); e++)
 return Ved.item(e);
return null;
}
function Feû(name) {
 var Ved = document.getElementsByTagName(name);
for (var e = 0; Ved&& (e < Ved.length); e++)
 return Ved.item(e);
return null;
}

 function Fè(event) {
 if (!event)
 return null;

 if (event.target)
 return event.target;
else if (event.srcElement)
 return event.srcElement;
return null;
}
function Ffp(event) {
 if (!event)
 return null;

 if (event.relatedTarget)
 return event.relatedTarget;
else if (event.fromElement)
 return event.fromElement;
return null;
}
function Fbè(event) {
 if (!event)
 return null;

 if (event.relatedTarget)
 return event.relatedTarget;
else if (event.toElement)
 return event.toElement;
return null;
}

 function F7(num, signed) {
 num = Math.floor(num + 0.5);
var Vcs = (signed == true ? (num < 0 ? '-' : '+') : '');
num = Math.abs(num);
if (num < 10)
 return Vcs+ '0' + num;
return Vcs+ '' + num;
}

 function Faâ(num, signed) {
 var Vcs = (signed == true ? (num < 0 ? '-' : '+') : '');
num = Math.abs(num);
var Vfs = Math.floor(num);
var Vcp = F7((num - Vfs) * 100, false);
return Vcs+ '' + Vfs+ (Vcp!= 0 ? '.' + Vcp: '');
}
function Fbæ(num, signed) {
 var Vcs = (signed == true ? (num < 0 ? '-' : '+') : '');
num = Math.abs(num);
var Vfs = Math.floor(num);
var Vcp = F7((num - Vfs) * 100, false);
return Vcs+ '' + Vfs+ '.' + Vcp;
}
function Vo(bytes) {
 var Vhi = ['bytes', 'KB', 'MB', 'GB', 'TB'];
var Vf8 = 0;
while (bytes >= 10000) {
 bytes /= 1024;
Vf8++;
}
return Faâ(bytes, false) + ' ' + Vhi[Vf8];
}

 function Fap(V0) {
 while (V0.options.length > 0) {
 
 if (V0.options.remove)
 V0.options.remove(0);

 else
 V0.options[0] = null;
}
}
function Fdä(V0, values) {
 var d = 0; for (Vr in values)
 V0.options.add(new Option(values[Vr], d++, false, false));
}
function Fe1(V0, values) {
 for (var d = 0; d < (values.length >> 1); d++)
 V0.options.add(new Option(values[(d << 1) + 1], values[(d << 1) + 0], false, false));
}
function Fer(V0, values) {
 for (var key in values)
 V0.options.add(new Option(values[key], key, false, false));
}
function Ffu(V0, values) {
 Fap(V0);
Fdä(V0, values);
}
function Ffö(V0, values) {
 Fap(V0);
Fe1(V0, values);
}
function Fdü(V0, values) {
 Fap(V0);
Fer(V0, values);
}
function Fd3(V0, value) {
 for (var d = 0; d < V0.options.length; d++)
 if (V0.options.item(d).value == value) {
 V0.value = value;
V0.selectedIndex = d;
break;
}
}
function Fbï(V0, text) {
 for (var d = 0; d < V0.options.length; d++)
 if (V0.options.item(d).text == text) {
 V0.value = V0.options.item(d).value;
V0.selectedIndex = d;
break;
}
}
function F2(dobj) {
 if (!dobj)
 return;
if (dobj.style.display == 'none')
 dobj.style.display = 'block';
else
 dobj.style.display = 'none';
}

 function Ffz(img, path) {
 if (MSIE == true) {
 img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + path + "');";
img.src = "pics/blank.gif";
}
else
 img.src = path;
}
function Fci(img) {
 if ((img.style.left != null) && (img.style.left != '') &&
 (img.style.right != null) && (img.style.right != '') &&
 (img.style.width != null) && (img.style.width != '') &&
 (img.style.width.indexOf('%') != -1))
 if (MSIE == false)
 img.style.width = null;
if ((img.style.top != null) && (img.style.top != '') &&
 (img.style.bottom != null) && (img.style.bottom != '') &&
 (img.style.height != null) && (img.style.height != '') &&
 (img.style.height.indexOf('%') != -1))
 if (MSIE == false)
 img.style.height = null;
}
function Ffk(id, path) {
 var img = Fb(id);
if (img != null)
 if (MSIE == true) {
 img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + path + "');";
img.src = "pics/trans.gif";
}
else {
 Fci(img);
img.src = path;
}
return img;
}
function Ffå(id, path) {
 var img = Fb(id);
if (img != null)
 if (MSIE == true) {
 img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + path + "', sizingMethod='scale');";
img.src = "pics/trans.gif";
}
else {
 Fci(img);
img.src = path;
}
return img;
}

 function Fã(evt) {
 if (MSIE == true) {
 
 if (document != null)
 if (document.V7 != null)
 return window.event.clientX + document.V7.scrollLeft;
return 0;
}
return evt.pageX;
}
function Fû(evt) {
 if (MSIE == true) {
 
 if (document != null)
 if (document.V7!= null)
 return window.event.clientY + document.V7.scrollTop;
return 0;
}
return evt.pageY;
}

 function Fe5(frmid) {
 var Vaè = Faä(frmid);
var Vgr;
if (Vaè!= null) {
 if (MSIE == true) {
 if (Vaè.document != null)
 if (Vaè.document.V7!= null)
 Vgr= Vaè.document.V7.scrollWidth;
}
else {
 
 Vaè.scrollBy( 10000000, 0);

 Vgr= Vaè.innerWidth - 0;
Vgr+= Vaè.pageXOffset;

 Vaè.scrollBy(-10000000, 0);
}
}
return Vgr;
}
function Fcï(frmid) {
 var Vaè = Faä(frmid);
var Vdb;
if (Vaè!= null) {
 if (MSIE == true) {
 if (Vaè.document != null)
 if (Vaè.document.V7!= null)
 Vdb= Vaè.document.V7.scrollHeight;
}
else {
 
 Vaè.scrollBy(0, 10000000);

 Vdb= Vaè.innerHeight - 0;
Vdb+= Vaè.pageYOffset;

 Vaè.scrollBy(0, -10000000);
}
}
return Vdb;
}
function Ffà(frmid) {
 var Vaè = Faä(frmid);
var Vdÿ;
if (Vaè!= null) {
 if (MSIE == true) {
 if (Vaè.document != null)
 if (Vaè.document.V7!= null)
 Vdÿ= Vaè.document.V7.scrollLeft;
}
else
 Vdÿ= Vaè.pageXOffset;
}
return Vdÿ;
}
function Ffâ(frmid) {
 var Vaè = Faä(frmid);
var Vdÿ;
if (Vaè!= null) {
 if (MSIE == true) {
 if (Vaè.document != null)
 if (Vaè.document.V7!= null)
 Vdÿ= Vaè.document.V7.scrollTop;
}
else
 Vdÿ= Vaè.pageYOffset;
}
return Vdÿ;
}

 function Ff3(frmid) {
 var Vha = Fb('content');
var Vhe = Fb('nav_left');
var iWidth, iHeight;
if ((Vha== null) ||
 (Vhe== null))
 return;
if (MSIE == true) {
 iWidth = document.V7.clientWidth ;
iHeight = document.V7.clientHeight; }
else {
 iWidth = window.innerWidth - 2;
iHeight = window.innerHeight - 2; }

 Vha.style.height = '0px';
Vhe.style.height = '0px';
var Vj1 = Fcï('content');
var Vjz = Fcï('nav_left');
var Vdb = Math.max(Vj1, Vjz);

 if (!isNaN(Vdb)) {
 Vha.style.height = Vdb+ 'px';
Vhe.style.height = Vdb+ 'px';
}
}

 var Viy = 0, lHeight = 0;
function Fdç(dWidth, dHeight, preserve) {
 var iWidth, iHeight;
window.moveTo(50, 50);

 if (MSIE == true) {
 iWidth = document.V7.clientWidth ;
iHeight = document.V7.clientHeight; }
else {
 iWidth = window.innerWidth;
iHeight = window.innerHeight; }

 if (preserve) {
 var dAspect, iAspect;
var pWidth, pHeight;
dAspect = dWidth / dHeight;
iAspect = iWidth / iHeight;
pWidth = iHeight * dAspect;
pHeight = iWidth / dAspect;
if (iAspect > dAspect) {
 dWidth = pWidth;
dHeight = dWidth / dAspect;
}
else
 if (dAspect > iAspect) {
 dHeight = pHeight;
dWidth = dHeight * dAspect;
}
}
if (((dWidth != iWidth ) || (dHeight != iHeight)) &&
 ((Viy!= iWidth ) && (lHeight != iHeight))) {
 Viy= iWidth;
lHeight = iHeight;
window.resizeBy(dWidth - iWidth, dHeight - iHeight);

 setTimeout(function() {
 Fdç(dWidth, dHeight, preserve); }, 500);
}
}

 function Fý(variable, uri) {
 var Vò = (uri ? uri : window.location.href);

 var Vaö = Vò.split("?");
var Vcu = (Vaö[0] != null) ? Vaö[0] : '';

 if (Vaö[1] != null) {
 var Vcð = Vaö[1].split("&");

 for (var i = 0; i < Vcð.length; i++) {
 var Vbë = Vcð[i].split("=");

 if (Vbë[0] == variable)
 return Vbë[1];
}
}
return null;
}
function Fcè(uri) {
 var Vò = (uri ? uri : window.location.href);

 var Vaö = Vò.split("#");

 return Vaö[1];
}

 function Fds(Vò, vararray) {
 
 var Vaö = Vò.split("?");
var Vcu = (Vaö[0] != null) ? Vaö[0] : '';
var Vb1 = vararray;

 if (Vaö[1] != null) {
 var Vcð = Vaö[1].split("&");

 for (var i = 0; i < Vcð.length; i++) {
 var Vbë = Vcð[i].split("=");

 if (Vb1[Vbë[0]] == null)
 Vb1[Vbë[0]] = Vbë[1];
}
}

 var Vef = '';
for (var key in Vb1)
 if ((Vb1[key] != null) &&
 (Vb1[key] != 'null') &&
 (Vb1[key] != ''))
 Vef+= (Vef== '' ? '?' : '&') + key + '=' + Vb1[key];
Vcu+= Vef;
return Vcu;
}
function Fe7(Vò, position) {
 
 var Vaö = Vò.split("#");
var Vcu = (Vaö[0] != null) ? Vaö[0] : '';

 if ((position != null) &&
 (position != ''))
 Vcu+= '#' + position;
return Vcu;
}

 function Fa8(Vò) {
 var uri = Vò;

 if ((uri.charAt(1) == ':') &&
 (uri.charAt(2) == '\\')) {
 uri = 'file:///' + uri.replace(/\\+/g, '/');
}

 else if (uri.charAt(0) == '/') {
 uri = 'file:///' + uri;
}
return uri;
}
function Ffæ(Vò) {
if (Vò!= '') {
 
 if ((Vò[1] == ':') &&
 (Vò[2] == '\\')) {
 Vò= Vò.substr(3, Vò.length - 3);
}

 else
 if ((Vò[0] == '\\') &&
 (Vò[1] == '\\')) {
 Vò= Vò.replace(/\\\\Bill\\clientes\\+/g, '');
}

 else
 if ((Vò[0] == '/') &&
 (Vò[1] == 'l') &&
 (Vò[2] == 'a') &&
 (Vò[3] == 'n')) {
 Vò= Vò.replace(/\/lan\/clientes\/+/g, '');
}

 Vò= Vò.replace(/\\+/g, '/');

 if ((Vè= Vò.lastIndexOf('/')) != -1)
 Vò= Vò.substr(0, Vè + 1);
}
return Vò;
}

 function Ffy(money) {
 m = new Number(money);
m *= 100;
m = Math.round(m);
m /= 100;
return m;
}

 function Faü(mail) {
 return mail.match(/^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/);
}

