Appendix: Buzzsaw Code Integration | 77
if (dcookie.substring(cbegin, vbegin) == cname) {
var vend = dcookie.indexOf (";", vbegin);
if (vend == -1) vend = clen;
return unescape(dcookie.substring(vbegin, vend));
}
cbegin = dcookie.indexOf(" ", cbegin) + 1;
if (cbegin == 0) break;
}
return null;
}
function setCookie (name, value, expires) {
if (!expires) expires = new Date();
document.cookie = name + "=" + escape (value) +
"; expires=" + expires.toGMTString() + "; path=/";
}
function delCookie (name) {
var expireNow = new Date();
document.cookie = name + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/";
}
// -->
</SCRIPT>
<!-- By using the onUnload event, the map state will be saved when the user
leaves the page -->
<BODY onUnload="saveMapState()">
<SCRIPT LANGUAGE="JavaScript">
document.write('<OBJECT ID="map" WIDTH=100% HEIGHT=100%');
document.write(' CLASSID="CLSID:62789780-B744-11D0-986B-00609731A21D"');
// if you put the CODEBASE parameter here, it must point to a secure
// site, otherwise you will get the "This page contains both secure
// and nonsecure items." dialog box.
document.write(' CODEBASE="https://folders.buzzsaw.com/project/);
document.write(mgaxctrl.cab#Version=6,0,2,2">');
document.write(' <PARAM NAME="URL" VALUE="https://folders.buzzsaw.com/’);
document.write(Project/pathtomwf">');
document.write(' <PARAM NAME="ObjectLinkTarget" VALUE="_self">');
// Put any other parameters that you want here, but don't use Lat, Lon,
// MapWidth, Units or SelObjs.
document.write(getMapStatePARAM()); // restores the view and selection
document.write('</OBJECT>');
</SCRIPT>
</BODY>
</HTML>