var nField = 0; var nRefresh = 1; function ShowList(nIndex,sPage,nTop,nLeft,nHeight,nWidth,nAssoc,nValue) { nField = nIndex; var IfrRef = document.getElementById('DropDown'); // Use IMaxRight to define the furthest right point that any ShowList frame should be displayed. var IMaxRight = 790; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { IMaxRight = window.innerWidth; } if (navigator.appName.indexOf("Microsoft")!=-1) { IMaxRight = document.body.offsetWidth; } } IfrRef.style.width = nWidth; IfrRef.style.height = nHeight; IfrRef.style.top = nTop; if (nWidth + nLeft > IMaxRight) { IfrRef.style.left = IMaxRight - nWidth; } else { IfrRef.style.left = nLeft; } IfrRef.style.zIndex = 0; IfrRef.src = sPage + "?a=" + nAssoc + "&w=" + nValue; IfrRef.style.display = "block"; } function ShowDescr(nIndex,nTop,nLeft,nHeight,nWidth,sValue) { nField = nIndex; var IfrRef = document.getElementById('DropDown'); IfrRef.style.width = nWidth; IfrRef.style.height = nHeight; IfrRef.style.top = nTop; IfrRef.style.left = nLeft; IfrRef.style.zIndex = 0; sValue = sValue.replace(/&/g,"%26"); IfrRef.src = "InputDescr.asp?d=" + sValue; IfrRef.style.display = "block"; } function CloseList() { var IfrRef = document.getElementById('DropDown'); IfrRef.src = "javascript:'';"; IfrRef.style.display = "none"; } function CloseListRefresh() { var IfrRef = document.getElementById('DropDown'); IfrRef.src = "javascript:'';"; IfrRef.style.display = "none"; if (nRefresh != 0) window.location.replace('webtemplate.asp'); } function CloseListRefreshP(sNewPage) { var IfrRef = document.getElementById('DropDown'); IfrRef.src = "javascript:'';"; IfrRef.style.display = "none"; window.location.replace(sNewPage); } function ShowCalendar(fForm, fField,nTop,nLeft) { var strField; strField = fForm + fField.name; var IfrRef = document.getElementById('Calendar'); IfrRef.style.width = 270; IfrRef.style.height = 170; IfrRef.style.top = nTop; IfrRef.style.left = nLeft; IfrRef.style.zIndex = 0; IfrRef.src = "SelCalendar.asp?f=" + strField + "&d="+ fField.value, "calendarPopup"; IfrRef.style.display = "block"; } function ShowCalendar2(fForm, fField,nTop,nLeft) { var strField; strField = fForm + fField; var IfrRef = document.getElementById('Calendar'); IfrRef.style.width = 270; IfrRef.style.height = 170; IfrRef.style.top = nTop; IfrRef.style.left = nLeft; IfrRef.style.zIndex = 0; IfrRef.src = "SelCalendar.asp?f=" + strField, "calendarPopup"; IfrRef.style.display = "block"; } function ShowPostDate(fForm, fField, nAssoc, nTop, nLeft) { var strField; strField = fForm + fField.name; var IfrRef = document.getElementById('Calendar'); IfrRef.style.width = 270; IfrRef.style.height = 170; IfrRef.style.top = nTop; IfrRef.style.left = nLeft; IfrRef.style.zIndex = 0; IfrRef.src = "SelPostDate.asp?f=" + strField + "&a=" + nAssoc, "calendarPopup"; IfrRef.style.display = "block"; } function CloseCalendar() { var IfrRef = document.getElementById('Calendar'); IfrRef.src = "javascript:'';"; IfrRef.style.display = "none"; } function SendEmail(nTop,nLeft,nType,nKey) { var IfrRef = document.getElementById('DropDown'); IfrRef.style.width = 450; IfrRef.style.height = 300; IfrRef.style.top = nTop; IfrRef.style.left = nLeft; IfrRef.style.zIndex = 0; IfrRef.src = "emailform.asp?t="+nType+"&id="+nKey; IfrRef.style.display = "block"; } function getElementPosition(elemID, position) { var offsetTrail = document.getElementById(elemID); //if the element doesn't have an ID, try to find it by NAME if (offsetTrail == null) offsetTrail = document.getElementsByName(elemID)[0]; var offsetLeft = 0; var offsetTop = 0; while (offsetTrail) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { offsetLeft += document.body.leftMargin; offsetTop += document.body.topMargin; } if (position == 'top') return offsetTop else return offsetLeft; } function getElementSize(elemID, direction) { var ns4 = document.layers; var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) ||(navigator.userAgent.indexOf("Opera/5")!=-1); var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1); var agt=navigator.userAgent.toLowerCase(); var mac = (agt.indexOf("mac")!=-1); var ie = (agt.indexOf("msie") != -1); var mac_ie = mac && ie; if (direction == 'height') { if (ns4) { var elem = getObjNN4(document, elemID); return elem.clip.height; } else { if(document.getElementById) { var elem = document.getElementById(elemID); } else if (document.all) { var elem = document.all[elemID]; } if (op5) { xPos = elem.style.pixelHeight; } else { xPos = elem.offsetHeight; } return xPos; } } else if (direction == 'width') { if (ns4) { var elem = getObjNN4(document, elemID); return elem.clip.width; } else { if(document.getElementById) { var elem = document.getElementById(elemID); } else if (document.all) { var elem = document.all[elemID]; } if (op5) { xPos = elem.style.pixelWidth; } else { xPos = elem.offsetWidth; } return xPos; } } } function editpage(sPage,nTop,nLeft,nHeight,nWidth,sParam,nSection) { var IfrRef = document.getElementById('DropDown'); IfrRef.style.width = nWidth; IfrRef.style.height = nHeight; IfrRef.style.top = nTop; IfrRef.style.left = nLeft; IfrRef.style.zIndex = 0; IfrRef.src = sPage + "?s=" + nSection + "&p=" + sParam; IfrRef.style.display = "block"; nRefresh = 0; } function showevent(sPage,nTop,nLeft) { nLeft = nLeft + window.screenLeft; nTop = nTop + window.screenTop; window.open(sPage, 'calendarPopup', "'alwaysRaised=yes,dependent=yes,top=" + nTop + ",left=" + nLeft + ",height=400,width=450,resizable=no,scrollbars=1'"); } function shownewpage(sPage) { var nLeft,nTop,nHeight,nWidth; nLeft = window.screenLeft; nTop = window.screenTop; nHeight = window.innerHeight; nWidth = window.innerWidth; window.open(sPage, 'NewPopup', "'alwaysRaised=yes,dependent=no,top=" + nTop + ",left=" + nLeft + ",height=" + nHeight + ",width=" + nWidth + ",resizable=yes'"); }