// // Custom Holliday Effects // function CustomHolidays() { //INSERT CUSTOM HOLIDAYS HERE //STOP INSERTING CUSTOM HOLIDAYS HERE } // //Anaylatics Tracking // var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-18935555-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); // //Google Translate Gadget // function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'es', floatPosition: google.translate.TranslateElement.FloatPosition.TOP_RIGHT }); } (function(){var d=window,e=document;function f(b){var a=e.getElementsByTagName("head")[0];a||(a=e.body.parentNode.appendChild(e.createElement("head")));a.appendChild(b)}function _loadJs(b){var a=e.createElement("script");a.type="text/javascript";a.charset="UTF-8";a.src=b;f(a)}function _loadCss(b){var a=e.createElement("link");a.type="text/css";a.rel="stylesheet";a.charset="UTF-8";a.href=b;f(a)}function _isNS(b){b=b.split(".");for(var a=d,c=0;c -1; } function DetectIpod() { return uagent.search("ipod") > -1; } function DetectIphoneOrIpod() { return DetectIphone() || DetectIpod(); } function DetectS60OssBrowser() { if (uagent.search("webkit") > -1) { if ((uagent.search("series60") > -1 || uagent.search("symbian") > -1)) return true; else return false; } else return false; } function DetectAndroid() { return uagent.search("android") > -1; } function DetectWindowsMobile() { return uagent.search("windows ce") > -1; } function DetectBlackBerry() { return uagent.search("blackberry") > -1; } function DetectPalmOS() { return uagent.search("palm") > -1; } function DetectMobile() { return DetectAndroid() || DetectBlackBerry() || DetectIphoneOrIpod() || DetectPalmOS() || DetectS60OssBrowser() || DetectWindowsMobile(); } // // HTML5 Geolocationing Features // offices = [ { name: "Henderson", latitude: 36.00737, longitude: -115.10991, yellowPhone: 'http://engine.prosites.com/C1/42452/wy/images/yellowPhone.jpg', tdIndex: 0 }, { name: "Charleston", latitude: 36.15912, longitude: -115.08368, yellowPhone: 'http://engine.prosites.com/C1/42452/wy/images/yellowPhoneCH.jpg', tdIndex: 2 }, { name: "Desert Inn", latitude: 36.13002, longitude: -115.13166, yellowPhone: 'http://engine.prosites.com/C1/42452/wy/images/yellowPhoneDI.jpg', tdIndex: 1 } ]; // Copyright 2007, Google Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // 3. Neither the name of Google Inc. nor the names of its contributors may be // used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Sets up google.gears.*, which is *the only* supported way to access Gears. // // Circumvent this file at your own risk! // // In the future, Gears may automatically define google.gears.* without this // file. Gears may use these objects to transparently fix bugs and compatibility // issues. Applications that use the code below will continue to work seamlessly // when that happens. (function() { // We are already defined. Hooray! if (window.google && google.gears) { return; } var factory = null; // Firefox if (typeof GearsFactory != 'undefined') { factory = new GearsFactory(); } else { // IE try { factory = new ActiveXObject('Gears.Factory'); // privateSetGlobalObject is only required and supported on IE Mobile on // WinCE. if (factory.getBuildInfo().indexOf('ie_mobile') != -1) { factory.privateSetGlobalObject(this); } } catch (e) { // Safari if ((typeof navigator.mimeTypes != 'undefined') && navigator.mimeTypes["application/x-googlegears"]) { factory = document.createElement("object"); factory.style.display = "none"; factory.width = 0; factory.height = 0; factory.type = "application/x-googlegears"; document.documentElement.appendChild(factory); if(factory && (typeof factory.create == 'undefined')) { // If NP_Initialize() returns an error, factory will still be created. // We need to make sure this case doesn't cause Gears to appear to // have been initialized. factory = null; } } } } // *Do not* define any objects if Gears is not installed. This mimics the // behavior of Gears defining the objects in the future. if (!factory) { return; } // Now set up the objects, being careful not to overwrite anything. // // Note: In Internet Explorer for Windows Mobile, you can't add properties to // the window object. However, global objects are automatically added as // properties of the window object in all browsers. if (!window.google) { google = {}; } if (!google.gears) { google.gears = {factory: factory}; } })(); /*! * geo-location-javascript v0.4.3 * http://code.google.com/p/geo-location-javascript/ * * Copyright (c) 2009 Stan Wiechers * Licensed under the MIT licenses. * * Revision: $Rev: 68 $: * Author: $Author: whoisstan $: * Date: $Date: 2010-02-15 13:42:19 +0100 (Mon, 15 Feb 2010) $: */ var bb_successCallback; var bb_errorCallback; var bb_blackberryTimeout_id=-1; function handleBlackBerryLocationTimeout() { if(bb_blackberryTimeout_id!=-1) { bb_errorCallback({message:"Timeout error", code:3}); } } function handleBlackBerryLocation() { clearTimeout(bb_blackberryTimeout_id); bb_blackberryTimeout_id=-1; if (bb_successCallback && bb_errorCallback) { if(blackberry.location.latitude==0 && blackberry.location.longitude==0) { //http://dev.w3.org/geo/api/spec-source.html#position_unavailable_error //POSITION_UNAVAILABLE (numeric value 2) bb_errorCallback({message:"Position unavailable", code:2}); } else { var timestamp=null; //only available with 4.6 and later //http://na.blackberry.com/eng/deliverables/8861/blackberry_location_568404_11.jsp if (blackberry.location.timestamp) { timestamp=new Date(blackberry.location.timestamp); } bb_successCallback({timestamp:timestamp, coords: {latitude:blackberry.location.latitude,longitude:blackberry.location.longitude}}); } //since blackberry.location.removeLocationUpdate(); //is not working as described http://na.blackberry.com/eng/deliverables/8861/blackberry_location_removeLocationUpdate_568409_11.jsp //the callback are set to null to indicate that the job is done bb_successCallback = null; bb_errorCallback = null; } } var geo_position_js=function() { var pub = {}; var provider=null; pub.getCurrentPosition = function(successCallback,errorCallback,options) { provider.getCurrentPosition(successCallback, errorCallback,options); } pub.init = function() { try { if (typeof(geo_position_js_simulator)!="undefined") { provider=geo_position_js_simulator; } else if (typeof(bondi)!="undefined" && typeof(bondi.geolocation)!="undefined") { provider=bondi.geolocation; } else if (typeof(navigator.geolocation)!="undefined") { provider=navigator.geolocation; pub.getCurrentPosition = function(successCallback, errorCallback, options) { function _successCallback(p) { //for mozilla geode,it returns the coordinates slightly differently if(typeof(p.latitude)!="undefined") { successCallback({timestamp:p.timestamp, coords: {latitude:p.latitude,longitude:p.longitude}}); } else { successCallback(p); } } provider.getCurrentPosition(_successCallback,errorCallback,options); } } else if(typeof(window.google)!="undefined" && typeof(google.gears)!="undefined") { provider=google.gears.factory.create('beta.geolocation'); } else if ( typeof(Mojo) !="undefined" && typeof(Mojo.Service.Request)!="Mojo.Service.Request") { provider=true; pub.getCurrentPosition = function(successCallback, errorCallback, options) { parameters={}; if(options) { //http://developer.palm.com/index.php?option=com_content&view=article&id=1673#GPS-getCurrentPosition if (options.enableHighAccuracy && options.enableHighAccuracy==true) { parameters.accuracy=1; } if (options.maximumAge) { parameters.maximumAge=options.maximumAge; } if (options.responseTime) { if(options.responseTime<5) { parameters.responseTime=1; } else if (options.responseTime<20) { parameters.responseTime=2; } else { parameters.timeout=3; } } } r=new Mojo.Service.Request('palm://com.palm.location', { method:"getCurrentPosition", parameters:parameters, onSuccess: function(p){successCallback({timestamp:p.timestamp, coords: {latitude:p.latitude, longitude:p.longitude,heading:p.heading}});}, onFailure: function(e){ if (e.errorCode==1) { errorCallback({code:3,message:"Timeout"}); } else if (e.errorCode==2) { errorCallback({code:2,message:"Position Unavailable"}); } else { errorCallback({code:0,message:"Unknown Error: webOS-code"+errorCode}); } } }); } } else if (typeof(device)!="undefined" && typeof(device.getServiceObject)!="undefined") { provider=device.getServiceObject("Service.Location", "ILocation"); //override default method implementation pub.getCurrentPosition = function(successCallback, errorCallback, options) { function callback(transId, eventCode, result) { if (eventCode == 4) { errorCallback({message:"Position unavailable", code:2}); } else { //no timestamp of location given? successCallback({timestamp:null, coords: {latitude:result.ReturnValue.Latitude, longitude:result.ReturnValue.Longitude, altitude:result.ReturnValue.Altitude,heading:result.ReturnValue.Heading}}); } } //location criteria var criteria = new Object(); criteria.LocationInformationClass = "BasicLocationInformation"; //make the call provider.ILocation.GetLocation(criteria,callback); } } else if(typeof(window.blackberry)!="undefined" && blackberry.location.GPSSupported) { // set to autonomous mode if(typeof(blackberry.location.setAidMode)=="undefined") { return false; } blackberry.location.setAidMode(2); //override default method implementation pub.getCurrentPosition = function(successCallback,errorCallback,options) { //alert(parseFloat(navigator.appVersion)); //passing over callbacks as parameter didn't work consistently //in the onLocationUpdate method, thats why they have to be set //outside bb_successCallback=successCallback; bb_errorCallback=errorCallback; //function needs to be a string according to //http://www.tonybunce.com/2008/05/08/Blackberry-Browser-Amp-GPS.aspx if(options['timeout']) { bb_blackberryTimeout_id=setTimeout("handleBlackBerryLocationTimeout()",options['timeout']); } else //default timeout when none is given to prevent a hanging script { bb_blackberryTimeout_id=setTimeout("handleBlackBerryLocationTimeout()",60000); } blackberry.location.onLocationUpdate("handleBlackBerryLocation()"); blackberry.location.refreshLocation(); } provider=blackberry.location; } } catch (e){ alert("error="+e); if(typeof(console)!="undefined") { console.log(e); } return false; } return provider!=null; } return pub; }(); function locationingResponse(location) { lat = location.coords.latitude; lon = location.coords.longitude; var shortest; for (var i = 0; i < offices.length; i++) { var o = offices[i]; var dist = Math.sqrt(Math.pow(o.latitude - lat, 2) + Math.pow(o.longitude - lon, 2)) o.distance = dist; if (shortest) { if (shortest.distance > dist) shortest = o; } else shortest = o; } if (shortest) { //TODO Set Phone Number rightYellowBar = document.getElementById('prop').children[1]; rightYellowBar.src = shortest.yellowPhone; if (contactpage) { var item = document.getElementsByTagName('tbody')[2].getElementsByTagName('td')[shortest.tdIndex]; item.style.backgroundColor = '#FFFFAA'; item.style.padding = '10px'; document.getElementById('Content').getElementsByTagName('p')[0].innerHTML = 'We have used your location to try to find the office closest to you. Please note, this may not be the closest or best location for your needs, so please check the addresses to be certain.'; } } } function locationError() { rightYellowBar = document.getElementById('prop').children[1]; rightYellowBar.src = offices[0].yellowPhone; } function findLocation() { if (geo_position_js.init()) geo_position_js.getCurrentPosition(locationingResponse, locationError); else locationError(); } // // Everything Else // function DoStuffFunction() { if (oldonload != null) oldonload(); cookie = getCookie('useEffects'); if(cookie == '' || cookie == null) setCookie('useEffects', 'yes', 25); doNonHoliday(); today = new Date(); month = today.getMonth() + 1; day = today.getDate(); year = today.getYear() + 1900; dw = today.getDay(); first = new Date(year, month, 1); nth = Math.floor((day - 1) / 7) + 1; try { CustomHolidays() } catch (ex) {} if (month == 9 && day == 5) startBirthday('Cox'); if (month == 10)//Halloween { addMessage('
Happy Halloween
'); el = addPicture(130, -89, -80, [ 'http://c1-preview.prosites.com/42452/wy/images/ghost.png', 'http://www.clker.com/cliparts/0/1/c/5/11949840591461468344pumpkin2_yemu_01.svg.med.png', 'http://www.clker.com/cliparts/6/M/j/d/T/y/cartoon-bat-md.png', 'http://www.clker.com/cliparts/I/W/V/7/a/o/mummy-md.png']); incrementOpacity(); //incrementMove(); } if (month == 11 && day == 16)//Dr. Ellsworth's Birthday startBirthday('Ellsworth'); else if (month == 11 && (nth < 4 || (nth == 4 && dw <= 4)))//Thanksgiving { addMessage('Happy Thanksgiving'); addPicture(130, -89, -80, [ 'http://engine.prosites.com/C1/42452/wy/images/Turkey.png']); startLeaves(); } if (month == 12 && day <= 25)//Christmans/Holiday Season - "Happy Holidays" { addMessage('Happy Holidays'); addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/5/d/2/6/1195445584476624856TheresaKnott_christmas_tree.svg.med.png', 'http://www.clker.com/cliparts/b/d/3/8/1194983954828473992evergreen_wreath_with_large_holly_01.svg.med.png', 'http://www.clker.com/cliparts/3/d/e/4/11949913581980276438jingle_bells_01.svg.med.png', 'http://www.clker.com/cliparts/6/4/c/4/11954454401339205878oreomasta_Christmas_Light_(remix).svg.med.png', 'http://www.clker.com/cliparts/8/9/f/c/1195445532903915793TheresaKnott_Snowman.svg.med.png', 'http://www.clker.com/cliparts/5/8/0/8/1245687934448019525Minduka_Present_Blue_Pack.svg.med.png']); startSnowing(); } if ((month == 12 && day == 31) || (month == 1 && day == 1))//New Years Eve/Day { addMessage('Happy New Years!'); addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/f/Q/1/n/n/1/chinese-fireworks-md.png', 'http://www.clker.com/cliparts/O/c/N/C/E/E/cartoon-fireworks-md.png', 'http://www.clker.com/cliparts/6/2/9/d/12571041231248148572newnhamm_MultiColored_Sparkle.svg.med.png']); } if (month == 2 && day == 2)//Groundhog Day { addPicture(130, -99, -80, 'http://engine.prosites.com/C1/42452/wy/images/Groundhog.png'); addMessage('Did the groundhog see his shadow today?'); } else if ((month == 2 && day >= 3 && day <= 14) || (month == 2 && day == 1))//Valentines Day { addPicture(130, -99, -80, [ 'http://a.dryicons.com/images/icon_sets/valentine_love/png/128x128/heart.png', 'http://www.clker.com/cliparts/3/d/9/1/11949847661568287344heart_jon_phillips_01.svg.med.png', 'http://www.clker.com/cliparts/9/8/4/0/1194984843441313199heart_left-highlight_jon_01.svg.med.png']); addMessage('Happy Valentines Day'); } else if (month == 2 && nth == 3 && dw == 1)//President's Day { addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/a/b/5/e/1223248055942615420presdents%20day.svg.med.png', 'http://www.clker.com/cliparts/a/4/9/3/11971252491531875342zeimusu_George_Washington.svg.med.png', 'http://www.clker.com/cliparts/W/h/B/l/d/r/abraham-lincoln-md.png']); } else if (month == 2 && day == 29)//Leap Year { addPicture(130, -99, -80, 'http://www.webkinzinsider.com/images/virtual/HM109.png'); addMessage('It\'s Leap Year'); } else if (month == 2)//Dental Health Month { addPicture(130, -99, -80, 'http://www.ada.org/sections/professionalResources/images/ncdhm_youthposter_2011_t.jpg'); addMessage('It\'s National Dental Health Month'); } if (month == 3 && day <= 17)//St. Patrick's Day { addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/d/2/0/7/11949847081767838062shamrock_for_march_natha_01.svg.med.png', 'http://www.clker.com/cliparts/2/b/6/1/1195422161727872309liftarn_Laughing_leprechaun.svg.med.png', 'http://www.clker.com/cliparts/4/a/6/c/11970938121053440146johnny_automatic_horseshoe.svg.med.png']); addMessage('Happy St. Patrick\'s Day'); } else if (month == 4 && day == 1)//April Fool's Day { document.body.style.MozTransform = 'all 2s ease-in-out'; document.body.style.webkitTransition = 'all 2s ease-in-out'; document.body.style.MozTransform = 'rotate(180deg)'; document.body.style.webkitTransform = 'rotate(180deg)'; revert = document.createElement('div'); upsidedown = true; flipback = function() { document.body.style.MozTransform = (upsidedown ? 'rotate(0deg)' : 'rotate(180deg)'); document.body.style.webkitTransform = (upsidedown ? 'rotate(0deg)' : 'rotate(180deg)'); upsidedown = !upsidedown; }; revert.innerHTML = 'April Fools\''; document.getElementById('StylizedImage').appendChild(revert); } else if (month == 4 && day >= 18 && day <= 21 && year == 2011)//Spring Break { addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/2/7/8/6/11949865851054580572flower_peterm_01.svg.med.png', 'http://www.clker.com/cliparts/3/a/a/5/1194984733759158166flowers_jonathan_dietric_01.svg.med.png', 'http://www.clker.com/cliparts/7/f/5/4/11949847152118158226tulips_ganson.svg.med.png']); addMessage('Spring Break - No School!'); } else if (month == 4 && day == 22)//Earth Day { addPicture(130, -99, -80, 'http://upload.wikimedia.org/wikipedia/commons/0/0f/Globo_terraqueo_3.gif'); addMessage('Happy Earth Day'); } else if (month == 3 || month == 4)//Easter { var e = easter(year); if (month == e.month && day <= e.day && day > e.day - 10) { addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/1/4/f/e/11954369712094657047rabbit_aurore_d._rore__01.svg.med.png', 'http://www.clker.com/cliparts/6/9/5/c/1224784721240985780yyycatch_chick.svg.med.png', 'http://www.clker.com/cliparts/8/e/3/1/1197149883164022811nicubunu_Easter_eggs.svg.med.png']); addMessage('Happy Easter'); } } if (month == 5 && day <= 5)//Cinco de mayo { addPicture(130, -99, -80, [ 'http://www.clker.com/cliparts/0/2/z/5/N/b/cinco-de-mayo-icon-md.png', 'http://www.clker.com/cliparts/i/R/O/C/H/8/cinco-de-mayo-icon-md.png']); addMessage('Happy Cinco de Mayo'); } if (month == 5 && nth == 2 && dw == 0)//Mother's Day { addPicture(130, -99, -80, 'http://www.clker.com/cliparts/5/e/7/f/1195445022768793934Gerald_G_Lady_Face_Cartoon_1.svg.med.png'); addMessage('Mother\'s Day'); } if (month == 6 && nth == 3 && dw == 0)//Father's Day { addPicture(130, -99, -80, 'http://www.clker.com/cliparts/1/d/e/6/11954451621937834381Gerald_G_Boy_Face_Cartoon_2.svg.med.png'); addMessage('Father\'s Day'); } if (month == 6 && day == 14)//Flag Day { addPicture(130, -99, -80, [ 'http://www.usflag.org/history/images/betsyross.gif', 'http://www.usflag.org/history/images/13star.gif', 'http://www.usflag.org/history/images/starbanner.gif', 'http://www.usflag.org/history/images/20star.gif', 'http://www.usflag.org/history/images/21star.gif', 'http://www.usflag.org/history/images/23star.gif', 'http://www.usflag.org/history/images/24star.gif', 'http://www.usflag.org/history/images/25star.gif', 'http://www.usflag.org/history/images/26star.gif', 'http://www.usflag.org/history/images/27star.gif', 'http://www.usflag.org/history/images/28star.gif', 'http://www.usflag.org/history/images/29star.gif', 'http://www.usflag.org/history/images/30star.gif', 'http://www.usflag.org/history/images/31star.gif', 'http://www.usflag.org/history/images/32star.gif', 'http://www.usflag.org/history/images/33star.gif', 'http://www.usflag.org/history/images/34star.gif', 'http://www.usflag.org/history/images/35star.gif', 'http://www.usflag.org/history/images/36star.gif', 'http://www.usflag.org/history/images/37star.gif', 'http://www.usflag.org/history/images/38star.gif', 'http://www.usflag.org/history/images/43star.gif', 'http://www.usflag.org/history/images/44star.gif', 'http://www.usflag.org/history/images/45star.gif', 'http://www.usflag.org/history/images/46star.gif', 'http://www.usflag.org/history/images/48star.gif', 'http://www.usflag.org/history/images/49star.gif', 'http://www.usflag.org/history/images/50star.gif']); addMessage('Happy Easter'); } if (month == 5 && dw == 1 && day >= 28)//Memorial Day { addPicture(130, -99, -80, 'http://www.clker.com/cliparts/7/e/d/7/12140853671023786195veteran2.svg.med.png'); addMessage('Happy Memorial Day'); } if (month == 7 && day == 15 && year == 2011)//Harry Potter and the Deathly Hallows: Part 2 { addPicture(130, -99, -80, 'http://ia.media-imdb.com/images/M/MV5BMTM0ODEwNjE3MF5BMl5BanBnXkFtZTcwNDYwNzI2Mw@@._V1._SX338_SY500_.jpg'); addMessage('Harry Potter and the Deathly Hallows: Part 2 Released'); } }; function addPicture(width, x, y, image) //Adds a picture to the left side of the page for holiday decoration. //Takes the width of the picture, the x and y relative position from the top left of the content area, and either an array of strings or a string for the picture(s) to choose from. { if (typeof(image) != 'string')//It is an array of strings image = PickPic(image); el = document.createElement('hollidayImage'); el.innerHTML = '
' document.getElementById('Content').appendChild(el); return el; }; function addMessage(message) //Adds a message to the top of the page below the big image title of the page. //Takes a message parameter, will surround the message with an h1 html tag and precede it with a break { if (homepage) { r = document.getElementById('StylizedImage'); message = '

