var s1 = 3900; var s2 = 5100; var s3 = 0; var s4 = 400; var s5 = 1; var s6 = 0; var s7 = 0; var s8 = 0; var s9 = -100; var s10 = 0; var s11 = 0; var s12; var s13; var s14; var s15 = 0; var s16 = 0; function scavengerhunt_map_onmousedown(event) { s12 = s8; s13 = s9; document.getElementById("scavengerhunt-map").onmousemove = s17; s10 = event.clientX; s11 = event.clientY; } function s17(event) { s12 = s8 + event.clientX - s10; if (s12 > 0) { s12 = 0; } else if (s12 < (s3 - s6)) { s12 = s3 - s6; } s13 = s9 + event.clientY - s11; if (s13 > 0) { s13 = 0; } else if (s13 < (s4 - s7)) { s13 = s4 - s7; } $("#scavengerhunt-map").css({"background-position-x":s12 + "px"}); $("#scavengerhunt-map").css({"background-position-y":s13 + "px"}); } function s18(event) { if (document.getElementById("scavengerhunt-map").onmousemove !== null) { document.getElementById("scavengerhunt-map").onmousemove = null; s8 = s12; s9 = s13; s19(); } } function scavengerhunt_map_panup() { s9 = s9 + (s4/2); s19(); } function scavengerhunt_map_pandown() { s9 = s9 - (s4/2); s19(); } function scavengerhunt_map_panleft() { s8 = s8 + (s3/2); s19(); } function scavengerhunt_map_panright() { s8 = s8 - (s3/2); s19(); } function scavengerhunt_map_zoomin() { if (s5 < 5) { var p20 = s8; var p21 = s9; s5++; s6 = Math.round(s3 * (2**(s5 - 1))); s7 = Math.round(s3 * (s2/s1) * (2**(s5 - 1))); s8 = Math.round((p20 * 2) - (s3/2)); s9 = Math.round((p21 * 2) - (s4/2)); s19(); } } function scavengerhunt_map_zoomout() { if (s5 > 1) { var p20 = s8; var p21 = s9; s5--; s6 = Math.round(s3 * (2**(s5 - 1))); s7 = Math.round(s3 * (s2/s1) * (2**(s5 - 1))); s8 = Math.round((p20 + (s3/2))/2); s9 = Math.round((p21 + (s4/2))/2); s19(); } } function s19() { $(".scavengerhunt-clickmap").css({"display":"none"}); if (s8 > 0) { s8 = 0; } else if (s8 < (s3 - s6)) { s8 = s3 - s6; } if (s9 > 0) { s9 = 0; } else if (s9 < (s4 - s7)) { s9 = s4 - s7; } $("#scavengerhunt-map").css({"background-position":s8 + "px " + s9 + "px"}); $("#scavengerhunt-map").css({"background-size":s6 + "px " + s7 + "px"}); $("#scavengerhunt-clickmap-zoom" + s5).css({"display":"block"}); $("#scavengerhunt-clickmap-zoom" + s5).css({"left":s8, "top":s9}); /* Enable/Disable pan buttons */ if (s8 == 0) { $("#scavengerhunt-panleftbutton-enabled").css({"display":"none"}); $("#scavengerhunt-panleftbutton-disabled").css({"display":"table"}); } else { $("#scavengerhunt-panleftbutton-enabled").css({"display":"table"}); $("#scavengerhunt-panleftbutton-disabled").css({"display":"none"}); } if (s8 == (s3 - s6)) { $("#scavengerhunt-panrightbutton-enabled").css({"display":"none"}); $("#scavengerhunt-panrightbutton-disabled").css({"display":"table"}); } else { $("#scavengerhunt-panrightbutton-enabled").css({"display":"table"}); $("#scavengerhunt-panrightbutton-disabled").css({"display":"none"}); } if (s9 == 0) { $("#scavengerhunt-panupbutton-enabled").css({"display":"none"}); $("#scavengerhunt-panupbutton-disabled").css({"display":"table"}); } else { $("#scavengerhunt-panupbutton-enabled").css({"display":"table"}); $("#scavengerhunt-panupbutton-disabled").css({"display":"none"}); } if (s9 == (s4 - s7)) { $("#scavengerhunt-pandownbutton-enabled").css({"display":"none"}); $("#scavengerhunt-pandownbutton-disabled").css({"display":"table"}); } else { $("#scavengerhunt-pandownbutton-enabled").css({"display":"table"}); $("#scavengerhunt-pandownbutton-disabled").css({"display":"none"}); } /* Enable/Disable zoom buttons */ if (s5 == 1) { $("#scavengerhunt-zoomoutbutton-enabled").css({"display":"none"}); $("#scavengerhunt-zoomoutbutton-disabled").css({"display":"block"}); } else { $("#scavengerhunt-zoomoutbutton-enabled").css({"display":"block"}); $("#scavengerhunt-zoomoutbutton-disabled").css({"display":"none"}); } if (s5 == 5) { $("#scavengerhunt-zoominbutton-enabled").css({"display":"none"}); $("#scavengerhunt-zoominbutton-disabled").css({"display":"block"}); } else { $("#scavengerhunt-zoominbutton-enabled").css({"display":"block"}); $("#scavengerhunt-zoominbutton-disabled").css({"display":"none"}); } } function scavengerhunt_venue_open(v22) { var v23 = 0; var v24 = 0; var v25 = 0; var v26 = 0; var o27 = ""; var o28 = 0; var o29 = 0; var o30 = 0; var o31 = 0; var i32 = ""; var d33 = 0; var d34 = 0; var d35 = 0; var d36 = 0; var i37 = []; if (0) { } else if (v22 == 101) { if ((1000/750) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (750/1000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (1000/750)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/101a.jpg"; var o38 = 2000; var o39 = "1587"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((784 * (o28/o38)) + o30); d34 = Math.round((649 * (o29/o39)) + o31); d35 = Math.round(274 * (o28/o38)); d36 = Math.round(897 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/101b.jpg"; var i40 = 1000; var i41 = 750; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-101-foundflag").val() != "1") { i37.push({ i44:"101", i45:"/_images/scavenger-hunt/items/101.png", i46:(35 * (i42/i40)), i47:(35 * (i43/i41)), x48:(930 * (i42/i40)), y49:(395 * (i43/i41)) }); } } else if (v22 == 102) { if ((2000/1296) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (1296/2000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (2000/1296)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/102a.jpg"; var o38 = 900; var o39 = "675"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((298 * (o28/o38)) + o30); d34 = Math.round((397 * (o29/o39)) + o31); d35 = Math.round(86 * (o28/o38)); d36 = Math.round(115 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/102b.jpg"; var i40 = 2000; var i41 = 1296; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-112-foundflag").val() != "1") { i37.push({ i44:"112", i45:"/_images/scavenger-hunt/items/112.png", i46:(77 * (i42/i40)), i47:(77 * (i43/i41)), x48:(1905 * (i42/i40)), y49:(812 * (i43/i41)) }); } } else if (v22 == 103) { if ((1000/750) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (750/1000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (1000/750)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/103a.jpg"; var o38 = 1400; var o39 = "1000"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((319 * (o28/o38)) + o30); d34 = Math.round((488 * (o29/o39)) + o31); d35 = Math.round(173 * (o28/o38)); d36 = Math.round(366 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/103b.jpg"; var i40 = 1000; var i41 = 750; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-102-foundflag").val() != "1") { i37.push({ i44:"102", i45:"/_images/scavenger-hunt/items/102.png", i46:(60 * (i42/i40)), i47:(60 * (i43/i41)), x48:(895 * (i42/i40)), y49:(478 * (i43/i41)) }); } } else if (v22 == 104) { if ((550/413) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (413/550)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (550/413)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/104a.jpg"; var o38 = 2000; var o39 = "1500"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((1664 * (o28/o38)) + o30); d34 = Math.round((839 * (o29/o39)) + o31); d35 = Math.round(229 * (o28/o38)); d36 = Math.round(440 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/104b.jpg"; var i40 = 550; var i41 = 413; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-103-foundflag").val() != "1") { i37.push({ i44:"103", i45:"/_images/scavenger-hunt/items/103.png", i46:(30 * (i42/i40)), i47:(30 * (i43/i41)), x48:(20 * (i42/i40)), y49:(245 * (i43/i41)) }); } } else if (v22 == 105) { if ((750/500) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (500/750)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (750/500)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/105a.jpg"; var o38 = 800; var o39 = "600"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((482 * (o28/o38)) + o30); d34 = Math.round((393 * (o29/o39)) + o31); d35 = Math.round(104 * (o28/o38)); d36 = Math.round(134 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/105b.jpg"; var i40 = 750; var i41 = 500; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-104-foundflag").val() != "1") { i37.push({ i44:"104", i45:"/_images/scavenger-hunt/items/104.png", i46:(27 * (i42/i40)), i47:(27 * (i43/i41)), x48:(254 * (i42/i40)), y49:(184 * (i43/i41)) }); } } else if (v22 == 106) { if ((2000/1500) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (1500/2000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (2000/1500)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/106a.jpg"; var o38 = 500; var o39 = "370"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((232 * (o28/o38)) + o30); d34 = Math.round((279 * (o29/o39)) + o31); d35 = Math.round(39 * (o28/o38)); d36 = Math.round(45 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/106b.jpg"; var i40 = 2000; var i41 = 1500; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-105-foundflag").val() != "1") { i37.push({ i44:"105", i45:"/_images/scavenger-hunt/items/105.png", i46:(138 * (i42/i40)), i47:(138 * (i43/i41)), x48:(198 * (i42/i40)), y49:(523 * (i43/i41)) }); } } else if (v22 == 107) { if ((1024/576) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (576/1024)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (1024/576)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/107a.jpg"; var o38 = 1000; var o39 = "750"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((410 * (o28/o38)) + o30); d34 = Math.round((297 * (o29/o39)) + o31); d35 = Math.round(194 * (o28/o38)); d36 = Math.round(221 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/107b.jpg"; var i40 = 1024; var i41 = 576; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } } else if (v22 == 108) { if ((1200/800) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (800/1200)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (1200/800)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/108a.jpg"; var o38 = 2000; var o39 = "1260"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((841 * (o28/o38)) + o30); d34 = Math.round((442 * (o29/o39)) + o31); d35 = Math.round(708 * (o28/o38)); d36 = Math.round(645 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/108b.jpg"; var i40 = 1200; var i41 = 800; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-106-foundflag").val() != "1") { i37.push({ i44:"106", i45:"/_images/scavenger-hunt/items/106.png", i46:(36 * (i42/i40)), i47:(36 * (i43/i41)), x48:(587 * (i42/i40)), y49:(606 * (i43/i41)) }); } } else if (v22 == 109) { if ((2000/1500) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (1500/2000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (2000/1500)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/109a.jpg"; var o38 = 864; var o39 = "587"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((357 * (o28/o38)) + o30); d34 = Math.round((475 * (o29/o39)) + o31); d35 = Math.round(181 * (o28/o38)); d36 = Math.round(53 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/109b.jpg"; var i40 = 2000; var i41 = 1500; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-107-foundflag").val() != "1") { i37.push({ i44:"107", i45:"/_images/scavenger-hunt/items/107.png", i46:(110 * (i42/i40)), i47:(110 * (i43/i41)), x48:(1632 * (i42/i40)), y49:(875 * (i43/i41)) }); } } else if (v22 == 110) { if ((2000/1500) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (1500/2000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (2000/1500)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/110a.jpg"; var o38 = 700; var o39 = "500"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((349 * (o28/o38)) + o30); d34 = Math.round((300 * (o29/o39)) + o31); d35 = Math.round(59 * (o28/o38)); d36 = Math.round(91 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/110b.jpg"; var i40 = 2000; var i41 = 1500; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-108-foundflag").val() != "1") { i37.push({ i44:"108", i45:"/_images/scavenger-hunt/items/108.png", i46:(135 * (i42/i40)), i47:(135 * (i43/i41)), x48:(465 * (i42/i40)), y49:(720 * (i43/i41)) }); } } else if (v22 == 111) { if ((1000/750) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (750/1000)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (1000/750)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/111a.jpg"; var o38 = 2000; var o39 = "1333"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((819 * (o28/o38)) + o30); d34 = Math.round((737 * (o29/o39)) + o31); d35 = Math.round(228 * (o28/o38)); d36 = Math.round(363 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/111b.jpg"; var i40 = 1000; var i41 = 750; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-109-foundflag").val() != "1") { i37.push({ i44:"109", i45:"/_images/scavenger-hunt/items/109.png", i46:(325 * (i42/i40)), i47:(325 * (i43/i41)), x48:(-140 * (i42/i40)), y49:(124 * (i43/i41)) }); } } else if (v22 == 112) { if ((900/599) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (599/900)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (900/599)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/112a.jpg"; var o38 = 1024; var o39 = "683"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((384 * (o28/o38)) + o30); d34 = Math.round((245 * (o29/o39)) + o31); d35 = Math.round(262 * (o28/o38)); d36 = Math.round(196 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/112b.jpg"; var i40 = 900; var i41 = 599; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } } else if (v22 == 113) { if ((1200/900) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (900/1200)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (1200/900)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/113a.jpg"; var o38 = 2000; var o39 = "1500"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((1073 * (o28/o38)) + o30); d34 = Math.round((835 * (o29/o39)) + o31); d35 = Math.round(239 * (o28/o38)); d36 = Math.round(341 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/113b.jpg"; var i40 = 1200; var i41 = 900; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-110-foundflag").val() != "1") { i37.push({ i44:"110", i45:"/_images/scavenger-hunt/items/110.png", i46:(142 * (i42/i40)), i47:(142 * (i43/i41)), x48:(932 * (i42/i40)), y49:(740 * (i43/i41)) }); } } else if (v22 == 114) { if ((750/560) > (s3/s4)) { v25 = s3 - 20; v26 = Math.round(v25 * (560/750)); v23 = 10; v24 = ((s4 - v26)/2); } else { v26 = s4 - 20; v25 = Math.round(v26 * (750/560)); v23 = ((s3 - v25)/2); v24 = 10; } o27 = "/_images/scavenger-hunt/venues/114a.jpg"; var o38 = 2000; var o39 = "1467"; if ((o38/o39) > (v25/v26)) { o28 = v25; o29 = Math.round(o28 * (v26/v25)); o30 = 0; o31 = Math.round(o29 - v26) * -0.5; } else if ((o38/o39) < (v25/v26)) { o29 = v26; o28 = Math.round(o29 * (v25/v26)); o30 = Math.round(o28 - v25) * -0.5; o31 = 0; } else { o28 = v25; o29 = v26; o30 = 0; o31 = 0; } d33 = Math.round((1298 * (o28/o38)) + o30); d34 = Math.round((771 * (o29/o39)) + o31); d35 = Math.round(220 * (o28/o38)); d36 = Math.round(353 * (o29/o39)); i32 = "/_images/scavenger-hunt/venues/114b.jpg"; var i40 = 750; var i41 = 560; if ((i40/i41) > (v25/s4)) { i42 = v25; i43 = Math.round(i42 * (i41/i40)); } else { i43 = v26; i42 = Math.round(i43 * (i40/i41)); } if ($("#scavengerhunt-founditem-111-foundflag").val() != "1") { i37.push({ i44:"111", i45:"/_images/scavenger-hunt/items/111.png", i46:(75 * (i42/i40)), i47:(75 * (i43/i41)), x48:(630 * (i42/i40)), y49:(195 * (i43/i41)) }); } } var h50 = ""; h50 += "
"; h50 += " Congratulations! "; h50 += " "; h50 += " "; h50 += " You found all 12 scavenger hunt items. "; h50 += " Your final time is " + buf + ". "; h50 += " Play Again | "; h50 += "
"; h50 += " Congratulations! "; h50 += " "; h50 += " "; h50 += " You found all 12 scavenger hunt items. "; h50 += " Your final time is " + buf + ". "; h50 += " "; h50 += " "; h50 += " You finished the scavenger hunt with one of the fatest times. Enter your name or nickname below to be included in the leaderboard. This name will be pubilcly visible. Submit | "; h50 += "
"; h50 += " Game Over "; h50 += " "; h50 += " "; h50 += " You found " + $("#scavengerhunt-foundcount").html() + " out of 12 scavenger hunt items. "; h50 += " Your final time is " + buf + ". "; h50 += " Play Again | "; h50 += "
"; h50 += " Game Over "; h50 += " "; h50 += " "; h50 += " You found " + $("#scavengerhunt-foundcount").html() + " out of 12 scavenger hunt items. "; h50 += " Your final time is " + buf + ". "; h50 += " "; h50 += " "; h50 += " You finished with one of the highest number of found items. Enter your name or nickname below to be included in the leaderboard. This name will be pubilcly visible. Submit | "; h50 += "
Hooray! You name has been added to the leaderboard!
"; h50 += ""; h50 += "