function rot13 (string) { var aCode = 'a'.charCodeAt(); var zCode = 'z'.charCodeAt(); var ACode = 'A'.charCodeAt(); var ZCode = 'Z'.charCodeAt(); var result = ''; for (var c = 0; c < string.length; c++) { var charCode = string.charCodeAt(c); if (charCode >= aCode && charCode <= zCode) charCode = aCode + (charCode - aCode + 13) % 26; else if (charCode >= ACode && charCode <= ZCode) charCode = ACode + (charCode - ACode + 13) % 26; result += String.fromCharCode(charCode); } return result; } // > function write_rot13(string){ document.write(rot13(string)); } function ematch(email,empty_ok) { if(empty_ok!='' && email == '') { return true; } var email_ok = email.match(/^[0-9a-z_\-\.]+@[0-9a-z_\-\.]+\.[0-9a-z_\-\.]{2,3}$/i); return email_ok; } function search_page(sp_id) { var url = "/index.php"; var spform = document.getElementById("spform"); var sp_url = document.getElementById(sp_id); if(typeof sp_url!='undefined') { url = sp_url.value; } spform.action = url; spform.submit(); } function window_status(txt) { if(typeof txt=='undefined') { txt = ''; } window.status = txt; return true; } function constrain_textarea(e, textarea, maxrows) { var keynum = false; var fieldname = textarea.name; var fieldvalue= textarea.value; if(!e) { e = window.event; } try { keynum = e.keyCode; } catch(ev) { keynum = e.which; } if(maxrows!='' || maxrows!=0) { var rowcount = fieldvalue.split('\n').length; if ( rowcount < maxrows ) { return true; } else { if(keynum==13) { textarea.selected = false; return false; } } } } // > function quicklinkhover( divObj,divObjID,showhide ) { var linktag_id = divObjID + "_linktag"; var linktagObj = document.getElementById( linktag_id ); var bgcolor = "#003d78"; var fgcolor = "#ffffff"; if(!showhide) { bgcolor = "#ffffff"; fgcolor = "#003d78"; } divObj.style.backgroundColor = bgcolor; linktagObj.style.color = fgcolor; } function iconMouseOn ( imgObj, imgName ) { var left = imgName.split("."); imgObj.src = "/images/"+left+"-on.gif"; } function iconMouseOut ( imgObj, imgName ) { var left = imgName.split("-"); imgObj.src = "/images/"+left+".gif"; } function applyConfirm () { var popup_box = confirm("You are about to apply for this gig.\n\nYou will not be able to undo this action!"); return popup_box; } function bookConfirm () { var popup_box = confirm("You are about to book this gig.\n\nYou will not be able to undo this action without directly contacting the artist!"); return popup_box; } function newBookConfirm (linkObj) { var popup_box = confirm("You are about to book this gig.\n\nYou will not be able to undo this action without directly contacting the artist!"); if (popup_box) linkObj.parentNode.submit(); return false; } function moveCalendar(imgId, direction) { var parentDiv = document.getElementById('calTab' + imgId); var nextDiv = document.getElementById('calTab' + (imgId + direction)); // if (direction < 0) { // nextDiv = parentDiv.previousSibling.previousSibling; // } else if (direction > 0) { // nextDiv = parentDiv.nextSibling.nextSibling; // } else { // return; // } parentDiv.style.display = "none"; nextDiv.style.display = "block"; } //*** Pop-up windows function pop_captchaexp() { window.open("/popup_captchaexplain.php", "captcha_explain", "left=15, top=10, width=450, height=270, status=no, toolbar=no, location=no, menubar=no, directories=no, resizeable=no, scrollbars=no"); } function pop_clickexp() { window.open("/popup_multiclickexplain.php", "multiclicklike_explain", "left=15, top=10, width=450, height=270, status=no, toolbar=no, location=no, menubar=no, directories=no, resizeable=no, scrollbars=no"); } function pop_tc() { window.open("popup_termsofservice.php","member_clickwrap","width=500,height=650,location=no,toolbar=no,resizeable=yes,status=no,menubar=no,scrollbars=yes,titlebar=yes,top=15,left=15"); } function pop_invkeyexp() { window.open("/popup_invkeyexplain.php", "invkey_explain", "left=15, top=10, width=450, height=270, status=no, toolbar=no, location=no, menubar=no, directories=no, resizeable=no, scrollbars=no"); } function genremax(selObj,maxCount) { var curSelCount = 0; var option_disabled = false; var option_color = "#000000"; for (var i=selObj.options.length-1; i >= 0;i--) { if (selObj.options[i].selected) { curSelCount++; } } if( curSelCount >= maxCount ) { option_disabled = true; option_color = "#e8e8e8"; } var i_selected = 0; for (var i=selObj.options.length-1; i >= 0;i--) { if(selObj.options[i].selected) { i_selected++; //for ie if(selObj.options[i].disabled){ selObj.options[i].selected = false; } } if(!selObj.options[i].selected || i_selected > maxCount) { selObj.options[i].selected = false; try{ selObj.options[i].disabled = option_disabled; } catch(e){} selObj.options[i].style.color = option_color; } } if( option_disabled ){ return false; } return true; }