BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Lough Ree Yacht Club - ECPv4.9.14//NONSGML v1.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Lough Ree Yacht Club
X-ORIGINAL-URL:https://www.lryc.ie
X-WR-CALDESC:Events for Lough Ree Yacht Club
BEGIN:VTIMEZONE
TZID:UTC
BEGIN:STANDARD
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
TZNAME:UTC
DTSTART:20230101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;VALUE=DATE:20230823
DTEND;VALUE=DATE:20230827
DTSTAMP:20260421T140948
CREATED:20191115T140526Z
LAST-MODIFIED:20230911T210034Z
UID:4305-1692748800-1693094399@www.lryc.ie
SUMMARY:IDRA 14 Nationals
DESCRIPTION:IDRA 14' NOTICE OF RACE\nIDRA 14' SAILING INSTRUCTIONS\n\n\nvar total;\n//Summary Strings\nvar summaryMsg = [];\nvar discountMsg = [];\nvar accomodationSummary = [];\nvar isDiscountActive=0;\n//Constants\nvar boatCount=1;\nvar accomodationCount=1;\nvar boatPostCount=0;\nvar sundayMealFee = 30;\nvar wednesdayMealFee = 25;\nvar processing = false;\nvar fillToCartURL='https://www.lryc.ie/cart/?fill_cart=';\nfunction calculateTotal() {\n   clearCart();\n}\nfunction clearCart() {\n   this.statusA=[];\n   this.summaryMsg = [];\n   var discountMsg = [];\n   this.boatPostCount=0;\n   this.total = 0;\n   areThereValidationErrors();\n   if (this.errors.length > 0) {\n      printErrors();\n      return;\n   } else {\n      printStatus("Clearing Cart")\n      disableButton();\n      var xhr = new XMLHttpRequest()\n      xhr.open("GET"\, 'https://www.lryc.ie/?clear-cart'\, true);\n      xhr.setRequestHeader("Content-Type"\, "application/x-www-form-urlencoded; charset=UTF-8");\n      xhr.onload = function () {\n         continuePurchase();\n      };\n      xhr.send();\n   }\n}\nfunction continuePurchase(){\n   getTotalBoatEntryFees(0);\n}\nfunction finishPurchase(){\n   if (isDiscountActive > 0){\n       this.fillToCartURL='https://www.lryc.ie/cart?apply_coupon='+isDiscountActive\n      var xhr = new XMLHttpRequest()\n      xhr.open("GET"\, this.fillToCartURL\, true);\n      xhr.setRequestHeader("Content-Type"\, "application/x-www-form-urlencoded; charset=UTF-8");\n      xhr.onload = function () {\n         getTotalMealFees(0);\n      };\n      xhr.send();\n   }\n   else {\n      getTotalMealFees(0);\n   }\n}\nfunction getTotalMealFees() {\n   this.fillToCartURL='https://www.lryc.ie/cart/?fill_cart=';\n   var sunday = document.getElementsByName("steak");\n   var sundayInt = parseInt(sunday[0].value);\n   if (sundayInt>0) {\n      if(fillToCartURL.slice(-1) !== '=') {\n          this.fillToCartURL+='\,'+sundayInt+'x11755';\n      } else {\n         this.fillToCartURL+=sundayInt+'x11755';\n      }\n      wednesdayMeals();\n   } else {\n       wednesdayMeals();\n   }\n}\nfunction wednesdayMeals() {\n   var wednesday= document.getElementsByName("fish");\n   var wednesdayInt = parseInt(wednesday[0].value);\n   if (wednesdayInt >0) {\n      if(fillToCartURL.slice(-1) !== '=') {\n          this.fillToCartURL+='\,'+wednesdayInt+'x11756';\n      } else {\n         this.fillToCartURL+=wednesdayInt+'x11756';\n      }\n      vegMeals(0);\n  } else {\n       vegMeals(0);\n  }\n}\nfunction vegMeals() {\n   var wednesday= document.getElementsByName("veg");\n   var wednesdayInt = parseInt(wednesday[0].value);\n   if (wednesdayInt >0) {\n      if(fillToCartURL.slice(-1) !== '=') {\n          this.fillToCartURL+='\,'+wednesdayInt+'x11757';\n      } else {\n         this.fillToCartURL+=wednesdayInt+'x11757';\n      }\n      getTotalOtherFees(0);\n  } else {\n       getTotalOtherFees(0);\n  }\n}\nfunction getTotalOtherFees(){\n    var soda= document.getElementsByName("sodaFull");\n    if  (soda[0].value > 0) {\n          if(fillToCartURL.slice(-1) !== '=') {\n             this.fillToCartURL+='\,'+soda[0].value+'x11750';\n          } else {\n             this.fillToCartURL+=soda[0].value+'x11750';\n          }\n    }\n    var associate= document.getElementsByName("sodaTen");\n    if  (associate[0].value > 0) {\n          if(fillToCartURL.slice(-1) !== '=') {\n             this.fillToCartURL+='\,'+associate[0].value+'x11751';\n          } else {\n             this.fillToCartURL+=associate[0].value+'x11751';\n          }\n    }\n    var accomodation = document.getElementsByName("accomodation");\n    if  (accomodation[0].value != "0") {\n          if(accomodation[0].value == "1"){\n             if(fillToCartURL.slice(-1) !== '=') {\n                this.fillToCartURL+='\,'+associate[0].value+'x11765';\n             } else {\n                this.fillToCartURL+=associate[0].value+'x11765';\n             }\n          } else {\n             if(fillToCartURL.slice(-1) !== '=') {\n                this.fillToCartURL+='\,'+associate[0].value+'x11767';\n             } else {\n                this.fillToCartURL+=associate[0].value+'x11767';\n             }\n          }\n    }\n    fillCheckout();\n}\nfunction areThereValidationErrors(){\n   this.errors = [];\n    var allHelms = document.getElementsByName("helm");\n    var allBoatNo = document.getElementsByName("boatNo");\n    var allHelms = document.getElementsByName("helm");\n    var allFleets = document.getElementsByName("fleet");\n    var allBoats = document.getElementsByName("field4");\n    var declaration = document.getElementById("declaration");\n    for (i = 0; i < allBoats.length; i++) { \n        boatsIndex = allBoats[i].selectedIndex; \n        var priceAndProductNo = allBoats[i].value.split('\,');\n        if (parseInt(priceAndProductNo[0]) > 0) {\n           if (allHelms[i].value.length < 3) {\n              this.errors.push("Please enter a helm name for boat number "+(i+1))\n           }\n           if (allBoatNo[i].value.length < 1) {\n              this.errors.push("You forgot to enter a sail number for boat number "+(i+1))\n           }\n        }  \n    }\n   var validation = document.getElementById("validation");\n   validation.innerHTML = "";\n}\nfunction printErrors(){\n    var validation = document.getElementById("validation");\n    for (i = 0; i < errors.length; i++) {\n        validation.innerHTML += (errors[i] + "");\n    }\n}\nfunction disableButton(){\n   var goToCheckout = document.getElementById("Next");\n   goToCheckout.disabled = true;\n   goToCheckout.value='Thank you please wait a few moments while we build your entry';\n   goToCheckout.style.background = "#909090"\n}\nfunction fillCheckout() {\n   printStatus("Going to Cart with anything else");\n   window.location.href = fillToCartURL;\n}\nfunction disableButton(){\n   var goToCheckout = document.getElementById("Next");\n   goToCheckout.disabled = true;\n   goToCheckout.value="Thank you please wait a few moments while we build your entry";\n   goToCheckout.style.background = "#909090"\n}\nfunction getAccomadationEntryFees(){\n       var allAccomodation = document.getElementsByName("accomadationSelect");\n       var accomadation = [];\n       for (i = 0; i < allAccomodation.length; i++) { \n          var priceAndProductNo = allAccomodation[i].value.split('\,');\n          if (parseInt(priceAndProductNo[0]) > 0) {\n              accomadation.push(parseInt(priceAndProductNo[1]));\n          }\n       }\n       if (accomadation.length > 1){\n          if (accomadation[0] == accomadation[1]) {\n             if(fillToCartURL.slice(-1) !== '=') {\n                this.fillToCartURL+='\,2x'+accomadation[0];\n             } else {\n                this.fillToCartURL+='2x'+accomadation[0];\n             }\n          } else {\n             if(fillToCartURL.slice(-1) !== '=') {\n                this.fillToCartURL+='\,1x'+accomadation[0]+'\,1x'+accomadation[1];\n             } else {\n     this.fillToCartURL+='1x'+accomadation[0]+'\,1x'+accomadation[1];\n             }\n          }\n       } else {\n          if(fillToCartURL.slice(-1) !== '=') {\n             this.fillToCartURL+='\,1x'+accomadation[0];\n          } else {\n             this.fillToCartURL+='1x'+accomadation[0];\n          }\n       }\n       getTotalOtherFees();\n}\nfunction getTotalBoatEntryFees(boatNumber){\n       var allHelms = document.getElementsByName("helm");\n       var allCrew = document.getElementsByName("crew");\n       var allClubs = document.getElementsByName("club");\n       var allBoatNo = document.getElementsByName("boatNo");\n       var allNames = document.getElementsByName("boatName");\n       var allFleets = document.getElementsByName("fleet");\n       var allBoats = document.getElementsByName("field4");\n       if (allHelms[0].value != "") {\n           printStatus("Adding IDRA 14 Nationals Entry")\n           var xhr = new XMLHttpRequest();\n           xhr.open("POST"\, 'https://www.lryc.ie/?add-to-cart'\, true);\n           xhr.setRequestHeader("Content-Type"\, "application/x-www-form-urlencoded; charset=UTF-8");\n           xhr.onload = function () {\n              getAdditionalInfo();\n           };\n           var additionalInfo='Crew Name:'+allCrew[0].value+' Club Name:'+allClubs[0].value;\n           if (allNames[0].value !== "") {\n              additionalInfo += ' Boat Name:' + allNames[0].value;\n           }\n           var productId = "11748";\n xhr.send('boatNumber='+allBoatNo[0].value+'&helm='+allHelms[0].value+'&AdditionalInfo='+additionalInfo+'&quantity=1&add-to-cart='+productId);\n       } else{\n            getAdditionalInfo();\n       }\n}\nfunction getAdditionalInfo(boatNumber){\n       var additional = document.getElementsByName("paragraph_text");\n       var soda = document.getElementsByName("sodaDesc");\n       var xhr = new XMLHttpRequest();\n       xhr.open("POST"\, 'https://www.lryc.ie/?add-to-cart'\, true);\n       xhr.setRequestHeader("Content-Type"\, "application/x-www-form-urlencoded; charset=UTF-8");\n       xhr.onload = function () {\n           finishPurchase();\n       };\n       var additionalInfo =  additional[0].value;\n       if (soda[0].value != ""){\n          additionalInfo+= ' Class Membership is for: ' +soda[0].value;\n       }\n       xhr.send('AdditionalInfo='+additionalInfo+'&quantity=1&add-to-cart='+2150);\n}\nfunction printStatus(newMsg){\n    this.statusA.push(newMsg)\n    var status= document.getElementById("status");\n    status.innerHTML="";\n    for (i = 0; i < this.statusA.length; i++) {\n        status.innerHTML += (this.statusA[i] + "");\n    }\n}\n\n\n\n\n\n1Boat to Enter\nBoat Name\n\nHelm\n\n\nCrew\n\n\nClub\n\n\nSail No\n\n\n\n\n\n\n2Saturday BBQ €15\nSteaks\n\n\nNumber of Steaks\n1\n2\n3\n4\n5\n6\n\n\nFish\n\n\nNumber of Fish\n1\n2\n3\n4\n5\n6\n\n\nVegetarian \n\n\nNumber of Vegetarian\n1\n2\n3\n4\n5\n6\n\n\n\nIf you have any dietary requirements\, please enter here and we will endeavour\, to fulfill the request if practical/possible. \n \n\n\n\n\n3 IDRA 14 Class Membership\nFull Membership €25\n\nNumber of Full Memberships123\n\nAssociate Membership €10\n\nNumber of Associate Memberships123\n\n\n\n\n3 Camping/Berthing\n\nPlease select from options below if requiredTents €10Caravans / Vans / Cruisers € 20\n\n\n\n4 Summary\nPlease check that all items needed have been selected correctly. For more information contact sailing@lryc.ie\n\n\n\n\n \n\n
URL:https://www.lryc.ie/event/idra-14-nationals/
ATTACH;FMTTYPE=image/jpeg:https://www.lryc.ie/wp-content/uploads/2019/11/b7703dba96a05b9939d89065fa8e4e62_L-1.jpg
END:VEVENT
END:VCALENDAR