function callPopupWeb(eventSrc) {
var e= eventSrc;
// find the popup
that follows
findPopup(e);
positionPopup(e)
oPopup.style.visibility = "visible";
popupOpen = true;
return;
}
//**** findPopup ****************************************************************************************
function findPopup(oX){
var e= oX;
var iNextTag;
for (var i=1;i<4; i++){
iNextTag= e.sourceIndex + i;
oPopup= document.all(iNextTag);
if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
break;
}
if (iNextTag != document.all.length) {
posX = window.event.clientX;
posY = window.event.clientY + document.body.scrollTop+10;
}
else closePopup();
}
//**** positionPopup ************************************************************************************
// Set size and position of popup.
// If it is off the page, move up, but not past the very top of the page.
function positionPopup(oX){
var e= oX;
var popupOffsetWidth = oPopup.offsetWidth;
//determine if popup will be offscreen to right
var rightlimit = posX + popupOffsetWidth;
if (rightlimit >= document.body.clientWidth)
posX -= (rightlimit - document.body.clientWidth);
if (posX < 0) posX = 0;
//position popup
oPopup.style.top = posY;
oPopup.style.left = posX;
var pageBottom = document.body.scrollTop + document.body.clientHeight;
var popupHeight = oPopup.offsetHeight;
if (popupHeight + posY >= pageBottom) {
if (popupHeight <= document.body.clientHeight)
oPopup.style.top = pageBottom - popupHeight;
else
oPopup.style.top = document.body.scrollTop;
}
}
//**** closePopup ****************************************************************************************
// Close Popup
function closePopup() {
oPopup.style.visibility = "hidden";
popupOpen = false;
return;
}
//********************************************* GENERAL FUNCTIONS ************************************************
//**************************************************************************************************************************
//***ajustImg *************************************************************************************************************
// expands an image to the with of the window or shrinks it to 90px
function ajustImg(eventSrc) {
var e= eventSrc;
var fullWidth= document.body.offsetWidth;
fullWidth = fullWidth - 50;
if (e.style.pixelWidth==90)
e.style.pixelWidth=fullWidth;
else e.style.pixelWidth=90;
}
//** getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
// extracts the file location (CHM::/HTM) URL
function getURL(sHREF) {
var spaces= /\s/g
var eH = unescape(sHREF);
eH = eH.replace(spaces,"");
var eH_= eH.toLowerCase();
var sParamFILE= "";
var sParamCHM= "";
var iFILE= eH_.lastIndexOf("file=");
if (iFILE!=-1){
iEND= iFILE +1;
sParamFILE = eH.substring(iFILE+5,eH.length);
}
var iCHM = eH_.lastIndexOf("chm=");
if (iCHM!=-1){
iEND = iCHM +1; // iEND used by callShortcut
sParamCHM = eH.substring(iCHM+4, iFILE);
sParamFILE= sParamCHM+"::/"+sParamFILE;
}
return sParamFILE;
}
//****************************************************************************************************************************
//******************************************** IE5 PERSISTENCE *************************************************************
//****************************************************************************************************************************
var oTD,iTD; // persistence
//****** Persistence for userData *********************************************************************************************
function getChecklistState(){
var pageID= addID();
if (checklist.all== "[object]") {
oTD=checklist.all.tags("INPUT");
iTD= oTD.length;
}
else
{
printing = "TRUE";
isPersistent = false;
return;
}
if (iTD == 0){
printing = "TRUE";
isPersistent = false;
return;
}
checklist.load("oXMLStore");
if (checklist.getAttribute("sPersist"+pageID+"0"))
for (i=0; i
&& are found
function resizeDiv(){
if (printing == "TRUE") return;
var oNav = document.all.item("nav");
var oText= document.all.item("text");
if (popupOpen) closePopup();
if (oText == null) return;
if (oNav != null){
document.all.nav.style.width= document.body.offsetWidth;
document.all.text.style.width= document.body.offsetWidth-4;
document.all.text.style.top= document.all.nav.offsetHeight;
if (document.body.offsetHeight > document.all.nav.offsetHeight)
document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
else document.all.text.style.height=0;
}
}
//** addID *************************************************************************************************************
function addID(){
var locID = document.location.href;
var iHTM = locID.lastIndexOf(".htm");
var iName=locID.lastIndexOf("/");
locID = locID.substring(iName+1,iHTM);
return locID;
}
//** set_to_print ***************
function set_to_print(){
var i;
printing = "TRUE";
for (i=0; i < document.all.length; i++){
if (document.all[i].id == "expand") {
callExpand(document.all[i]);
single = "TRUE";
}
if (document.all[i].tagName == "BODY") {
document.all[i].scroll = "auto";
}
if (document.all[i].tagName == "A") {
document.all[i].outerHTML = "" + document.all[i].innerHTML + "";
}
}
}
//** used to reset a page if needed ********************
function reset_form(){
if (single == "TRUE") document.location.reload();
}
//** on error routine *********************************
function errorHandler() {
// alert("Error Handled");
return true;
}