
// --- netscape resize bugfix
if (document.layers) {
	widthCheck = window.innerWidth;
	heightCheck = window.innerHeight;
	window.onResize = resizeFix;
}

function resizeFix() {
	if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
		document.location.href = document.location.href;
}

// data


function formatTime(date) {
	hr = date.getHours(); 
	mn = date.getMinutes(); 
	sc = date.getSeconds(); 
	if (hr < 10) hr = "0" + hr;	if (mn < 10) mn = "0" + mn;	if (sc < 10) sc = "0" + sc;
	str = hr + ":" + mn + ":" + sc;
	return str;
}

function formatDate2(date) {
	year = date.getYear();
	if (year < 200) year+=1900;
	day = date.getDay();
	month = date.getMonth() + 1;
	monthd = date.getDate();
	if (month < 10) month = "0" + month; 
	if (monthd < 10) monthd = "0" + monthd;
	return (monthd + "." + month + "." + year);
}

date = new Date();
function runClock() {
	now = (new Date()).getTime();

	// host time
	hostDate.setTime(now - hostTimeDelta);
	if (document.all) document.all["date"].innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="150" class="hdbtm"><tr><td width="150" class="date"  id="txtnews">'+formatTime(hostDate)+', '+formatDate2(hostDate)+'</td></tr></table>';
	else {
		var lyr=document.layers["date"];
			lyr.document.open()
			lyr.document.write('<table cellpadding="0" cellspacing="0" border="0" width="150" class="hdbtm"><tr><td width="150" class="date"  id="txtnews">'+formatTime(hostDate)+', '+formatDate2(hostDate)+'</td></tr></table>')
			lyr.document.close()
		
	}
	setTimeout("runClock()", 1000);
	
}



function encodePL(text, encoding){
	return text;
}

function initMain(){
	hostTimeDelta = (new Date()).getTime() - hostTime;
	hostDate = new Date();
	
	// disable with 2. level cache
	// runClock();
}

function testChar(){
	var _testChar="�"
	return _testChar==testchar
}