﻿function show5(){
if (!document.layers&&!document.all&&!document.getElementById)
return

 var Digital=new Date()
 var hours=Digital.getHours()
 var minutes=Digital.getMinutes()
 var seconds=Digital.getSeconds()

var dn="PM"
if (hours<12)
dn="AM"
if (hours>12)
hours=hours-12
if (hours==0)
hours=12

 if (minutes<=9)
 minutes="0"+minutes
 if (seconds<=9)
 seconds="0"+seconds
//change font size here to your desire
myclock="<font face='Arial' >"+hours+":"+minutes+":"
 +seconds+" "+dn+"</font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
else if (document.getElementById)
document.getElementById("liveclock").innerHTML=myclock
setTimeout("show5()",1000)
 }


window.onload=show5
 //-->



<!--
/* Stack up window.onload events using this function from Simon Willison - http://www.sitepoint.com/blog-post-view.php?id=171578 */
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function destroycatfish()
{
   var catfish = document.getElementById('catfish');
   document.body.removeChild(catfish); /* clip catfish off the tree */
   document.getElementsByTagName('html')[0].style.padding= '0'; /* reset the padding at the bottom */
   return false;
}
function closeme()
{
   var closelink = document.getElementById('closeme');
   closelink.onclick = destroycatfish;

}
addLoadEvent(function() {
   closeme();
});
-->

















// Deploy the Catfish

// The Catfish should be located in an element of id 'catfish' and should be hidden
// out of view

var catfish;

function deploycatfish()
// initializing
{
	catfish = document.getElementById('catfish');
	
	catfishheight = 120; // total height of catfish in pixels
	catfishoverlap = 0; // height of the 'overlap' portion only (semi-transparent)
	catfishtimeout = setTimeout(startcatfish, 2000);
}

function startcatfish()
// starts the catfish sliding up
{
	catfishposition = 0; // catfishposition is expressed in percentage points (out of 100)
	catfishtimeout = setInterval(positioncatfish, 25);
}

function positioncatfish()
{
	catfishposition += 10;
	catfish.style.marginBottom = '-' + (((100 - catfishposition) / 100) * catfishheight) + 'px';
	if (catfishposition >= 100)
	{
		clearTimeout(catfishtimeout);
		catfishtimeout = setTimeout(finishcatfish, 1);
	}
}

function finishcatfish()
{
	catfish.style.marginBottom = '0';	
	// jump the bottom of the document to give room for the catfish when scrolled right down
	document.body.parentNode.style.paddingBottom = (catfishheight - catfishoverlap) +'px';
	
	// here you could use AJAX (or similar) to log the popup hit for tracking purposes	
}

addLoadEvent(deploycatfish);
