function InsertTag(oElement, ThisTagName){ if ( typeof(oElement) == 'object' ) { oElement.focus(); if ( typeof(document.selection.createRange()) == 'object' ) { var seltext = document.selection.createRange(); seltext.text = '{' +ThisTagName +'{' +seltext.text +'}' +ThisTagName +'}' ; document.selection.clear; } } } function test(theForm) { if (theForm.elements('user_id').value == '') { alert('Please specify your User name (at least 3 char.).'); theForm.elements('user_id').focus(); return (false); } if (theForm.elements('user_surname').value == '') { alert('Please specify your Last name.'); theForm.elements('user_surname').focus(); return (false); } if (theForm.elements('user_firstname').value == '') { alert('Please specify your First name.'); theForm.elements('user_firstname').focus(); return (false); } if (theForm.elements('user_firstname').value == '') { alert('Please specify your First name.'); theForm.elements('user_firstname').focus(); return (false); } if (theForm.elements('user_company').value == '') { alert('Please specify your Company.'); theForm.elements('user_company').focus(); return (false); } if (theForm.elements('user_position').value == '') { alert('Please specify your Position.'); theForm.elements('user_position').focus(); return (false); } if (theForm.elements('user_street').value == '') { alert('Please specify your Street.'); theForm.elements('user_street').focus(); return (false); } if (theForm.elements('user_city').value == '') { alert('Please specify your City.'); theForm.elements('user_city').focus(); return (false); } if (theForm.elements('user_zip').value == '') { alert('Please specify your ZIP.'); theForm.elements('user_zip').focus(); return (false); } if (theForm.elements('user_country').value == '') { alert('Please specify your Country.'); theForm.elements('user_country').focus(); return (false); } if (theForm.elements('user_phone').value == '') { alert('Please specify your Phone.'); theForm.elements('user_phone').focus(); return (false); } if (theForm.elements('user_email').value=='' ) { alert('Please specify your e-mail.'); theForm.elements('user_email').focus(); return (false); } if (theForm.elements('user_email').value.length != 0) { sta = 0 for (i = 0; i < theForm.elements('user_email').value.length; i++) { if (theForm.elements('user_email').value.substring(i, i+1) == '.' && sta == 1) { sta++; } if (theForm.elements('user_email').value.substring(i, i+1) == '@') { sta++; } } if (sta != 2) { alert('Please insert your valid e-mail.'); theForm.elements('user_email').focus(); return (false); } } return (true); } function testOrderForm(theForm) { if (theForm.elements('user_firstname').value == '') { alert(''); theForm.elements('user_firstname').focus(); return (false); } if (theForm.elements('user_surname').value == '') { alert(''); theForm.elements('user_surname').focus(); return (false); } if (theForm.elements('user_email').value=='' ) { alert(''); theForm.elements('user_email').focus(); return (false); } if (theForm.elements('user_email').value.length != 0) { sta = 0 for (i = 0; i < theForm.elements('user_email').value.length; i++) { if (theForm.elements('user_email').value.substring(i, i+1) == '.' && sta == 1) { sta++; } if (theForm.elements('user_email').value.substring(i, i+1) == '@') { sta++; } } if (sta != 2) { alert(''); theForm.elements('user_email').focus(); return (false); } } return (true); } function openWindow(sPage, nHeight, nWidth) { window.open(sPage, null, 'height='+ nHeight +',width='+ nWidth +',status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes'); } function openNew(oAnchor){ window.open(oAnchor.href, '_blank'); return false; } function MessageTo(UserName){ document.forms.messform.item('message').value = document.forms.messform.item('message').value +UserName +': '; } function showSearchForm() { var oElement = document.getElementById('searchAForm'); if (typeof(oElement) == 'object') { if (oElement.style.display == 'none') { oElement.style.display = ''; } else { oElement.style.display = 'none'; } } } function submitInq(sElName, nInqID, nQID) { var oEl = document.getElementById(sElName); if (typeof(oEl) == 'object') { oEl.elements[nInqID].value = nQID; oEl.submit(); } }