2 <%= t 'site.edit.flash_player_required' %>
5 <%= javascript_include_tag 'swfobject.js' %>
6 <script type="text/javascript" defer="defer">
7 var brokenContentSize = $("content").offsetWidth == 0;
8 var fo = new SWFObject("/potlatch2/potlatch2.swf?d="+Math.round(Math.random()*1000), "potlatch", "100%", "100%", "9", "#FFFFFF");
9 // 700,600 for fixed size, 100%,100% for resizable
12 window.onbeforeunload=function() {
14 return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>';
18 function markChanged(a) { changesaved=a; }
20 function doSWF(lat,lon,zoom) {
21 fo.addParam("base","/potlatch2");
22 if (lat) { fo.addVariable("lat",lat); }
23 if (lon) { fo.addVariable("lon",lon); }
24 fo.addVariable("zoom",zoom);
25 fo.addVariable("api","/api/<%= API_VERSION %>/");
26 fo.addVariable("policy","/api/crossdomain.xml");
27 fo.addVariable("connection","XML");
31 doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
33 function setPosition(lat, lon, zoom) {
34 doSWF(lat, lon, zoom || 15);