// The constructor should be called with // the parent object (optional, defaults to window). function Timer(){ this.obj = (arguments.length)?arguments[0]:window; return this; } // The set functions should be called with: // - The name of the object method (as a string) (required) // - The millisecond delay (required) // - Any number of extra arguments, which will all be // passed to the method when it is evaluated. Timer.prototype.setInterval = function(func, msec){ var i = Timer.getNew(); var t = Timer.buildCall(this.obj, i, arguments); Timer.set[i].timer = window.setInterval(t,msec); return i; } Timer.prototype.setTimeout = function(func, msec){ var i = Timer.getNew(); Timer.buildCall(this.obj, i, arguments); Timer.set[i].timer = window.setTimeout("Timer.callOnce("+i+");",msec); return i; } // The clear functions should be called with // the return value from the equivalent set function. Timer.prototype.clearInterval = function(i){ if(!Timer.set[i]) return; window.clearInterval(Timer.set[i].timer); Timer.set[i] = null; } Timer.prototype.clearTimeout = function(i){ if(!Timer.set[i]) return; window.clearTimeout(Timer.set[i].timer); Timer.set[i] = null; } // Private data Timer.set = new Array(); Timer.buildCall = function(obj, i, args){ var t = ""; Timer.set[i] = new Array(); if(obj != window){ Timer.set[i].obj = obj; t = "Timer.set["+i+"].obj."; } t += args[0]+"("; if(args.length > 2){ Timer.set[i][0] = args[2]; t += "Timer.set["+i+"][0]"; for(var j=1; (j+2)


