// HTML Entry before </body> tag: <script type="text/javascript" src="scripts/scripts/floatmenu.js"></script>

if (!document.layers){
document.write('<div id="divFloatMenu" style="position:absolute">');
document.write('<layer id="Floater">');

// START THE IMAGE LINKS COPY ANY ONE OF THESE 3 LINES TO ADD A NEW LINK

document.write('<a href="#header"><img src="images/float_menu/float-arrowup.gif" border="0" vspace="1"></a><br>');
document.write('<a href="home.html"><img src="images/float_menu/float-home.gif" border="0" vspace="1"></a><br>');
document.write('<a href="map.html"><img src="images/float_menu/float-map.gif" border="0" vspace="1"></a><br>');
document.write('<a href="contact.php"><img src="images/float_menu/float-contact.gif" border="0" vspace="1"></a><br>');
document.write('<a href="#footer"><img src="images/float_menu/float-arrowdown.gif" border="0" vspace="1"></a><br>');

document.write('</layer>');
}

if (!document.layers){
document.write('</div>');
}

/*
Floating Menu script- Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/

//Enter "frombottom" or "fromtop"
var verticalpos="frombottom"


function JSFX_FloatTopDiv()
{
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
var startX = 0, 	// Increase value for padding from edge of screen
startY = 270; 		// Increase value to move up; Decrease value to move down.
var PX='px', d = document;
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers){el.style=el,PX='';}
el.sP=function(x,y){el.style.right=x+PX;el.style.top=y+PX;}; 	// Enter style.right for right floating menu or style.left for left floating menu
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = window.innerHeight ? pageYOffset + window.innerHeight : ietruebody().scrollTop + ietruebody().clientHeight;
el.y -= startY;
}
return el;
}
window.FloatMenu=function()
{
if (verticalpos=="fromtop"){
var pY = window.innerHeight ? pageYOffset : ietruebody().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = window.innerHeight ? pageYOffset + window.innerHeight : ietruebody().scrollTop + ietruebody().clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("FloatMenu()", 10);
}
ftlObj = ml("divFloatMenu");
FloatMenu();
}
JSFX_FloatTopDiv();

/****************************************** Functions ****************************************/

function openit(sUrl){
newwindow=window.open(sUrl,'newwin','toolbar=no,menubar=no,left=5');
}

function mm_preloadImages() {
  var d=document; if(d.images){ if(!d.mm_p) d.mm_p=new Array();
    var i,j=d.mm_p.length,a=mm_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.mm_p[j]=new Image; d.mm_p[j++].src=a[i];}}
}
