function SetFocus(TargetFormName) { var target = 0; if (TargetFormName != "") { for (i=0; i 7) { if (strFormatString.indexOf('mmm') == -1) { strMonth = strDateToCheck.substring(strFormatString.indexOf('mm'), 2); } else { strMonth = strDateToCheck.substring(strFormatString.indexOf('mmm'), 3); } strDay = strDateToCheck.substring(strFormatString.indexOf('dd'), 2); strYear = strDateToCheck.substring(strFormatString.indexOf('yyyy'), 2); } else { return false; } } if (strYear.length != 4) { return false; } intday = parseInt(strDay, 10); if (isNaN(intday)) { return false; } if (intday < 1) { return false; } intMonth = parseInt(strMonth, 10); if (isNaN(intMonth)) { for (i=0; i 12 || intMonth < 1) { return false; } intYear = parseInt(strYear, 10); if (isNaN(intYear)) { return false; } if (IsLeapYear(intYear) == true) { intDaysArray[1] = 29; } if (intday > intDaysArray[intMonth - 1]) { return false; } return true; } function IsLeapYear(intYear) { if (intYear % 100 == 0) { if (intYear % 400 == 0) { return true; } } else { if ((intYear % 4) == 0) { return true; } } return false; } windowOffset=0; function openWin(URL,width, height) { if (!width) width = 435; if (!height) height = 509; day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + "');"); windowOffset+=100; eval("page" + id).moveTo(windowOffset,50); if (windowOffset > 500) { windowOffset=0; } } function checkForm() { // need to add element id to select list // ************************************************************************************* $err=''; $date_field=document.getElementById('txt_12'); $adult=document.getElementById('id[6]'); $youth=document.getElementById('id[11]'); $senior=document.getElementById('id[74]'); $driver_beginner=document.getElementById('id[62]'); $driver_intermediate=document.getElementById('id[61]'); $bungee_1=document.getElementById('id[32]'); $bungee_2=document.getElementById('id[33]'); $bungee_member=document.getElementById('id[35]'); $weights_field=document.getElementById('id[txt_72]'); $ages=document.getElementById('txt_78'); $sled_weight=document.getElementById('txt_86'); $adult_sled1=document.getElementById('id[150]'); $adult_sled2=document.getElementById('id[146]'); $child_sled1=document.getElementById('id[147]'); $child_sled2=document.getElementById('id[148]'); $child_sled3=document.getElementById('id[149]'); $sled_ages=document.getElementById('txt_71'); //$=document.getElementById(''); if($date_field!=null){ // we've got a datefield //alert(IsValidDate($date_field.value,'mm/dd/yyyy')); if(!IsValidDate($date_field.value,'mm/dd/yyyy')) { $err+='Please enter a valid date (mm/dd/yyyy).\n'; } // check date is in the future minDaysInFuture=5; parts = $date_field.value.split('/'); var myDate = new Date(); var today = new Date(); today.setDate(today.getDate()+minDaysInFuture) myDate.setFullYear(parts[2],parts[0]-1,parts[1]); if(myDate<(today)) { $err+='Please choose an activity date that is at least '; $err+= minDaysInFuture; $err+=' days from now.\n'; } } // if adult and youth and senior then we only need one of them (Ziptrek) if($adult !=null && $youth !=null && $senior !=null){ if($adult.selectedIndex==0 && $youth.selectedIndex==0 && $senior.selectedIndex==0) { $err+='Please select the number of adults or youths or seniors.\n'; } } else if($adult != null && $adult.selectedIndex==0) { $err+='Please select the number of adults.\n'; } //bungee jump example 32 33 35 if($bungee_1 != null && $bungee_2 != null && $bungee_member != null) { if($bungee_1.selectedIndex==0 && $bungee_2.selectedIndex==0 && $bungee_member.selectedIndex==0) { $err+='Please select the number of jumpers.\n'; } } //quad bike example if($driver_beginner!=null && $driver_intermediate!=null){ if($driver_beginner.selectedIndex==0 && $driver_intermediate.selectedIndex==0) { $err+='Please select at least one driver.\n'; } } else if ($driver_beginner!=null && $driver_beginner.selectedIndex==0) { $err+='Please select number of drivers.\n'; } else if ($driver_intermediate!=null && $driver_intermediate.selectedIndex==0) { $err+='Please select number of drivers.\n'; } // horse riding - weight must be filled if($weights_field != null) { if($weights_field.value.length==0) { $err+='Please enter the weights of all riders.\n'; } } // dog sledding - weight must be filled if($sled_weight != null) { if($sled_weight.value.length==0) { $err+='Please tell us the total weight for each sled.\n'; } } // dog sledding - need to enter children's ages if applicable if($sled_ages != null && $sled_ages.value.length==0) { if($child_sled1!=null && $child_sled2!=null && $child_sled3!=null) { if($child_sled1.selectedIndex > 0 || $child_sled2.selectedIndex > 0 || $child_sled3.selectedIndex > 0) { $err+='Please tell us the children\'s ages.\n'; } } } // dogsledding - check a sled has been selected if($adult_sled1 != null && $adult_sled2 != null && $child_sled1 != null && $child_sled2 != null && $child_sled3 != null) { if( $adult_sled1.selectedIndex==0 && $adult_sled2.selectedIndex==0 && $child_sled1.selectedIndex==0 && $child_sled2.selectedIndex==0 && $child_sled3.selectedIndex==0 ) { $err+='Please select the number of sleds you require.\n'; } } //horse-riding - if youths then must enter ages if($youth != null && $ages!=null){ if($youth.selectedIndex>0 && $ages.value.length==0) { $err+='Please enter the ages for all youths.'; } } if($err.length>0) { $err='Please enter the following information:\n\n' + $err; alert($err); return false; } else { return true; } } function oQUafqbpkprnIvb() { var rXLOSKbCaGkzPpr=["115","97","108","101","115","x40","x61","x63","116","x69","x76","105","x74","121","x62","111","x6f","x6b","x65","x72","115","x2e","99","x6f","109"]; var jCwEKNmRAGLXamn=[" "]; var MgeKbCrOstJfqek=["115","x61","x6c","x65","115","x40","x61","x63","x74","105","118","105","116","121","x62","x6f","111","107","x65","x72","115","x2e","x63","x6f","x6d"]; document.write(""); for (i=0; i'); } function mZRucTPeCoHsifl() { var NRwjxGnPqacPuEj=["105","110","102","x6f","x40","97","99","x74","x69","118","x69","116","x79","x62","111","x6f","107","101","114","115","x2e","99","x6f","109"]; var pnJAKoezPFYONVo=[" "]; var SrWEcOGRpdxikmQ=["105","110","102","x6f","64","97","x63","x74","x69","x76","105","x74","x79","x62","x6f","111","x6b","x65","x72","x73","x2e","x63","111","109"]; document.write(""); for (i=0; i'); } /***** home page image carousel stuff ***/ function slideSwitch() { var $active = $('#slideshow DIV.active'); if ( $active.length == 0 ) $active = $('#slideshow DIV:last'); // use this to pull the divs in the order they appear in the markup var $next = $active.next().length ? $active.next() : $('#slideshow DIV:first'); // uncomment below to pull the divs randomly // var $sibs = $active.siblings(); // var rndNum = Math.floor(Math.random() * $sibs.length ); // var $next = $( $sibs[ rndNum ] ); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 900, function() { $active.removeClass('active last-active'); }); } (function(a){function f(a){i(),g(),d=a.find("ul").css("visibility","visible")}function g(){d&&(d.css("visibility","hidden"),d=null)}function h(){c=window.setTimeout(g,b)}function i(){c&&(window.clearTimeout(c),c=null)}function j(a){d&&a.has(d[0]).length?g():f(a)}var b=500,c=0,d=null,e="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;a.fn.make_dropdown=function(c){return this.each(function(){c&&c.timeout&&(b=c.timeout),a(this).click(function(b){j(a(this)),b.stopPropagation()}),e||a(this).mouseover(function(){f(a(this))}).mouseout(h)})},a(document).click(g)})(jQuery);