function refreshDocumentOnClick() { document.location = '/' + document.all('dbPath').value + '/aRefreshDocument?OpenAgent&unid=' + document.all('docREF').value; } function downloadOnClick() { document.all('d_fDownloadState').value='0'; document.all('iframeDownload').src = '/' + document.all('dbPath').value + '/aStartDownload?OpenAgent&unid=' + document.all('fDataId').value; } function searchOnClick() { if( !isLengthValid( document.all('inputSearchQuery').value, C_MDOMINO_LENGTH_SEARCH ) ) { alert( C_MDOMINO_SEARCHLENGTHISINVALID + C_MDOMINO_LENGTH_SEARCH ); document.all('inputSearchQuery').focus(); return false; } //var query = getWithoutAccent( document.all('inputSearchQuery').value ); var query = convertTextToUnicode( document.all('inputSearchQuery').value ) //document.location = '/' + document.all('dbPath').value + '/frSearchResults?OpenForm&data_id=' + document.all('fDataId').value + '&type=' + document.all('selectSearchView').options(document.all('selectSearchView').selectedIndex).value + '&query=' + query ; document.location = '/' + document.all('dbPath').value + '/v_data_by_id/' + document.all('inputResultDocId').value + '?OpenDocument&type=' + document.all('selectSearchView').options(document.all('selectSearchView').selectedIndex).value + '&query=' + query ; return true; } function searchOnKeyDown() { if(event.keyCode == 13 ) { event.returnValue=false; searchOnClick(); } } /* function getWithoutAccent( text ) { text = text.replace(/Ö/g, "O"); text = text.replace(/Ü/g, "U"); text = text.replace(/Ó/g, "O"); text = text.replace(/Õ/g, "O"); text = text.replace(/Ú/g, "U"); text = text.replace(/É/g, "E"); text = text.replace(/Á/g, "A"); text = text.replace(/Í/g, "I"); text = text.replace(/Û/g, "U"); text = text.replace(/ö/g, "o"); text = text.replace(/ü/g, "u"); text = text.replace(/ó/g, "o"); text = text.replace(/õ/g, "o"); text = text.replace(/ú/g, "u"); text = text.replace(/é/g, "e"); text = text.replace(/á/g, "a"); text = text.replace(/í/g, "i"); text = text.replace(/û/g, "u"); return text; } */ function functionOnKeyPress() { event.returnValue=false; return false; } function documentOnKeyPress( e ) { var pK = document.all? window.event.keyCode:e.which; if( pK != 13 ) { return true; } else { if( document.activeElement.type == "textarea" ) return true; else return false; } } document.onkeypress = documentOnKeyPress; if (document.layers) document.captureEvents(Event.KEYPRESS); function submitOnClick() { var bIsValid = false; if( eval("validate_" + document.all('fSubform').value + "()") ) document.forms[0].submit(); } function validate_sfrSubscribeNewsletterBody() { if( !isLengthValid( document.all('SendTo').value, C_MDOMINO_LENGTH_EMAIL ) ) { alert( C_MDOMINO_EMAILLENGTHISINVALID + C_MDOMINO_LENGTH_EMAIL ); document.all('SendTo').focus(); return false; } if( !isEmailValid( document.all('SendTo').value ) ) { alert( C_MDOMINO_EMAILISINVALID ); document.all('SendTo').focus(); return false; } return true; } function validate_sfrMakeVoiceBody() { if( !isLengthValid( document.all('Body').value, C_MDOMINO_LENGTH_TEXT ) ) { alert( C_MDOMINO_TEXTLENGTHISINVALID + C_MDOMINO_LENGTH_TEXT ); document.all('Body').focus(); return false; } if( !isLengthValid( document.all('From').value, C_MDOMINO_LENGTH_EMAIL ) ) { alert( C_MDOMINO_EMAILLENGTHISINVALID + C_MDOMINO_LENGTH_EMAIL ); document.all('From').focus(); return false; } if( !isEmailValid( document.all('From').value ) ) { alert( C_MDOMINO_EMAILISINVALID ); document.all('From').focus(); return false; } document.all('Body').value = convertHtmlToText(document.all('Body').value); return true; } function validate_sfrSendDocumentBody() { if( !isLengthValid( document.all('SendTo').value, C_MDOMINO_LENGTH_EMAIL ) ) { alert( C_MDOMINO_EMAILLENGTHISINVALID + C_MDOMINO_LENGTH_EMAIL ); document.all('SendTo').focus(); return false; } if( !isLengthValid( document.all('From').value, C_MDOMINO_LENGTH_EMAIL ) ) { alert( C_MDOMINO_EMAILLENGTHISINVALID + C_MDOMINO_LENGTH_EMAIL ); document.all('From').focus(); return false; } if( !isLengthValid( document.all('Body').value, C_MDOMINO_LENGTH_TEXT ) ) { alert( C_MDOMINO_TEXTLENGTHISINVALID + C_MDOMINO_LENGTH_TEXT ); document.all('Body').focus(); return false; } if( !isEmailValid( document.all('SendTo').value ) ) { alert( C_MDOMINO_EMAILISINVALID ); document.all('SendTo').focus(); return false; } if( !isEmailValid( document.all('From').value ) ) { alert( C_MDOMINO_EMAILISINVALID ); document.all('From').focus(); return false; } return true; } function validate_sfrNewTopicBody() { return true; } function validate_sfrNewCommentBody() { return true; } function upOnClick( order, start, count ) { if( start != 1 ) { if( (start - count) <= 0 ) start = 1; else start = start - count; document.location = '/' + document.all('dbPath').value + '/vdesigndocuments/' + document.all('docREF').value + '?OpenDocument&order=' + order + '&start=' + start; } } function downOnClick( order, start, count, limit ) { if( (start + count) > limit ) return false; else document.location = '/' + document.all('dbPath').value + '/vdesigndocuments/' + document.all('docREF').value + '?OpenDocument&order=' + order + '&start=' + (start + count); }