function getPosition(ElementID, OffsetType) { var el=document.getElementById(ElementID); var total=(OffsetType=="left")? el.offsetLeft : el.offsetTop; var parent=el.offsetParent; while (parent!=null) { total=(OffsetType=="left")? total+parent.offsetLeft : total+parent.offsetTop; parent=parent.offsetParent; } return total; } function SetUpInfo(ElementID1, ElementID2, offset, width, Message) { var el=document.getElementById(ElementID1); var el2=document.getElementById(ElementID2); var mouseoverstr = "Simpleshowitem('" + ElementID2 + "')"; var mouseoutstr = "Simplehideitem('" + ElementID2 + "')"; /* this doesn't seem to work right now el.onmouseover = mouseoverstr; el.onmouseout = mouseoutstr; */ el2.align='left'; el2.style.zIndex='20'; /* z-index move to front */ el2.style.position='absolute'; el2.style.backgroundColor='#FFFFFF'; /* background-color is white to hide underlying text */ el2.style.width = width; el2.style.left = el2.offsetLeft - offset + 'px'; /* - offset; /* was 300px; */ el2.style.visibility='hidden'; el2.style.border=' 1px solid #c0c0c0'; el2.style.padding='2px 15px 15px 15px'; el2.innerHTML = Message; } function showitem(elmnt) { document.getElementById(elmnt).style.visibility="visible" } function hideitem(elmnt) { document.getElementById(elmnt).style.visibility="hidden" } function validate() { /* for when a reader wishes to talk with us */ if (document.MochaContact.Name.value == '') { alert('Please enter your name.'); document.MochaContact.Name.focus(); return false; } if (document.MochaContact.line2.value == '') { alert('Please enter your email address.'); document.MochaContact.line2.focus(); return false; } if (document.MochaContact.Comment.value == '') { alert('Please enter a non-null comment'); document.MochaContact.Comment.focus(); return false; } if (document.MochaContact.EMail.value != '') { window.open("thanks.htm", "_self"); /* alert('Please enter your e-mail address.'); document.MochaContact.EMail.focus(); */ return false; } return true; }