PDF
Google Earth
GPX
'; this.interval; this.move = function() { pix=this.pix_coord_array[this.i].split(","); text="
T:"+this.time_array[this.i]+"
E: "+this.ele_array[this.i]+"
S:"+this.speed_array[this.i]+"
I:"+this.incline_array[this.i]+"%
"; if (!this.minimized) document.getElementById("marker"+this.id).style.display = "inline"; document.getElementById("stats"+this.id).innerHTML = text; document.getElementById("marker"+this.id).style.left = pix[0]+"px"; document.getElementById("marker"+this.id).style.top = pix[1]+"px"; //stickPos=document.getElementById("stick"+this.id).style.left; newStickpos=this.percent_array[this.i]; document.getElementById("stick"+this.id).style.left = newStickpos+"px"; } this.gmapPan = function() { coord=this.coord_array[this.i].split(" "); try { map.panTo(new GLatLng(coord[1],coord[0])); } catch (e) {} } this.play = function() { document.getElementById("playbutton"+this.id).style.display = "none"; document.getElementById("pausebutton"+this.id).style.display = "inline"; this.interval=500; this.animate(); } this.animate = function() { if (!this.minimized) document.getElementById("stick"+this.id).style.display = "inline"; if (this.pix_coord_array.length==this.i) return; this.move(this.i); this.gmapPan(this.i); this.i++; this.timer.setTimeout("animate", this.interval) } this.pause = function() { document.getElementById("playbutton"+this.id).style.display = "inline"; document.getElementById("pausebutton"+this.id).style.display = "none"; this.interval=10000000; } this.stepFor = function() { this.i++; this.move(this.i); this.gmapPan(this.i); } this.stepBack = function() { this.i--; this.move(this.i); this.gmapPan(this.i); } this.reset = function(){ this.i=0; document.getElementById("marker"+this.id).style.display = "none"; document.getElementById("stick"+this.id).style.display = "none"; } this.changeSize = function(){ if (this.minimized) { this.minimized=false; value="inline" } else { this.minimized=true; value="none" } document.getElementById("mapimage"+this.id).style.display=value; document.getElementById("profileimage"+this.id).style.display=value; document.getElementById("stick"+this.id).style.display=value; document.getElementById("marker"+this.id).style.display=value; } this.addHTML = function() { document.getElementById("toposhare"+this.id).innerHTML=this.html; } this.addTitel = function(str) { document.getElementById("titellink"+this.id).innerHTML=str; } this.addWeather = function() { document.getElementById("weather"+this.id).innerHTML=this.weatherHTML; } this.addMapImage = function(url) { document.getElementById("mapimage"+this.id).innerHTML=''; } this.addProfileImage = function(url) { document.getElementById("profileimage"+this.id).innerHTML=''; } this.renderWindow = function() { YAHOO.example.container.panelwidget = new YAHOO.widget.Panel("panelwidget", {visible:true, draggable:false, close:false } ); YAHOO.example.container.panelwidget.render(); YAHOO.example.container.panelwidget.show(); } } var baseUrl ="http://www.toposhare.org"; var playerObj3105 = new player("3105") //alert(playerObj3105.id); playerObj3105.weatherHTML="
Now
50°
Later
45° 73°
Tomorrow
47° 74°
"; playerObj3105.percent_array='0|0|0|4.45|31.15|35.6|40.05|40.05|44.5|44.5|57.85|62.3|71.2|80.1|89|89|97.9|115.7|133.5|146.85|155.75|155.75|164.65|164.65|169.1|173.55|178|182.45|200.25|209.15|209.15|209.15|209.15|209.15|209.15|213.6|213.6|218.05|218.05|231.4|240.3|244.75|249.2|249.2|249.2|253.65|258.1|262.55|262.55|267|271.45|271.45|275.9|275.9|280.35|280.35|289.25|298.15|298.15|307.05|311.5|320.4|324.85|324.85|324.85|324.85|324.85|329.3|329.3|329.3|329.3|333.75|338.2|347.1|360.45|373.8|373.8|378.25|378.25|382.7|391.6|396.05|396.05|400.5|404.95|409.4|413.85|422.75|422.75|431.65|436.1|436.1|440.55|440.55|445|'.split('|'); playerObj3105.pix_coord_array='1,92|3,92|5,92|6,91|32,81|37,84|40,84|42,85|45,86|45,86|59,86|63,86|72,91|78,95|87,98|89,99|94,102|115,103|131,100|143,107|152,106|154,105|158,101|161,101|164,101|170,103|171,106|175,111|190,115|199,118|199,120|198,120|199,120|199,120|199,120|199,118|198,118|196,116|195,115|181,114|174,110|169,105|168,104|167,103|165,102|164,101|159,101|156,103|154,105|151,107|147,108|145,108|143,107|144,109|145,108|144,108|137,103|127,99|125,98|118,99|114,102|106,106|108,109|108,109|108,109|107,107|106,107|107,105|107,105|107,106|106,106|102,106|99,105|89,99|77,95|68,88|67,86|64,85|61,85|59,85|49,87|46,87|43,85|39,84|36,83|31,81|27,80|19,80|17,81|12,85|10,87|8,89|6,91|3,92|3,92'.split('|'); playerObj3105.coord_array='-122.99199 43.792804,-122.99134 43.792939,-122.990569 43.7929,-122.990399 43.793211,-122.981464 43.79661,-122.97943 43.795857,-122.978645 43.795606,-122.977893 43.795347,-122.97689 43.795009,-122.976766 43.794958,-122.971911 43.794867,-122.970668 43.795102,-122.967376 43.793402,-122.965466 43.791993,-122.96229 43.790931,-122.961668 43.790645,-122.959843 43.789503,-122.952632 43.789191,-122.947043 43.790185,-122.942885 43.787882,-122.939802 43.78804,-122.939013 43.788502,-122.937638 43.789665,-122.936668 43.789921,-122.935372 43.789974,-122.93357 43.788962,-122.932941 43.787997,-122.931633 43.786351,-122.926377 43.785083,-122.923543 43.783941,-122.923466 43.783273,-122.92355 43.783226,-122.923514 43.783267,-122.923498 43.783288,-122.923496 43.783377,-122.923529 43.783746,-122.92371 43.78407,-122.924361 43.784678,-122.924824 43.784907,-122.929686 43.785283,-122.931919 43.78664,-122.933819 43.78838,-122.934024 43.788761,-122.934407 43.789133,-122.935199 43.789499,-122.935433 43.789636,-122.93734 43.789629,-122.938379 43.789112,-122.93905 43.788488,-122.940062 43.787751,-122.941308 43.787427,-122.942016 43.787476,-122.942905 43.787875,-122.942291 43.787155,-122.942264 43.787215,-122.942532 43.787442,-122.945016 43.789027,-122.948249 43.790609,-122.948994 43.790804,-122.951513 43.790441,-122.952947 43.789527,-122.955679 43.787974,-122.955059 43.787083,-122.954996 43.787105,-122.955041 43.787189,-122.955363 43.787549,-122.955595 43.787793,-122.955165 43.78825,-122.955198 43.788253,-122.955265 43.78823,-122.955783 43.788204,-122.957108 43.788231,-122.957999 43.788548,-122.961618 43.790632,-122.965763 43.792024,-122.968792 43.794474,-122.96932 43.794886,-122.97011 43.795193,-122.971091 43.795339,-122.972074 43.795208,-122.975465 43.794592,-122.976419 43.794819,-122.97754 43.795196,-122.978748 43.795663,-122.979986 43.796085,-122.981745 43.796661,-122.98293 43.79701,-122.985744 43.79707,-122.986466 43.796792,-122.988185 43.795327,-122.989055 43.794551,-122.989531 43.79406,-122.990194 43.793384,-122.991422 43.792846,-122.991365 43.792887'.split(','); playerObj3105.ele_array='82|715|735|791|728|728|728|735|741|748|764|761|810|823|827|810|817|840|889|873|886|886|886|886|886|869|869|873|873|856|853|853|853|853|850|850|850|846|846|850|843|856|860|860|833|833|846|846|846|850|850|850|853|850|846|846|853|853|853|856|860|866|873|873|863|863|873|866|869|873|876|873|879|823|843|817|804|804|804|804|797|794|787|781|774|764|761|761|735|722|715|709|709|774|725'.split('|'); playerObj3105.time_array='23:13:55|23:21:40|23:23:26|23:23:42|23:29:37|23:30:38|23:31:01|23:31:24|23:32:05|23:32:19|23:38:37|23:39:28|23:41:36|23:42:47|23:44:29|23:45:00|23:47:30|23:52:06|23:58:00|00:00:36|00:01:54|00:02:20|00:03:13|00:03:38|00:04:10|00:05:11|00:05:49|00:06:54|00:09:18|00:10:48|00:11:29|00:11:33|00:11:39|00:11:41|00:11:47|00:12:05|00:12:19|00:13:17|00:13:35|00:16:00|00:17:17|00:18:37|00:18:47|00:18:54|00:19:54|00:20:25|00:21:11|00:21:42|00:22:12|00:22:49|00:23:23|00:23:39|00:24:06|00:25:11|00:25:35|00:26:17|00:27:19|00:28:06|00:28:17|00:28:52|00:29:16|00:30:22|00:33:17|00:33:42|00:40:10|00:40:29|00:41:05|00:41:56|00:41:59|00:42:04|00:42:32|00:43:18|00:43:41|00:45:34|00:48:01|00:49:00|00:49:18|00:49:40|00:50:03|00:50:29|00:52:06|00:52:35|00:53:08|00:53:41|00:54:09|00:54:50|00:55:18|00:56:30|00:56:56|00:57:59|00:58:29|00:58:53|00:59:20|01:02:28|01:03:39'.split('|'); playerObj3105.speed_array='0|0.3|1.3|5.2|5.1|6.7|6.7|6.5|4.9|1.8|2.3|4.5|5.7|6.9|6.2|4.3|2.9|4.7|2.9|6|7.1|7|7.2|7.4|7.3|6.7|7|7.3|6.9|6.5|4.1|4.8|2|3|3.7|5.1|6.2|3.3|5.6|6.1|6.8|6.9|10.2|16.5|2.8|1.7|7.5|7.3|6.6|7|7|8|7|3.2|0.7|1.8|9.6|14.9|13|13.2|14.3|9.5|1.4|0.5|0.1|5.6|2|2.7|2|2.7|3.3|5.2|7.8|7.4|5.6|13.9|7.8|7.3|7.8|6.9|6.5|6.2|6.7|7.5|8.8|8.5|8.2|7|5.7|7.6|8.3|6.2|7.6|1.4|0.2'.split('|'); playerObj3105.incline_array='0|355|10|46|-2|0|0|3|2|17|1|-1|5|2|0|-8|1|1|3|-1|2|0|0|0|0|-3|0|0|0|-2|-1|0|0|0|-10|0|0|-1|0|0|-1|2|2|0|-11|0|3|0|0|1|0|0|1|-1|-14|0|1|0|0|0|1|1|2|0|-30|0|9|-3|37|17|2|-1|3|-5|2|-2|-6|0|0|0|-1|-1|-2|-2|-2|-2|-1|0|-12|-2|-2|-3|0|17|-232'.split('|'); YAHOO.util.Event.onDOMReady(function() { playerObj3105.addHTML(); playerObj3105.addTitel('
Row River Trail
'); playerObj3105.addWeather(); playerObj3105.addMapImage('http://www.toposhare.org/routemap_img/map_3105.png'); playerObj3105.addProfileImage('http://www.toposhare.org/profile_img/1284123231869515_feets'); //document.getElementById("trkNameIdPlayer3105").innerHTML="Row River Trail | 8.4 Miles | Cycling "; window.fbAsyncInit = function() { FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); });