//    To use this script, simply define the first or both variables below...

 var image = "../Images/badge.png"     // The path to & name of the image.
 var link  = "";                 //Link URL, if you want to link the image.



if( image == "../Images/badge.png" || image == "../Images/badge.png" ) {
	image = "../Images/badge.png";
	link  = "http://www.scac.co.uk";
}


document.write('<DIV ID="float_pane" STYLE="position:absolute;visibility:hidden">\n');
if( link != "" )
  document.write('<A HREF="' + link + '">');
document.write('<IMG SRC="' + image + '" BORDER="0">');
if( link != "" )
  document.write('</A>');
document.write('\n</DIV>');

  var start = 0;
  var oTop;
  var oLeft;
  var cHeight = 0;
  var cWidth = 0;
  function floatRefresh() {
      getValues();
      oLeft = float_pane.style.pixelLeft - (cWidth + document.body.scrollLeft - (  float_pane.offsetWidth + 3 ));
      oTop = float_pane.style.pixelTop - (cHeight + document.body.scrollTop - (  float_pane.offsetHeight + 3 ));
      if( oTop < 0)
        float_pane.style.pixelTop += 1 + (Math.round(Math.abs(float_pane.style.pixelTop - (cHeight + document.body.scrollTop - (  float_pane.offsetHeight ))) / 10));
      if(  oTop > 0 )
        float_pane.style.pixelTop -= 1 + (Math.round(Math.abs(float_pane.style.pixelTop - (cHeight + document.body.scrollTop - (  float_pane.offsetHeight))) / 10));
      if( oLeft < 0)
        float_pane.style.pixelLeft += 1 + (Math.round(Math.abs(float_pane.style.pixelLeft - (cWidth + document.body.scrollLeft - (  float_pane.offsetWidth ))) / 10));
      if(  oLeft > 0 )
        float_pane.style.pixelLeft -= 1 + (Math.round(Math.abs(float_pane.style.pixelLeft - (cWidth + document.body.scrollLeft - (  float_pane.offsetWidth ))) / 10));
  }
  function getValues() {
   		if( navigator.userAgent.indexOf("Safari") != -1 ) {
   			cHeight = document.clientHeight;
   			cWidth = document.clientWidth;
   			start = 1;
   		} else if( navigator.userAgent.indexOf("MSIE") != -1 ) {
   			cHeight = document.body.clientHeight;
   			cWidth = document.body.clientWidth;
   			start = 1;
   		}
   }
   
   getValues();
   if( cHeight && cWidth ) {
     float_pane.style.pixelLeft = (cWidth + document.body.scrollLeft - (  float_pane.offsetWidth + 3 ));
     float_pane.style.pixelTop  = (cHeight + document.body.scrollTop - (  float_pane.offsetHeight + 3 ));
     float_pane.style.visibility = "visible";
     setInterval("floatRefresh()",1);
   }
       