function validate_form() { var msg = ''; if(document.choose_template.sender.value == '' || document.choose_template.sender_email.value == '' || document.choose_template.receiver.value == '' || document.choose_template.receiver_email.value == '' ) { alert("Please fill out the required fields"); return false; } var semail =document.choose_template.sender_email.value; var remail = document.choose_template.receiver_email.value; if(semail!='') if (checkMailId(semail)==false){ return false } if(remail!='') if (checkMailId(remail)==false){ return false } return true; } /** * email validation script. ) */ function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(at,(lat+1))!=-1){ alert("Invalid E-mail ID") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot,(lat+2))==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(" ")!=-1){ alert("Invalid E-mail ID") return false } return true } function checkMailId(mailids) { var arr = new Array('.com','.net','.org','.biz','.coop','.info','.museum','.name','.pro' ,'.edu','.gov','.int','.mil','.ac','.ad','.ae','.af','.ag','.ai','.al', '.am','.an','.ao','.aq','.ar','.as','.at','.au','.aw','.az','.ba','.bb', '.bd','.be','.bf','.bg','.bh','.bi','.bj','.bm','.bn','.bo','.br','.bs', '.bt','.bv','.bw','.by','.bz','.ca','.cc','.cd','.cf','.cg','.ch','.ci', '.ck','.cl','.cm','.cn','.co','.cr','.cu','.cv','.cx','.cy','.cz','.de', '.dj','.dk','.dm','.do','.dz','.ec','.ee','.eg','.eh','.er','.es','.et', '.fi','.fj','.fk','.fm','.fo','.fr','.ga','.gd','.ge','.gf','.gg','.gh', '.gi','.gl','.gm','.gn','.gp','.gq','.gr','.gs','.gt','.gu','.gv','.gy', '.hk','.hm','.hn','.hr','.ht','.hu','.id','.ie','.il','.im','.in','.io', '.iq','.ir','.is','.it','.je','.jm','.jo','.jp','.ke','.kg','.kh','.ki', '.km','.kn','.kp','.kr','.kw','.ky','.kz','.la','.lb','.lc','.li','.lk', '.lr','.ls','.lt','.lu','.lv','.ly','.ma','.mc','.md','.mg','.mh','.mk', '.ml','.mm','.mn','.mo','.mp','.mq','.mr','.ms','.mt','.mu','.mv','.mw', '.mx','.my','.mz','.na','.nc','.ne','.nf','.ng','.ni','.nl','.no','.np', '.nr','.nu','.nz','.om','.pa','.pe','.pf','.pg','.ph','.pk','.pl','.pm', '.pn','.pr','.ps','.pt','.pw','.py','.qa','.re','.ro','.rw','.ru','.sa', '.sb','.sc','.sd','.se','.sg','.sh','.si','.sj','.sk','.sl','.sm','.sn', '.so','.sr','.st','.sv','.sy','.sz','.tc','.td','.tf','.tg','.th','.tj', '.tk','.tm','.tn','.to','.tp','.tr','.tt','.tv','.tw','.tz','.ua','.ug', '.uk','.um','.us','.uy','.uz','.va','.vc','.ve','.vg','.vi','.vn','.vu', '.ws','.wf','.ye','.yt','.yu','.za','.zm','.zw'); var mai = mailids; var val = true; var dot = mai.lastIndexOf("."); var ext = mai.substring(dot,mai.length); //alert(ext); var at = mai.indexOf("@"); if(dot > 5 && at >1) { for(var i=0; i12) err = 1 if (c != '/') err = 1 if (d<1 || d>31) err = 1 if (e != '/') err = 1 if (f<0 || f>99) err = 1 if (b==4 || b==6 || b==9 || b==11){ if (d==31) err=1 } if (b==2){ var g=parseInt(f/4) if (isNaN(g)) { err=1 } if (d>29) err=1 if (d==29 && ((f/4)!=parseInt(f/4))) err=1 } if (err==1) { alert('Invalid Date Format.It should be (mm/dd/yy)'); document.stallholder.dec_date.value="" } } //For stallholder picnic form function win2() { window.open("terms_conditions_picnic.htm", "subWindow", "status,menubar,width=700,height=600,top=10,left=10,scrollbars=yes") } var w,l,o,v p= ''; function checkfields2() { missinginfo = ""; if (document.stallholder_picnic.organisation.value == "") { missinginfo += "\n - Name of Organisation"; } if (document.stallholder_picnic.contact_person.value == "") { missinginfo += "\n - Name of Contact Person"; } if (document.stallholder_picnic.postal_address .value == "") { missinginfo += "\n - Postal Address"; } if (document.stallholder_picnic.postcode.value == "") { missinginfo += "\n - Postcode"; } if (document.stallholder_picnic.daytime_phone.value == "") { missinginfo += "\n - Daytime Telephone"; } if (document.stallholder_picnic.nighttime_phone.value == "") { missinginfo += "\n - Email"; } if (document.stallholder_picnic.email.value == "") { missinginfo += "\n - Email"; } if( document.stallholder_picnic.email.value != "" ){ if((document.stallholder_picnic.email.value.indexOf('@') == -1) || (document.stallholder_picnic.email.value.indexOf('.') == -1)) { alert("Enter Valid Email Address"); document.stallholder_picnic.email.value=""; document.stallholder_picnic.email.focus(); return false; } } if ((!document.stallholder_picnic.park_picnic[0].checked)&&(!document.stallholder_picnic.park_picnic[1].checked)) { missinginfo += "\n - Organisation had a Stall at Picnic in the Park"; } if ((!document.stallholder_picnic.preffered_time[0].checked)&&(!document.stallholder_picnic.preffered_time[1].checked)&&(!document.stallholder_picnic.preffered_time[2].checked)&&(!document.stallholder_picnic.preffered_time[3].checked)&&(!document.stallholder_picnic.preffered_time[4].checked)) { missinginfo += "\n - Preferred time of arrival at Rymill Park"; } if (document.stallholder_picnic.detail_description.value == "") { missinginfo += "\n - Products, services, prices and give aways you intend for your stall"; } /*if (document.stallholder_picnic.signage.value == "") { missinginfo += "\n - Details of any special needs"; }*/ if ((!document.stallholder_picnic.stallholder_fees.checked)&&(!document.stallholder_picnic.stallholder_fees1.checked)&&(!document.stallholder_picnic.stallholder_fees2.checked)&&(!document.stallholder_picnic.stallholder_fees3.checked)&&(!document.stallholder_picnic.stallholder_fees4.checked)) { missinginfo += "\n - Stallholder Fees"; } if ((!document.stallholder_picnic.payment_details[0].checked)&&(!document.stallholder_picnic.payment_details[1].checked)&&(!document.stallholder_picnic.payment_details[2].checked)) { missinginfo += "\n - Payment Details"; } if ((!document.stallholder_picnic.insurance[0].checked)&&(!document.stallholder_picnic.insurance[1].checked)) { missinginfo += "\n - Public Liability Insurance cover"; } if (document.stallholder_picnic.dec_name.value == "") { missinginfo += "\n - Name"; } if (document.stallholder_picnic.dec_org_pos.value == "") { missinginfo += "\n - Position in Organisation"; } if (document.stallholder_picnic.dec_org.value == "") { missinginfo += "\n - Name of Organisation"; } if (document.stallholder_picnic.dec_date.value == "") { missinginfo += "\n - Date"; } if(lay.style.visibility=="visible") { if(document.stallholder_picnic.cardnum.value == "") { missinginfo += "\n - Card Number"; } } if (document.stallholder_picnic.payment_details[2].checked){ if (!checkCreditCard (document.stallholder_picnic.cardnum.value, document.stallholder_picnic.card_type.value)){ alert("Please check your credit card details") return false; } } if (missinginfo != "") { missinginfo ="You failed to correctly fill in your:\n" + missinginfo + "\n_____________________________" + "\nPlease re-enter and submit again!"; alert(missinginfo); return false; } else { document.stallholder_picnic.trestle_table_tot.disabled=false; document.stallholder_picnic.chairs_tot.disabled=false; document.stallholder_picnic.power_tot.disabled=false; return true; } } function a2() { document.getElementById('lay').style.display="block" } function b2() { lay.style.display="none" } function checkdate2() { var err = 0 string = document.stallholder_picnic.dec_date.value var valid = "0123456789/" var ok = "yes"; var temp; for (var i=0; i< string.length; i++) { temp = "" + string.substring(i, i+1); if (valid.indexOf(temp) == "-1") err = 1; } if (string.length != 8) err=1 b = string.substring(0, 2) // month c = string.substring(2, 3)// '/' d = string.substring(3, 5) // day e = string.substring(5, 6)// '/' f = string.substring(6, 8) // year if (b<1 || b>12) err = 1 if (c != '/') err = 1 if (d<1 || d>31) err = 1 if (e != '/') err = 1 if (f<0 || f>99) err = 1 if (b==4 || b==6 || b==9 || b==11){ if (d==31) err=1 } if (b==2){ var g=parseInt(f/4) if (isNaN(g)) { err=1 } if (d>29) err=1 if (d==29 && ((f/4)!=parseInt(f/4))) err=1 } if (err==1) { alert('Invalid Date Format'); document.stallholder_picnic.dec_date.value="" } } function tot1() { document.stallholder_picnic.trestle_table_tot.value = eval(15 * document.stallholder_picnic.trestle_table_num.value) document.stallholder_picnic.totalcost.value=eval(parseInt((document.stallholder_picnic.trestle_table_tot.value)) + parseInt((document.stallholder_picnic.chairs_tot.value)) + parseInt((document.stallholder_picnic.power_tot.value))) } function tot2() { document.stallholder_picnic.chairs_tot.value = eval(5 * document.stallholder_picnic.chairs_num.value) document.stallholder_picnic.totalcost.value=eval(parseInt((document.stallholder_picnic.trestle_table_tot.value)) + parseInt((document.stallholder_picnic.chairs_tot.value)) + parseInt((document.stallholder_picnic.power_tot.value))) } function tot3() { document.stallholder_picnic.power_tot.value = eval(55 * document.stallholder_picnic.power_num.value) document.stallholder_picnic.totalcost.value=eval(parseInt((document.stallholder_picnic.trestle_table_tot.value)) + parseInt((document.stallholder_picnic.chairs_tot.value)) + parseInt((document.stallholder_picnic.power_tot.value))) } //Artist reg form // code for register form var w,l,o,v var p= ''; function rcheckfields() { var missinginfo = ""; //alert(document.registration.organisation.value); if (document.registration.organisation.value == "") { missinginfo += "\n - Name of Organisation"; } if (document.registration.contact_person.value == "") { missinginfo += "\n - Name of Contact Person"; } if (document.registration.postal_address .value == "") { missinginfo += "\n - Postal Address"; } if (document.registration.postcode.value == "") { missinginfo += "\n - Postcode"; } if (document.registration.suburb.value == "") { missinginfo += "\n - Suburb"; } if (document.registration.daytime_phone.value == "") { missinginfo += "\n - Daytime Telephone"; } if (document.registration.nighttime_phone.value == "") { missinginfo += "\n - Nighttime Telephone"; } if (document.registration.email.value == "") { missinginfo += "\n - Email"; } if( document.registration.email.value != "" ){ if((document.registration.email.value.indexOf('@') == -1) || (document.registration.email.value.indexOf('.') == -1)) { alert("Enter Valid Email Address"); document.registration.email.value=""; document.registration.email.focus(); return false; } } if (document.registration.media_name.value == "") { missinginfo += "\n - Name"; } if (document.registration.media_tel.value == "") { missinginfo += "\n - Telephone"; } if (document.registration.media_mob.value == "") { missinginfo += "\n - Mobile"; } if (document.registration.media_mail.value == "") { missinginfo += "\n - Email"; } if (document.registration.event_name.value == "") { missinginfo += "\n - Name of Event"; } if (document.registration.event_date.value == "") { missinginfo += "\n - Date"; } if (document.registration.event_time.value == "") { missinginfo += "\n - Time"; } if (document.registration.event_duration.value == "") { missinginfo += "\n - Duration"; } if ((!document.registration.interval[0].checked)&&(!document.registration.interval[1].checked)) { missinginfo += "\n - Interval"; } if (document.registration.event_venue.value == "") { missinginfo += "\n - Venue"; } if (document.registration.event_venue_address.value == "") { missinginfo += "\n - Venue Address"; } if (document.registration.event_venue_contact_persons.value == "") { missinginfo += "\n - Venue Contact Person"; } if (document.registration.event_phone.value == "") { missinginfo += "\n - Phone"; } if (document.registration.event_venue_booking.value == "") { missinginfo += "\n - Confirmed Booking"; } if (document.registration.event_venue_website.value == "") { missinginfo += "\n - Venue Website"; } if ((!document.registration.smoke_free.checked)&&(!document.registration.disability.checked)&&(!document.registration.licensed.checked)) { missinginfo += "\n - Apply to your Venue"; } if ((document.registration.price_full.value == "")&&(document.registration.price_con.value == "")) { missinginfo += "\n - Price"; } if (document.registration.booking_phone.value == "") { missinginfo += "\n - Phone Number Booking"; } if ((!document.registration.ticketing_service[0].checked)&&(!document.registration.ticketing_service[1].checked)) { missinginfo += "\n - Ticketing Service"; } if ((document.registration.ticketing_service[0].checked)&&(document.registration.service_name.value=="")) { missinginfo += "\n - Name of the Ticketing Service"; } if ((!document.registration.bk_fees[0].checked)&&(!document.registration.bk_fees[1].checked)) { missinginfo += "\n - Booking Fees for Customers"; } if ((document.registration.bk_fees[0].checked)&&(document.registration.bk_fees1.value=="")) { missinginfo += "\n - Booking Fees"; } if ((!document.registration.fees_includ[0].checked)&&(!document.registration.fees_includ[1].checked)) { missinginfo += "\n - Booking Fees Included"; } if (document.registration.event_sdescrip.value == "") { missinginfo += "\n - Short Description"; } if (document.registration.event_mdescrip.value == "") { missinginfo += "\n - Medium Description"; } if (document.registration.event_edescrip.value == "") { missinginfo += "\n - Expanded Description"; } if ((!document.registration.best_descrip[0].checked)&&(!document.registration.best_descrip[1].checked)&&(!document.registration.best_descrip[2].checked)&&(!document.registration.best_descrip[3].checked)&&(!document.registration.best_descrip[4].checked)&&(!document.registration.best_descrip[5].checked)&&(!document.registration.best_descrip[6].checked)&&(!document.registration.best_descrip[7].checked)&&(!document.registration.best_descrip[8].checked)&&(!document.registration.best_descrip[9].checked)&&(!document.registration.best_descrip[10].checked)&&(!document.registration.best_descrip[11].checked)&&(!document.registration.best_descrip[12].checked)) { missinginfo += "\n - Event Description"; } if ((!document.registration.bisexual_participation[0].checked)&&(!document.registration.bisexual_participation[1].checked)) { missinginfo += "\n - Bisexual Participation"; } if ((!document.registration.bisexual[0].checked)&&(!document.registration.bisexual[1].checked)) { missinginfo += "\n - Bisexual People"; } if ((!document.registration.bisexual_int[0].checked)&&(!document.registration.bisexual_int[1].checked)) { missinginfo += "\n - Bisexual Interest"; } if ((!document.registration.showcase[0].checked)&&(!document.registration.showcase[1].checked)) { missinginfo += "\n - Showcase"; } if ((!document.registration.feast_hub[0].checked)&&(!document.registration.feast_hub[1].checked)) { missinginfo += "\n - Feast Hub"; } if ((!document.registration.feast_scheme[0].checked)&&(!document.registration.feast_scheme[1].checked)) { missinginfo += "\n - Feast Print Scheme"; } if (document.registration.filmname.value == "") { missinginfo += "\n - Filmname"; } if (document.registration.descrip.value == "") { missinginfo += "\n - Description"; } if ((!document.registration.sent_via_e.checked)&&(!document.registration.sent_via_d.checked)) { missinginfo += "\n - Sent Via"; } if ((!document.registration.insurance[0].checked)&&(!document.registration.insurance[1].checked)) { missinginfo += "\n - Insurance"; } if ((!document.registration.payment_details[0].checked)&&(!document.registration.payment_details[1].checked)&&(!document.registration.payment_details[2].checked)&&(!document.registration.payment_details[3].checked)) { missinginfo += "\n - Payment Details"; } if(lay.style.visibility=="visible") { if(document.registration.cardnum.value == "") { missinginfo += "\n - Card Number"; } } if(document.registration.dec_name.value == "") { missinginfo += "\n - Name"; } if(document.registration.dec_org_pos.value == "") { missinginfo += "\n - Position in Organisation"; } if(document.registration.dec_org.value == "") { missinginfo += "\n - Name Of Organisation"; } if(lay.style.visibility=="visible") { if(document.registration.cardnum.value == "") { missinginfo += "\n - Card Number"; } } if (document.registration.payment_details[3].checked){ if (!checkCreditCard (document.registration.cardnum.value,document.registration.card_type.value)){ alert("Please check your credit card details") return false; } } if (missinginfo != "") { missinginfo ="You failed to correctly fill in your:\n" + missinginfo + "\n_____________________________" + "\nPlease re-enter and submit again!"; alert(missinginfo); return false; } //else return true; } function rb() { lay.style.display="none" } function rser() { if(document.registration.ticketing_service[0].checked) { document.registration.service_name.disabled=false; } } function rser1(){ if(document.registration.ticketing_service[1].checked) { document.registration.service_name.disabled=true; document.registration.service_name.value="" } } function rbk() { if(document.registration.bk_fees[0].checked) { document.registration.bk_fees1.disabled=false; } } function rbk1(){ if(document.registration.bk_fees[1].checked) { document.registration.bk_fees1.disabled=true; document.registration.bk_fees1.value="" } } function rcheckdate() { var err = 0 string = document.registration.dec_date.value var valid = "0123456789/" var ok = "yes"; var temp; for (var i=0; i< string.length; i++) { temp = "" + string.substring(i, i+1); if (valid.indexOf(temp) == "-1") err = 1; } if (string.length != 8) err=1 b = string.substring(0, 2) // month c = string.substring(2, 3)// '/' d = string.substring(3, 5) // day e = string.substring(5, 6)// '/' f = string.substring(6, 8) // year if (b<1 || b>12) err = 1 if (c != '/') err = 1 if (d<1 || d>31) err = 1 if (e != '/') err = 1 if (f<0 || f>99) err = 1 if (b==4 || b==6 || b==9 || b==11){ if (d==31) err=1 } if (b==2){ var g=parseInt(f/4) if (isNaN(g)) { err=1 } if (d>29) err=1 if (d==29 && ((f/4)!=parseInt(f/4))) err=1 } if (err==1) { alert('Invalid Date Format'); document.registration.dec_date.value="" } } function rtot1() { document.registration.trestle_table_tot.value = eval(15 * document.registration.trestle_table_num.value) document.registration.totalcost.value=eval(parseInt((document.registration.trestle_table_tot.value)) + parseInt((document.registration.chairs_tot.value)) + parseInt((document.registration.power_tot.value))) } function rtot2() { document.registration.chairs_tot.value = eval(5 * document.registration.chairs_num.value) document.registration.totalcost.value=eval(parseInt((document.registration.trestle_table_tot.value)) + parseInt((document.registration.chairs_tot.value)) + parseInt((document.registration.power_tot.value))) } function rtot3() { document.registration.power_tot.value = eval(55 * document.registration.power_num.value) document.registration.totalcost.value=eval(parseInt((document.registration.trestle_table_tot.value)) + parseInt((document.registration.chairs_tot.value)) + parseInt((document.registration.power_tot.value))) }