function timeNow()
{
	seconds = seconds + 1;
	
	if (seconds > 59)
	{
		seconds = seconds - 60;
		minutes = minutes + 1;

		if (minutes > 59)
		{
			callServer('newtime.asp','oldtime');
		}
	}

	if (hours>11)
	{
		ampm='PM';
	}

	if (hours>12)
	{
		showhours=hours-12;
	}
	else if(hours==0)
	{
		showhours=12;
	}
	else
	{
		showhours=hours;
	}

	timeStr = thedate + ', ' + showhours;
	timeStr  += ((minutes < 10) ? ":0" : ":") + minutes;
	timeStr  += ((seconds < 10) ? ":0" : ":") + seconds + ' ' + ampm;

	if (document.layers)
	{
		document.clock.document.write(timeStr);
		document.clock.document.close();
	}
	else
	{
		document.getElementById('clock').innerHTML = timeStr;
	}
}

//setInterval("timeNow()", 995)


function changeHeight(x)
{
    document.getElementById(x).height = 100;
	var frameHeight = (document.getElementById(x).contentWindow.document.body.scrollHeight + 20);
	
	if (frameHeight < 400)
	{
		frameHeight = 400;
	}
  	document.getElementById(x).height = frameHeight;
	document.getElementById(x).scrolling = "no";
}

			
function callServer(thescript,theold)
{
	var head = document.getElementsByTagName('head').item(0);
	var old  = document.getElementById(theold);
	if (old) head.removeChild(old);
	script = document.createElement('script');
	script.src = thescript;
	script.type = 'text/javascript';
	script.defer = true;
	script.id = theold;
	void(head.appendChild(script));
}
