var isMinNN4 = document.layers ? true : false; var isMinIE4 = document.all ? true : false; var isW3C = document.getElementById ? true : false; // W3C stands for the W3C standard, implemented in Mozilla ( and Netscape 6 ) and IE5 var isMinIE5 = isW3C; var mouseLeft = 0; var mouseTop = 0; function setMouseCoordinate( e ) { var newLeft = 0; var newTop = 0; if ( isMinIE4 ) { newLeft = document.body.scrollLeft + event.clientX newTop = document.body.scrollTop + event.clientY } else if ( isMinNN4 || isW3C ) { newLeft = e.pageX; newTop = e.pageY; } if ( Math.abs( newLeft - mouseLeft ) > 10 ) mouseLeft = newLeft; if ( Math.abs( newTop - mouseTop ) > 10 ) mouseTop = newTop; } document.onmousemove = setMouseCoordinate; function findElementPos( obj ) { var curleft = 0; var curtop = 0; if ( obj.offsetParent ) { curleft = obj.offsetLeft; curtop = obj.offsetTop; while ( obj = obj.offsetParent ) { curleft += obj.offsetLeft; curtop += obj.offsetTop; } } return [curleft,curtop]; } function ttDisplay( pObj, pLayer ) { var theObj = document.getElementById( pObj ); var leftTop = findElementPos( theObj ); var newLeft = leftTop[0] + 20; var newTop = leftTop[1] + 30; if ( isMinIE4 || isW3C ) { if ( isW3C ) { document.getElementById( pLayer ).style.left = newLeft; document.getElementById( pLayer ).style.top = newTop; } else { document.getElementById( pLayer ).style.pixelLeft = newLeft; document.getElementById( pLayer ).style.pixelTop = newTop; } document.getElementById( pLayer ).style.display = "inline"; document.getElementById( pLayer ).style.visibility = "visible"; } else if ( isMinNN4 ) { document.getElementById( pLayer ).left = newLeft; document.getElementById( pLayer ).top = newTop; document.getElementById( pLayer ).display = "inline"; document.getElementById( pLayer ).visibility = "show"; } } function ttHide( pLayer ) { if ( isMinIE4 || isW3C ) { document.getElementById( pLayer ).style.visibility = "hidden"; } else if ( isMinNN4 ) { document.getElementById( pLayer ).visibility = "hidden"; } } function ReturnReject( pEvent ) { var keyPressed = ( pEvent ? pEvent.which : window.event.keyCode ); return ( keyPressed != 13 ); } document.onkeypress = ReturnReject; if (document.layers) document.captureEvents( Event.KEYPRESS ); function DeletetionVerify( pMessage, pActionCode, pIdName, pIdValue ) { if ( pMessage.length < 1 ) pMessage = 'Confirm Delete'; if ( confirm( pMessage ) ) { document.forms.theForm.actionCode.value = pActionCode; pIdName.value = pIdValue; document.forms.theForm.submit(); } } function ButtonClick( pForm ) { pForm.submit(); } function ButtonTest() { alert( "ButtonTest" ); return false; } // document.forms.theForm function ButtonClickAction( pForm, pActionCode ) { pForm.actionCode.value = pActionCode; pForm.submit(); } function ButtonClickPage( pForm, pPageCode, pActionCode ) { pForm.pageCode.value = pPageCode; pForm.actionCode.value = pActionCode; pForm.submit(); } function AcceptReturn( e, pForm, pPageCode, pActionCode ) { if ( e.keyCode == 13 ) { pForm.pageCode.value = pPageCode; pForm.actionCode.value = pActionCode; pForm.submit(); } } function ChangeDefaultLocation( pForm ) { pForm.submit(); } function SelectLanguage( pLanguage ) { document.forms.theForm.defaultLanguage.value = pLanguage; document.forms.theForm.submit(); } function PhoneFormat( pPhone ) { origString = pPhone; testString = pPhone; newString = ''; if ( testString != '' ) { var textLen = testString.length; var newString = ''; var testChar = ''; for ( currPos = 0; currPos < textLen; currPos++ ){ testChar = testString.substr( currPos, 1 ); if ( testChar == '*' ) { newString = origString; break; } if ( testChar >= '0' && testChar <= '9' ) { switch ( newString.length ) { case 3: newString = newString + "-"; break; case 7: newString = newString + "-"; break; case 12: newString = newString + "x"; break; } newString = newString + testChar; } } } return ( newString ); } function PhoneCheck( pWhichPhone ) { testString = PhoneFormat( pWhichPhone.value ); if ( testString != '' ) pWhichPhone.value = testString; } function PhoneCheck2( pWhichPhone ) { origString = pWhichPhone.value; testString = pWhichPhone.value; if ( testString != '' ) { var textLen = testString.length; var newString = ''; var testChar = ''; for ( currPos = 0; currPos < textLen; currPos++ ){ testChar = testString.substr( currPos, 1 ); if ( testChar == '*' ) { newString = origString; break; } if ( testChar >= '0' && testChar <= '9' ) { switch ( newString.length ) { case 3: newString = newString + " "; break; case 7: newString = newString + " "; break; } if ( newString.length < 12 ) newString = newString + testChar; } } pWhichPhone.value = newString; } } function adDetailPopup( pURL ) { newWindow = window.open( pURL, "AdDetailPopup", "toolbar = 0, location = 0, directories = 0, status = 0, menubar = 1, scrollbars = 1, resizable = 1, top = 50, left = 50" ); newWindow.resizeTo( 800, 800 ); newWindow.focus(); } function photoPopup( pURL ) { newWindow = window.open( '', 'PhotoPopup', 'toolbar = 0, location = 0, directories = 0, status = 0, menubar = 0, scrollbars = 1, resizable = 1, width = 480, height = 420, top = 50, left = 50' ); newWindow.document.write( "" + "