function findFocus(e){var targ;if(!e){var e=window.event;} if(e.target){targ=e.target;}else if(e.srcElement){targ=e.srcElement;} if(targ.nodeType==3){targ=targ.parentNode;} return targ;} function buttonCap(){} function logOut(){ht=document.getElementsByTagName("html");ht[0].style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";if(confirm('Are you sure you want to log out?')){return true;}else{ht[0].style.filter="";return false;} } /* All browser compatible version of logOut() function logOut(){ // You can change 30 and 0.3 to suit your 'tastes' :) bo = document.getElementsByTagName('body'); bo[0].style.filter = 'Alpha(opacity="30")'; bo[0].style.MozOpacity = '0.3'; bo[0].style.opacity = '0.3'; if (confirm('$vbphrase[sure_you_want_to_log_out]')){ return true; }else{ bo[0].style.filter = 'Alpha(opacity="100")'; bo[0].style.MozOpacity = '1'; bo[0].style.opacity = '1'; return false; } } */ function keyCap(e,keyCancelled){if(keyCancelled==true){return false;} if(navigator.appName=='Microsoft Internet Explorer'){var keyPressed=window.event.keyCode var eventCaptured=event;}else if(navigator.appName=='Netscape'){var keyPressed=document.layers ? e.which:document.all ? event.keyCode:e.keyCode;var eventCaptured=e;} if(keyPressed==13){keyCancelled=cancelKeyPress(eventCaptured);return false;}else if(keyPressed==8){userFocus=findFocus(e) if(userFocus.type==undefined||userFocus.type=='select-one'||userFocus.type=='select-multi'){keyCancelled=cancelKeyPress(eventCaptured);alert("Please do not use the Backspace key while in a Registration. \nYou will have the oportunity to edit your information later.");return false;} }else if(keyPressed==18){keyCancelled=cancelKeyPress(eventCaptured);alert("Alt Key has been disabled so ensure your registration process is smooth and free of errors.");return false;}else if(keyPressed==93){keyCancelled=cancelKeyPress(eventCaptured);alert("The Menu Key has been disabled so ensure your registration process is smooth and free of errors.");return false;}else if(keyPressed==116){userFocus=findFocus(e) if(userFocus.type==undefined||userFocus.type=='select-one'||userFocus.type=='select-multi'){keyCancelled=cancelKeyPress(eventCaptured);alert("The Refresh button has been disabled so ensure your registration process is smooth and free of errors.");return false;} } } function cancelKeyPress(eventCaptured){if(navigator.appName=='Microsoft Internet Explorer'){eventCaptured.keyCode=0;} eventCaptured.returnValue=false;eventCaptured.cancelBubble=true;return true;} function checkRequiredField(form,field,requiredField,requiredValue,confirmMessage){switch(form[requiredField].type){case 'checkbox': if(form[requiredField].checked!=1){var requiredFieldValue=confirm(confirmMessage,'');form[requiredField].checked=requiredFieldValue;} break;} if(requiredFieldValue==0){switch(form[field.name].type){case 'checkbox': form[field.name].checked=requiredFieldValue;break;case 'text': form[field.name].value='';break;} } } function changeDivDisplay(divName){layer=document.getElementById(divName);if(layer!=null){if(layer.style.display=='none'||layer.style.display==''){layer.style.display='block';return true;}else{layer.style.display='none';return true;} } } function hideDiv(divName){layer=document.getElementById(divName);if(layer!=null){layer.style.display='none';return true;} } function checkAll(form,field){if(form['check'].checked==0){checkValue=0;}else{checkValue=1;} for(i=0;i < form[field].length;i++){form[field][i].checked=checkValue;} } function validateLogin(form){formValidation=validateForm(form);if(formValidation==true){window.open('','evsminder','resizable=yes, scrollbars=yes, location=no, menubar=no');return true;} return false;} function closeParent(){self.opener=this;self.close();} function moveUpList(listField){if(listField.length==-1){alert("There are no values which can be moved!");}else{var selected=listField.selectedIndex;if(selected==-1){alert("You must select an entry to be moved!");}else{if(listField.length==0){alert("There is only one entry!\nThe one entry will remain in place.");}else{if(selected==0){alert("The first entry in the list cannot be moved up.");}else{var moveText1=listField[selected-1].text;var moveText2=listField[selected].text;var moveValue1=listField[selected-1].value;var moveValue2=listField[selected].value;listField[selected].text=moveText1;listField[selected].value=moveValue1;listField[selected-1].text=moveText2;listField[selected-1].value=moveValue2;listField.selectedIndex=selected-1;} } } } } function moveDownList(listField){if(listField.length==-1){alert("There are no values which can be moved!");}else{var selected=listField.selectedIndex;if(selected==-1){alert("You must select an entry to be moved!");}else{if(listField.length==0){alert("There is only one entry!\nThe one entry will remain in place.");}else{if(selected==listField.length-1){alert("The last entry in the list cannot be moved down.");}else{var moveText1=listField[selected+1].text;var moveText2=listField[selected].text;var moveValue1=listField[selected+1].value;var moveValue2=listField[selected].value;listField[selected].text=moveText1;listField[selected].value=moveValue1;listField[selected+1].text=moveText2;listField[selected+1].value=moveValue2;listField.selectedIndex=selected+1;} } } } } function addOption(elementName,txt,val,selectOption){var objOption=new Option(txt,val);var element=document.getElementsByName(elementName);element[0].options[element[0].length]=new Option(txt,val);} function removeAllOptions(selectBox){var i;selectArray=document.getElementsByName(selectBox);selectBox=selectArray[0];if(selectBox.options.length > 0){for(i=selectBox.options.length-1;i>0;i--){selectBox.remove(i);} } } function selectOption(elementName,selectValue){elementArray=document.getElementsByName(elementName);element=elementArray[0];if(element!=null){for(iz=0;iz < element.options.length;iz++){if(element.options[iz].value==selectValue){element.options[iz].selected=1;} } } } function changeFormAction(form){form.action=form.action+form.type_name.value;} function GetSelectedText(box){var boxText="";for(var i=0;i 0){if(makestr.indexOf("form_id")==-1){form.submit();return true;} } return false;} function SubmitToEvent(form){var makestr=GetSelectedText(form.events_id);makestr=escape(makestr);if(makestr.length==0){alert("Please Select a Event.");return false;} if(makestr.length > 0){if(makestr.indexOf("events_id")==-1){form.submit();return true;} } return false;} function SubmitToShow(form){var makestr=GetSelectedText(form.shows_id);makestr=escape(makestr);if(makestr.length==0){alert("Please Select a show.");return false;} if(makestr.length > 0){if(makestr.indexOf("shows_id")==-1){form.submit();return true;} } return false;} function SubmitToType(){document.createSpecialEvent.submit();return true;} function remove(input){for(var i=0;i < input.length;i++){if(input[i].selected){input.options[i]=null;i=-1;} } } function clear(input){while(input.options.length > 0){input.options[0]=null;} } function add(firstInput,secondInput){for(var i=0;i < firstInput.length;i++){if(firstInput[i].selected){if(secondInput.length > 0){for(var ia=0;ia < secondInput.length;ia++){if(secondInput[ia].value==firstInput[i].value){var set=1;} } if(set!=1){var defaultSelected=false;var selected=true;var optionName=new Option(firstInput[i].text,firstInput[i].value,defaultSelected,selected) var length=secondInput.length;secondInput.options[length]=optionName;} }else{var defaultSelected=false;var selected=true;var optionName=new Option(firstInput[i].text,firstInput[i].value,defaultSelected,selected) var length=secondInput.length;secondInput.options[length]=optionName;} } } } function build(form){clear(form.form_requiredcontact_list);clear(form.form_requiredcontact_box);form.form_requiredcontact.value="";for(var i=0;i < form.form_contact_box.length;i++){var defaultSelected=false;var selected=true;var optionName=new Option(form.form_contact_box[i].text,form.form_contact_box[i].value,defaultSelected,selected) var length=form.form_requiredcontact_list.length;form.form_requiredcontact_list.options[i]=optionName;form.form_contact.value=form.form_contact_box[i].value+","+form.form_contact.value;} } function buildRequiredContact(form){for(var i=0;i < form.form_requiredcontact_box.length;i++){form.form_requiredcontact.value=form.form_requiredcontact_box[i].value+","+form.form_requiredcontact.value;} } function reloadWindow(){window.location.reload(1);} function windowResize(width,height){window.resizeTo(width,height);} function submitOnce(theform){if(document.all||document.getElementById){for(i=0;i 10){t.value=t.value.replace(/[^\d]/gi,'');} var str=t.value;if(t.value.length==10){if(!str.match(patt2)){result=str.match(patt1);if(result!=null){t.value=t.value.replace(/[^\d]/gi,'');str='('+result[1]+') '+result[2]+'-'+result[3];t.value=str;}else{if(t.value.match(/[^\d]/gi))t.value=t.value.replace(/[^\d]/gi,'');} } } } function validateEmailAddress(formInput){checkFor=1;value=formInput.value;for(var index=2;index <=value.length;index++){if((checkFor==1)&&(value.charAt(index)=='@')) checkFor=2;else if((checkFor==2)&&(value.charAt(index)=='.')) checkFor=3;} if(checkFor==3) return true;else{alert(formInput.title);formInput.focus();return false;} } function validateRadioCheck(form,i){if(form[form[i].name].checked) return true;var checked=0;for(var ia=0;ia < form[form[i].name].length;ia++){if(form[form[i].name][ia].checked==1){var checked=1;} } if(checked==0){alert(form[i].title);form[i].focus();return false;}else{return true;} } function validateNumber(formInput){temp=formInput.value;if(isNaN(parseInt(temp))){alert(formInput.title);formInput.focus();return false;}else{return true;} } function validateTextBox(formInput){if(formInput.value==""){alert(formInput.title);formInput.focus();return false;}else{return true;} } function validateSelectBox(formInput){if(formInput.selectedIndex==0){alert(formInput.title);formInput.focus();return false;}else{return true;} } function validateMultiSelect(formInput){for(var i=0;i < formInput.length;i++){if(formInput.options[i].selected==true){return true;} } alert(formInput.title);formInput.focus();return false;} function searchAttendees(form){xajax_searchAttendees(form.condition.value,form.searchBy.value,form.searchFor.value,form.events_id.value,form.pageNum.value);} function selectPage(newPage){searchAttendee.pageNum.value=newPage;searchAttendees(searchAttendee);} function prevPage(){searchAttendee.pageNum.value=Number(searchAttendee.pageNum.value)-1;searchAttendees(searchAttendee);} function nextPage(){searchAttendee.pageNum.value=Number(searchAttendee.pageNum.value)+1;searchAttendees(searchAttendee);} function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);} if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i