﻿
function $(id) {
	return document.getElementById(id);
}

function setBg(url) {
	$('inner').style.backgroundImage='url(' + url + ')';
}

function setMenu(main, sub) {
	if (null != main) $(main).style.fontStyle = 'italic';
	if (null != sub) {
		if (sub.length > 0) 
			$(sub).style.fontStyle = 'italic';
	} else
		$('submenu').style.display = 'none';
}

function jsAvailable(ticker) {
	$('location').style.display = 'none';
	if (ticker) {
		$('ticker').style.display = '';	
		updateTicker();
	}
}

function go(url){
    window.location=url;
}

var tick = [
	'<table onclick="go(\'http://pop3connector.kaedinger.de/\')"><tr><td width="5%"></td><td><img src="http://pop3connector.kaedinger.de/images/icon_65_transparent.png" height="52" /></td><td width="20px"></td><td>Small busniesses demand unique features.<br /><b>Pop3Connector.</b></td><td width="5%"></td></tr></table>', 
	'<table onclick="go(\'http://books.kaedinger.de/\')"><tr><td width="5%"></td><td><img src="http://books.kaedinger.de/lilatitle.png" height="52" /></td><td width="20px"></td><td>If you liked \'AlterVerwalter\'<br />you will love <strong>LiLA</strong>.<br />Here.</td><td width="5%"></td></tr></table>', 
	'<table onclick="go(\'http://kaedinger.de/download/widgets/\')"><tr><td><img src="http://kaedinger.de/img/blackandwhiteclock74.png" width="52" /><img src="http://kaedinger.de/img/loveandluck74.png" width="52" /><img src="http://kaedinger.de/img/Cartier74.png" width="52" /></td><td width="20px"></td><td>All the Symbian widgets.<br /><b>Here.</b></td></tr></table>', 
//	'<table onclick="go(\'http://kaedinger.de/download/tools/SpringDesigner/\')"><tr><td><img src="http://kaedinger.de/img/SpringDesigner60.png" width="52" height="52" /></td><td width="20px"></td><td>SpringDesigner.<br />An editor for Spring XML configuration files</td></tr></table>', 
	'<table onclick="go(\'http://kids.kaedinger.de/\')"><tr><td width="20%"></td><td><img src="http://kaedinger.de/img/feuersalamander.png" height="52" /></td><td width="20px"></td><td>Feuersalamander has been<br />updated to v2.5</td><td width="20%"></td></tr></table>'
];
var tt = -1;

function updateTicker() {
	if (++tt > tick.length - 1) tt = 0;
	$('ticker').innerHTML = tick[tt];
	setTimeout(updateTicker, 5000);
}

