/* JavaScript used in all pages    To keep web content adapt to browser size automatically. */F_contentReg  = new Array;function F_wndRegContent( id, type, preserveTop ) {    if (! F_client.hasDOM) return;    // Initialization: automatically register all images    if (id == "_init") {        if (! top.F_sizeReset) {            if (F_client.isNN4up) {                top.F_contentSize = new Array(top.innerWidth, top.innerHeight);            } else if (F_client.isIE4up) {                if (F_client.onMac)                    top.F_contentSize = new Array(document.body.clientWidth, document.body.clientHeight);                else                    top.F_contentSize = new Array(top.document.body.clientWidth, top.document.body.clientHeight);            }        }        var regLen = F_contentReg.length;        for (i = 0; i < document.images.length; i++) {            var img = document.images[i];            F_contentReg[regLen++] = new Array("IMG", img, img.width, img.height);        }        return true;    }    var regLen = F_contentReg.length;    var obj = document.getElementById(id);    if (! obj) return;    if (type == "TABLE") {        var rows = obj.rows;        for (j = 0; j < rows.length; j++) {            var cells = rows[j].cells;            for (i = 0; i < cells.length; i++) {                var cell = cells[i];                alert(cell.width);                F_contentReg[regLen++] = new Array("CELL", cell, cell.width, cell.height);            }        }    } else if (type == "LAYER") {        if (preserveTop)            F_contentReg[regLen++] = new Array("LAYER", obj, obj.style.top, obj.style.left, obj.style.width, obj.style.height, "1000");        else            F_contentReg[regLen++] = new Array("LAYER", obj, obj.style.top, obj.style.left, obj.style.width, obj.style.height, "0000");    } else if (type == "OBJECT") {        F_contentReg[regLen++] = new Array("OBJECT", obj, obj.width, obj.height);    }}function F_wndUnregContent( id ) {    // Initialization: automatically register all images    for (i = 0; i < F_contentReg.length; i++) {        if (F_contentReg[i][1].id == id) {            if (i < 1) {                var tmp1 = new Array();            } else {                var tmp1 = F_contentReg.slice(0, i);            }            if (i > F_contentReg.length - 2) {                var tmp2 = new Array();            } else {                var tmp2 = F_contentReg.slice(i + 1);            }            F_contentReg = tmp1.concat(tmp2);            break;        }    }}// Adapt contents to window sizefunction F_wndAdaptSize( wndw, wndh ) {    // Calculate size ratio    if (F_client.isNN4up) {        docWidth  = window.innerWidth;        docHeight = window.innerHeight;    } else if (F_client.isIE4up) {        docWidth  = document.body.clientWidth;        docHeight = document.body.clientHeight;    }    if (docWidth < wndw) {        top.F_firstInit = true;        F_wndResetSize();        return;    }    var hRatio = docWidth  / wndw;    var vRatio = docHeight / wndh;//  if (Math.abs(hRatio - vRatio) / hRatio > .1)//      vRatio = hRatio * ((hRatio - vRatio > 0) ? .9 : 1.1);    // Resize/displace all elements registered    for (i = 0; i < F_contentReg.length; i++) {        var entry = F_contentReg[i];        var obj = entry[1];        if (entry[0] == "IMG" || entry[0] == "CELL" || entry[0] == "OBJECT") {            obj.width  = parseInt(entry[2]) * hRatio;            obj.height = parseInt(entry[3]) * vRatio;        } else if (entry[0] == "LAYER") {            if (entry[6].charAt(0) == '1') {                obj.style.top    = parseInt(entry[2]);                obj.style.height = parseInt(entry[5]) * vRatio + parseInt(entry[2]) * (vRatio - 1);            } else {                obj.style.top    = parseInt(entry[2]) * vRatio;                obj.style.height = parseInt(entry[5]) * vRatio;            }            obj.style.left   = parseInt(entry[3]) * hRatio;            obj.style.width  = parseInt(entry[4]) * hRatio;        }    }}