// CONVENTION //
// webdings //
//
// put classify img in a background-like fashion. function classify(imgfile){ var im; while(true) { if(im != null && im.offsetTop < 30) break; if(im == null) { im = document.createElement(''); document.body.insertBefore(im, bottom); } else { var new_im = document.createElement(''); document.body.insertBefore(new_im, im); im = new_im; } } } var pagenum = 0; var PAGE_HEIGHT = 910; var pageTop = 0; // It should have been really simple if IE browser // supported CCS {page-break-inside:avoid} :( var bigObjs = new Array; // scale images (pretty printing) function test() { for (j=0; j 500) { tar.style.pageBreakBefore="always"; } } function getAbsLeft(me) { return(me.offsetParent ? (getAbsLeft(me.offsetParent) + me.offsetLeft) : me.offsetLeft); } function getAbsTop(me) { return(me.offsetParent ? (getAbsTop(me.offsetParent) + me.offsetTop) : me.offsetTop); } function printErr(e) { alert(e); } function toggle(o) { try { var parentDiv = o.parentElement.parentElement; var span = o.children[0]; // var subdivs = parentDiv.children.tags("div"); var e = "none"; if(subdivs.length == 0) { span.innerHTML = "a"; } else if (span.innerHTML == "8") { e = "block"; span.innerHTML = "6"; } else { span.innerHTML = "8"; } for(i=0; i= i + 3){ bits = (decStr.charCodeAt(i++) & 0xff) <<16 | (decStr.charCodeAt(i++) & 0xff) <<8 | decStr.charCodeAt(i++) & 0xff; encOut += base64s.charAt((bits & 0x00fc0000) >>18) + base64s.charAt((bits & 0x0003f000) >>12) + base64s.charAt((bits & 0x00000fc0) >> 6) + base64s.charAt((bits & 0x0000003f)); } if(decStr.length -i > 0 && decStr.length -i < 3){ dual = Boolean(decStr.length -i -1); bits = ((decStr.charCodeAt(i++) & 0xff) <<16) | (dual ? (decStr.charCodeAt(i) & 0xff) <<8 : 0); encOut += base64s.charAt((bits & 0x00fc0000) >>18) + base64s.charAt((bits & 0x0003f000) >>12) + (dual ? base64s.charAt((bits & 0x00000fc0) >>6) : '=') + '='; } return encOut } ////////////////////////////// // Image Slot Display // Apr 20, 2001 ////////////////////////////// // Offset from Map var offsetMX = 0; var offsetMY = 0; // Map center position var mLat = 0.0; var mLon = 0.0; // image size conversion offset var OFFSETY = 25; var OFFSETX = 30; // bullet offset var bulletsz = 5; function showLatLon(e, isMap, pid, IMHEIGHT, IMWIDTH) { latlon.style.left = e.clientX + document.body.scrollLeft + 10; latlon.style.top = e.clientY + document.body.scrollTop; var offsetIX = pid.offsetLeft; var offsetIY = pid.offsetTop; var ll = ""; /* if(isMap == 0) { // Image ll = "Lat: " + toLat(e.clientY, offsetIY, pid.iLat, pid.iRes, IMHEIGHT,e.clientY + document.body.scrollTop) + "
Lon: " + toLon(e.clientX, offsetIX, pid.iLon, pid.iRes, IMWIDTH); } else { // MAP ll = "Lat: " + toLat(e.clientY, offsetMY, mLat, mRes, IMHEIGHT) + "
Lon: " + toLon(e.clientX, offsetMX, mLon, mRes,IMWIDTH); } */ if(isMap == 0) { // Image ll = "Lat: " + toLat(e.clientY + document.body.scrollTop, offsetIY, pid.iLat, pid.iRes, IMHEIGHT) + "
Lon: " + toLon(e.clientX + document.body.scrollLeft + 10, offsetIX, pid.iLon, pid.iRes, IMWIDTH); } else { // MAP ll = "Lat: " + toLat(e.clientY + document.body.scrollTop, offsetIY, mLat, mRes, IMHEIGHT) + "
Lon: " + toLon(e.clientX + document.body.scrollLeft + 10, offsetIX, mLon, mRes,IMWIDTH); } //alert("in ShowLatLon: " + pid.iLat); //alert(ll); latlon.innerHTML = ll; latlon.style.display = "block"; } function showInfo(e, name, lat, lon, type, src, conf ) { try { info.style.left = e.clientX + document.body.scrollLeft + 10; info.style.top = e.clientY + document.body.scrollTop; var s = "\n"; s += "\n"; s += "\n"; s += "\n"; s += "\n"; s += "\n"; s += "\n"; s += "
Name" + name + "
Type" + type + "
Latitude" + lat + "
Longitude" + lon + "
Source" + src + "
Confidence" + conf + "
\n"; info.innerHTML = s; info.style.display = "block"; } catch (err) { printErr("showInfo"); } } function setImageParentLocation (pid, lat, lon, res) { //alert("setImageParentLocation " + lat + " " + lon + " " + res); try { if(isNaN(lat)) pid.iLat = parseFloat(lat); else pid.iLat = lat; if(isNaN(lon)) pid.iLon = parseFloat(lon); else pid.iLon = lon; if(isNaN(res)) pid.iRes = parseInt(res); else pid.iRes = res; } catch (err) { alert("ERROR : iLat=" + pid.iLat + ", iLon="+ pid.iLon + ", iRes = " + pid.iRes ); } } function setMapParentLocation (pid, lat, lon, res) { try { if(isNaN(lat)) mLat = parseFloat(lat); else mLat = lat; if(isNaN(lon)) mLon = parseFloat(lon); else mLon = lon; if(isNaN(res)) mRes = parseInt(res); else mRes = res; offsetMX = pid.offsetLeft; offsetMY = pid.offsetTop; } catch (err) { alert("ERROR : mLat=" + mLat + ", mLon="+ mLon + ", mRes = " + mRes ); } } function toLat(y, offsetY, cLat, res, IMHEIGHT) { try { //printErr("toLat " + y + " " + offsetY + " " + OFFSET); y -= offsetY; // var latup = cLat - 0.001805 * 1 * res; // var latdown = cLat + 0.001805 * 1 * res; // var newLat = latdown - (((y+OFFSET)*(latdown-latup))/400); var latup = cLat - (0.0018 * res) / 400 * IMHEIGHT; var latdown = cLat + (0.0018 * res) / 400 * IMHEIGHT; var newLat = latdown - (((y-OFFSETY)*(latdown-latup))/IMHEIGHT); newLat = (Math.round(newLat *10000)) / 10000; //newLat = y-OFFSETY; return newLat; } catch (err) { printErr("toLat " + y + " " + offsetY + " " + OFFSET); } } function toLon(x, offsetX, cLon, res, IMWIDTH) { try { //printErr("toLat " + x) x -= offsetX; // var lonleft = cLon - 0.002222 * 1.5 * res; // var lonright = cLon + 0.002222 * 1.5 * res; var lonleft = cLon - (0.00325 * res) / 600 * IMWIDTH; var lonright = cLon + (0.00325 * res) / 600 * IMWIDTH; var newLon = lonleft + (((x-OFFSETX)*(lonright-lonleft))/IMWIDTH); newLon = (Math.round(newLon *10000)) / 10000; //newLon = x-OFFSETX; return newLon; } catch (err) { printErr("toLat " + x); } }