// Central definitions for MapImagery site

function IsCurrentDocument(url) {
 var stripped = document.URL.replace(/[^\/]*\//, "").replace(/[^\/]*\//, "").replace(/[^\/]*\//, "/");
 return (stripped.lastIndexOf(url) == 0);
}

// Change this for standalone ECW help file.
function StandAlone() {
	return (0);
}


function Top() {
	/* return ("d:/gid/mapimagery"); */
	return ("");
}


function HeaderEntry(prompt,url) {
;
	document.writeln('    <td BGCOLOR="#04366A" NOWRAP>');
	if(!IsCurrentDocument(url)) {
		document.writeln('<a href="');
		document.writeln(Top());
		document.writeln(url);
		document.writeln('">');
	}
	document.writeln('<font FACE="arial,helvetica" COLOR="#ffffff" size="2"><b>&nbsp;');
	document.writeln(prompt); 
	document.writeln('&nbsp;</b></font>');
	if(!IsCurrentDocument(url)) {
		document.writeln('</a>');
	}
	document.writeln('</td>');
}

function MapImageryHeader(title) {
document.writeln('<table WIDTH="100%" BORDER="0">');
document.writeln('  <tr VALIGN="MIDDLE">');
document.writeln('    <td BGCOLOR="#FFFFFF"><img src="');
document.writeln(Top());
	if (!StandAlone()) {
document.writeln('logo.jpg" alt="logo.jpg (14881 bytes)" width="150" height="50"');
	} else {
document.writeln('logo.jpg" alt="logo.jpg (14881 bytes)"');
	}
document.writeln('    </td>');
document.writeln('    <td HALIGN="RIGHT">');
document.writeln('<font FACE="impact,arial" size="+3" color="black">');
/* document.writeln(title); */
document.writeln("ECW for MapInfo Help");
document.writeln('</font">');
document.writeln('    </td>');
document.writeln('    <td WIDTH="1"></td>');
document.writeln('    <td align="right" valign="bottom"></td>');
document.writeln('  </tr>');
document.writeln('</table>');
document.writeln('</center></div><div align="center"><center>');
document.writeln('');
document.writeln('<table BORDER="0" BGCOLOR="#04366A" CELLPADDING="2" CELLSPACING="0" width="100%">');
document.writeln('  <tr>');
	if (!StandAlone()) {
	 HeaderEntry('MapImagery Help',  '../mapimageryhelp/index.htm');
	 HeaderEntry('MapImagery Professional Help',  '../prohelp/index.htm');
	 HeaderEntry('ECW for MapInfo Help',  '../ecwhelp/index.htm');
	 HeaderEntry('MapImagery Encryption Help',  '../miencryption/index.htm');
	}
document.writeln('    <td WIDTH="100%" BGCOLOR="#04366A">&nbsp; </td>');
document.writeln('  </tr>');
document.writeln('</table>');
}



function MapImageryFooter() {

	document.writeln('<hr WIDTH="100%" align="center">');
	document.writeln('<font FACE="arial,helvetica" size="-2" color="black">');
	document.writeln('<table WIDTH="100%">');
	document.writeln('<tr align="center" width="100%"><td align="center">');
	document.writeln('<font FACE="arial,helvetica" size="-2" color="black">');
	if (!StandAlone()) {
    	document.writeln('[ <a href="../mapimageryhelp/index.htm"><small>MapImagery Help</small></a>');
	document.writeln('|');
    	document.writeln('<a href="../prohelp/index.htm"><small>MapImagery Professional Help</small></a>');
	document.writeln('|');
    	document.writeln('<a href="../ecwhelp/index.htm"><small>ECW for MapInfo Help</small></a>');
	document.writeln('|');
    	document.writeln('<a href="../miencryption/index.htm"><small>MapImageryy Encryption Help</small></a> ] ');
	}
	document.writeln('</font>');
	document.writeln('<tr width="100%" align="center"> <td align="center">');
	document.writeln('<font FACE="arial,helvetica" size="-2" color="black">');
	document.writeln('Copyright © 2000-2007 MapImagery Limited</td></tr></font>');
	document.writeln('</font>');
	document.writeln('</table>');
 	MapImagerySideBoxEnd();

}



function MapImagerySideBoxStart(title) {
    document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="210">');
    document.writeln('  <tr>');
    document.writeln('    <td><img SRC="blank.gif" HEIGHT="1" WIDTH="1" ALT> </td>');
    document.writeln('  </tr>');
    document.writeln('  <tr bgcolor="#04366A">');
    document.writeln('    <td valign="top">&nbsp;<font size="2" color="white" face="arial,helvetica"><b>', title);
    document.writeln('    </b></font></td>');
    document.writeln('  </tr>');
    document.writeln('  <tr>');
}

function MapImagerySideBoxEnd() {
	document.writeln('<tr>');
	//document.writeln('<td><img SRC="blank.gif" HEIGHT="1" WIDTH="1" ALT> </td>');
	//document.writeln('</tr>');
	//document.writeln('    </div></td>');
	document.writeln('  </tr>');
	document.writeln('</table>');
}




function MapImageryEcw() {

	MapImagerySideBoxStart("ECW Help Contents");

	document.writeln('<tr>');
	document.writeln('<td>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="index.htm"><small>ECW for MapInfo Help</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwinstall.htm"><small>Installation and Configuration</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwlocal.htm"><small>Open Local ECW or JP2</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwremote.htm"><small>Open Remote ECW or JP2 images</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwregister.htm"><small>MapImagery registered .tab</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="transparency.htm"><small>Transparency Support in JP2 images</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwupdates.htm"><small>Obtaining Updates</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwbugs.htm"><small>Report Bugs and Obtain Support</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwchanges.htm"><small>Log of Changes between Versions</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="ecwfaq.htm"><small>Frequently asked Questions</small></a></td>');
  	document.writeln('</tr>');

	document.writeln('</small>');
	document.writeln('</tr>');
 	MapImagerySideBoxEnd();


}




function MapImageryWeb() {

	MapImagerySideBoxStart("MapImagery on the Web");

	document.writeln('<tr>');
	document.writeln('<td>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="http://www.mapimagery.com"><small>Home</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="http://www.mapimagery.com/mapimagery"><small>MapImagery</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="http://www.mapimagery.com/ecw"><small>ECW for MapInfo</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="http://www.mapimagery.com/Licensing2/customer.html"><small>Licensing</small></a></td>');
  	document.writeln('</tr>');
  	document.writeln('<tr>');
    	document.writeln('<td><a href="http://www.mapimagery.com/common/about.html"><small>About MapImagery Limited</small></a></td>');
  	document.writeln('</tr>');

	document.writeln('</small>');
	document.writeln('</tr>');
 	MapImagerySideBoxEnd();


}



function MapImageryAbout() {
    MapImagerySideBoxStart("About MapImagery Limited");

	document.writeln('		<td><font size="-1" face="arial,helvetica">');
	document.writeln('        The Mapping related interests of GID Australia');
	document.writeln('        have been spun off into a separate entity.&nbsp;'); 
	document.writeln('		GID Australia and MapImagery Limited will');
	document.writeln('        be working together on some projects.');
	document.writeln('        <a href="');
	document.writeln(Top());
	document.writeln('about.html"><font SIZE="-2" FACE="arial,helvetica">[More Info]</font></a></font>');
	document.writeln('		</td>');


	MapImagerySideBoxEnd();


}

function MapImageryContact() {
    MapImagerySideBoxStart("Contacting MapImagery");
    document.writeln('    <td><small>The best way to contact MapImagery is by email:</small><div align="left">');
    document.writeln('     <table border="0" cellpadding="0" cellspacing="0" width="100%">');
    document.writeln('      <tr>');
    document.writeln('        <td><a href="mailto:support@mapimagery.com"><small>support@mapimagery.com</small></a></td>');
    document.writeln('      </tr>');
    document.writeln('      <tr>');
    document.writeln('        <td><a href="mailto:info@mapimagery.com"><small>info@mapimagery.com</small></a></td>');
    document.writeln('      </tr>');
    document.writeln('      <tr>');
    document.writeln('        <td><a href="mailto:licencing@mapimagery.com"><small>licencing@mapimagery.com</small></a></td>');
    document.writeln('      </tr>');
    document.writeln('      <tr>');
    document.writeln('        <td><a href="mailto:sales@mapimagery.com"><small>sales@mapimagery.com</small></a></td>');
    document.writeln('      </tr>');
    document.writeln('      <tr>');
    document.writeln('        <td><a href="mailto:webmaster@mapimagery.com"><small>webmaster@mapimagery.com</small></a></td>');
    document.writeln('      </tr>');

    document.writeln('    </table>');
    document.writeln('    </div></td>');
    document.writeln('  </tr>');
    document.writeln('</table>');
	MapImagerySideBoxEnd();

}