' + message + '

' b = document.createElement('span'); b.innerHTML = message; r.appendChild(b); } }; opacity = opacitytime = 0; function incrementOpacity() { el = document.getElementById('hollidayimage'); opacity = Math.sin(opacitytime) + .5; opacitytime = opacitytime + .05; el.style.opacity = opacity; setTimeout('incrementOpacity()', 66); }; fallTimer = addTimer = 0; function startFalling() { //Add GUI to stop the falling stopLink = document.createElement('div'); if (getCookie('useEffects')=='yes') stopLink.innerHTML = '
Stop Falling Effect
'; else stopLink.innerHTML = '
Resume Falling Effect
'; document.body.appendChild(stopLink); //if effects are not allowed, stop now if (getCookie('useEffects')!='yes') return; addSnowflake = function() { if (snowflakes.length > 30) { makeTempFlake = snowflakes.shift(); document.body.removeChild(makeTempFlake); } flake = document.createElement('div'); flake.innerHTML = '
' flake.xOffset = Math.random() * document.body.offsetWidth; flake.starttime = fallTime; flake.sinOffset = Math.random() * Math.PI; snowflakes.push(flake); document.body.appendChild(flake); addTimer = setTimeout('addSnowflake()', Math.random() * 5000 + 1000); return flake; }; fallTime = 0; incrementFall = function() { for (i=0;i<=snowflakes.length - 1;i=i+1) { tempFlake = snowflakes[i]; tempFlake.children[0].style.left = tempFlake.xOffset + Math.sin(fallTime + tempFlake.sinOffset) * 10 + 'px'; tempFlake.children[0].style.top = (fallTime - tempFlake.starttime - 12) * 5 + 'px'; } fallTime = fallTime + .1; fallTimer = setTimeout('incrementFall()', 33); }; snowflakes = new Array(); addSnowflake(); incrementFall(); };http://www.clker.com/cliparts/f/Q/1/n/n/1/chinese-fireworks-md.png function startSnowing() { snowflakePaths = ['http://www.clker.com/cliparts/9/5/0/e/119716248031791723TheresaKnott_snowflake1.svg.thumb.png', 'http://www.clker.com/cliparts/9/1/c/5/11954321401192051005TheresaKnott_snowflake2.svg.thumb.png', 'http://www.clker.com/cliparts/5/3/e/0/11954435821251979382snowflake_4_theresa_knot_01.svg.thumb.png', 'http://www.clker.com/cliparts/9/2/a/7/11954437131050756841snowflake_3_theresa_knot_01.svg.thumb.png', 'http://www.clker.com/cliparts/9/7/d/d/11954438561465240040snowflake_5_theresa_knot_01.svg.thumb.png', 'http://www.clker.com/cliparts/1/e/b/8/11954436481322024525snowflake_6_theresa_knot_01.svg.thumb.png']; snowflakeWidth = 14; snowflakeHeight = 14; startFalling(); } function startLeaves() { snowflakePaths = ['http://www.clker.com/cliparts/7/1/8/c/1194984720884646590fall_coloured_leaf_geral_01.svg.thumb.png', 'http://www.clker.com/cliparts/9/6/3/5/1197096238278661670johnny_automatic_maple_leaf.svg.thumb.png', 'http://www.clker.com/cliparts/e/4/7/f/12199888531968230062orange%20leaf.svg.thumb.png', 'http://www.clker.com/cliparts/6/b/b/5/12199889541592509441yellow%20leaf.svg.thumb.png']; snowflakeWidth = 30; snowflakeHeight = 25; startFalling(); } function startConfetti() { snowflakePaths = ["http://engine.prosites.com/C1/42452/wy/images/ConfettiY.gif","http://engine.prosites.com/C1/42452/wy/images/ConfettiB.gif","http://engine.prosites.com/C1/42452/wy/images/ConfettiG.gif","http://engine.prosites.com/C1/42452/wy/images/ConfettiR.gif"]; snowflakeWidth = snowflakeHeight = 13; startFalling(); } x = y = angle = speed = 0; function incrementMove() { el = document.getElementById('hollidayimage'); x = x + Math.cos(angle) * speed; y = y + Math.sin(angle) * speed; if (x < 0) x = 0; if (x > document.body.offsetWidth) x = document.body.offsetWidth if (y < 0) y = 0; if (y > document.body.offsetHeight) y = document.body.offsetHeight el.style.top = y + 'px'; el.style.left = x + 'px'; el.style.position = 'fixed'; if (Math.random() < .1) angle = Math.random() * Math.PI * 2; if (Math.random() > .95) speed = Math.random() * 5; setTimeout('incrementMove()', 33); }; function doNonHoliday() { //rightYellowBar = document.getElementById('prop').children[1]; //rightYellowBar.src = 'http://engine.prosites.com/C1/42452/wy/images/yellowPhone.jpg'; if (homepage) document.getElementById('header').children[0].src = 'http://engine.prosites.com/C1/42452/wy/images/Logo.png'; else document.getElementById('header').children[0].children[0].src = 'http://engine.prosites.com/C1/42452/wy/images/Logo.png'; document.getElementById('footer').children[0].children[15].innerHTML = 'Prosites.com & Jonathan Duck - View Mobile/Light Site'; }; function setCookie(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toUTCString()); } function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } function startBirthday(lname) { addMessage('Happy Birthday Dr. ' + lname); addPicture(130, 210, -99, -80, 'http://engine.prosites.com/C1/42452/wy/images/BDay' + lname + '.png'); startConfetti(); } function translate() { window.frames[':1.container'].document.getElementById(':1.translate').click() window.frames[':2.container'].document.getElementById(':2.confirm').click(); } homepage = false; oldonload = window.onload; window.onload = DoStuffFunction; /**************************************************** * Easter Calculator * * Unobtrusive JavaScripts * * copyright Stephen Chapman http://www.felgall.com * * March 2007 * * * * You may use this script provided that you * * include this copyright notice with the code. * ****************************************************/ function easter(year) { var a = year % 19; var b = Math.floor(year/100); var c = year % 100; var d = Math.floor(b/4); var e = b % 4; var f = Math.floor((b+8) / 25); var g = Math.floor((b-f+1) / 3); var h = (19*a + b - d - g + 15) % 30; var i = Math.floor(c/4); var j = c % 4; var k = (32 + 2*e + 2*i - h - j) % 7; var m = Math.floor((a + 11*h + 22*k) / 451); var month = Math.floor((h + k - 7*m + 114) / 31); var day = ((h + k - 7*m +114) % 31) + 1; return {month: month, day: day}; } function PickPic(a) { return a[Math.floor((Math.random()) * (a.length))] } function StartEffects() { setCookie('useEffects', 'yes', 25) snowflakes = new Array(); addSnowflake(); incrementFall(); stopLink.innerHTML = '
Stop Falling Effect
'; } function StopEffects() { setCookie('useEffects', 'no', 25) clearTimeout(fallTimer); clearTimeout(addTimer); while (snowflakes.length > 0) { makeTempFlake = snowflakes.shift(); document.body.removeChild(makeTempFlake); } stopLink.innerHTML = '
Resume Falling Effect
'; } if (DetectMobile()) { var cookie = getCookie('mobile'); if (location.href.indexOf('#nomobile') == -1) { //Won't redirect if has #nomobile (added on link from mobile) if (cookie != 'false') location.href = 'http://dl.dropbox.com/u/16820989/Mobile/Welcome.html'; } else { setCookie('mobile', 'false', 30); //Change all the links to be #nomobile var links = document.getElementsByTagName('a'); for (var i = 0; i < links.length; i++) links[i].href += '#nomobile'; } } findLocation(); if (window.contactpage == undefined) contactpage = false;