Copyright (C)1996 Philip Tan Boon Yew
All Rights Reserved. These functions can be re-used or modified, if credit is given in the source code. I will not be held responsible for any unwanted effects due to the usage of these functions or any derivative. No warrantees for usability for any specific application are given or implied.
Philip Tan, 11th of May, 1996.
This code is not really meant for plugging into your own pages...it's pretty useless (as far as I can tell) other than how it is presented in the demo: a one-time tool to convert NCSA Image Maps to Client-Side Image maps. ncsa2csim uses replaceAll to turn all instances of 'circ' to 'circle', since NCSA maps can be used with either terminology.
convCircle is also used to convert NCSA-specified oval shapes into Client-Side circles.
ncsa2csim will also invert the order in which the image map areas are defined, so that overlapping areas are handled according to their NCSA definitions.
Example: convCircle takes in "5,48,70,114" as an input string and returns "38,81,33".
In case you're looking for other imagemaps in the FireHazard web site, don't bother. I thought them unnecessary after much consideration. This might change after time.
Look at the source of this HTML document to get at the code. They are fully annotated and should be easy enough to tailor for your own uses.
<IMG SRC="http://your.domain.name/your/graphic/path.gif usemap="#imapname">If you wish to use Client-Side and Server-Side maps together (for compatibility) use this code:
<a href="http://your.domain.name/your/serverside/map/path.map> <IMG SRC="http://your.domain.name/your/graphic/path.gif ismap usemap="#imapname"> </a>The output of ncsa2csim can be copied into anywhere inside the actual HTML code of that particular page. However, if you wish to keep the CS-maps located in a central file, you can put the CS-map definitions into a text file all by itself. Let's assume this text file is named csimage.map.
<IMG SRC="http://your.domain.name/your/graphic/path.gif usemap="http://your.domain.name/your/csimap/path/csimage.map#imapname">It's like using anchors (or targets) to link to one particular place in a HTML document, right?
default http://home.pacific.net.sg/~firehzrd/
default
