var gright=170
var gbottom=40
//Browsercheck
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
function makeObj(obj,nest)
{
nest=(!nest) ? '':'document.'+nest+'.'
   	this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')							
	this.moveIt=b_moveIt;
}
function b_moveIt(x,y)
{
	if(ie){
	this.x=x; this.y=y
   	this.css.left=this.x
	this.css.top=this.y
}	
}
var pageWidth,pageHeight
function geoInit()
{

	oTest=new makeObj('clock')
	pageWidth=(ie)?document.body.offsetWidth-4:innerWidth;
	pageHeight=(ie)?document.body.offsetHeight-2:innerHeight;
    checkIt();
    onresize=resized;
	if(ie) window.onscroll=checkIt;
showTime();
}
function checkIt()
{
	if(ie) oTest.moveIt(document.body.scrollLeft +pageWidth-gright,document.body.scrollTop+pageHeight-gbottom)
	

}





//Adds a onresize event handler to handle the resizing of the window.
function resized()
{
	pageWidth=(ie)?document.body.offsetWidth-4:innerWidth;
	pageHeight=(ie)?document.body.offsetHeight-2:innerHeight;
	if(ie) checkIt()
}


function showTime()
{

dayTwo = new Date();
hrNow = dayTwo.getHours();
mnNow = dayTwo.getMinutes();	
scNow = dayTwo.getSeconds();
miNow = dayTwo.getTime();
if (hrNow == 0) 
	{
	hour = 0;
	ap = " AM";
	}

else if(hrNow <= 11) 
	{
	ap = " AM";
	hour = hrNow;
	} 

else if(hrNow == 12) 
	{
	ap = " PM";
	hour = 12;
	} 

else if (hrNow >= 13) 
	{
	hour = (hrNow - 12);
	ap = " PM";
	}

if (hrNow >= 13) 
	{
	hour = hrNow - 12;
	}

if (mnNow <= 9) 
	{
	min = "0" + mnNow;
	}

else (min = mnNow)
if (scNow <= 9) 
{
secs = "0" + scNow;
} 

else 
{
secs = scNow;
}
time = hour + ":" + min + ":" + secs + ap;


if(document.all)
	{
	document.all.clock.innerHTML=time;
	}


setTimeout('showTime()', 1000);

}