var submitCount; submitCount = 0; function openwindow(windowurl, windowname, windowwidth, windowheight) { var winl = (screen.width - windowwidth) / 2; var wint = (screen.height - windowheight) / 2; winprops = 'height='+ windowheight +',width='+ windowwidth +',top='+ wint +',left=' + winl + 'resizable=1,scrollbars=1'; window.open(windowurl, windowname, winprops); } function closewindow() { window.close(); } function submitFormOnce(eleForm) { if (submitCount == 0) { eleForm.submit(); submitCount += 1; } } function deleterecord(deleteUrl, deleteMessage) { if (confirm(deleteMessage)) { window.location = deleteUrl; } } function limittextarea (formTextAreaElement, formTextBoxElement, ElementMaxLenght) { if (formTextAreaElement.value.length > ElementMaxLenght) { formTextAreaElement.value = formTextAreaElement.value.substring(0, ElementMaxLenght); } formTextBoxElement.value = ElementMaxLenght - formTextAreaElement.value.length; } function redirectpage(redirecttUrl) { window.location = redirecttUrl; } function redirectparent(parentUrl) { opener.location = parentUrl; } function breakfromframe(urlPage) { if (top.frames.length != 0) { parent.location = urlPage; } } function submitActive(formName, ElementName, ElementValue) { ElementName.value = ElementValue; formName.submit(); } function fillparentformelement(formname, formelementname, formelementvalue) { opener[formname][formelementname].value = formelementvalue; } function NewWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable' window.open(mypage,myname,settings); } function breakfromframe(urlPage) { if (top.frames.length != 0) { parent.location = urlPage; } else { parent.location = urlPage; } } function addformatting(formElement, htmlTag) { var formatContent = "[" + htmlTag + "][/" + htmlTag + "]"; formElement.value += formatContent; } function addimage(formElement) { var imagelocation; imagelocation = prompt("Enter the location of the image : ", "http://"); if (imagelocation != "" && imagelocation != null) { var formatContent = "[IMG]" + imagelocation + "[/IMG]"; formElement.value += formatContent; } } function addurl(formElement) { var imagelocation; imagelocation = prompt("", "http://"); if (imagelocation != "" && imagelocation != null) { var formatContent = "[URL]" + imagelocation + "[/URL]"; formElement.value += formatContent; } } function addsmilie(formelement, smilie) { formelement.value += smilie; } function CheckAllDelete(formElement, fieldElement, deleteFieldElement) { var val = document[formElement][fieldElement].checked; for (var i=0; i < document[formElement].elements.length; i++){ var e = document[formElement].elements[i]; if (e.name == deleteFieldElement){ e.checked = val; } } } function emailArtistPicture() { alert("The picture has been sent to your friend(s). Thank You!"); document.photo.submit(); } function addToBookmarks(url,title){ if (document.all){ window.external.AddFavorite(url,title); } }