
function change_content(a)
{
	url = a.href.replace(/http.*index.php\?inc=/, '')
	document.getElementById('s1').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s2').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s3').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s4').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s5').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s6').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s7').style.backgroundImage = 'url(img/normal.jpg)';
	document.getElementById('s8').style.backgroundImage = 'url(img/normal.jpg)';


	document.getElementById('s1').className = '';
	document.getElementById('s2').className = '';
	document.getElementById('s3').className = '';
	document.getElementById('s4').className = '';
	document.getElementById('s5').className = '';
	document.getElementById('s6').className = '';
	document.getElementById('s7').className = '';
	document.getElementById('s8').className = '';


	a.style.backgroundImage = 'url(img/hover.jpg)';
	a.className = 'aktiv'
	update_content(url);
}

function show_bg(a)
{
	a.style.backgroundImage = 'url(img/hover.jpg)';
	a.style.textDecoration = 'underline';
}

function hide_bg(a)
{
	if (a.className != 'aktiv') a.style.backgroundImage = 'url(img/normal.jpg)';
	a.style.textDecoration = 'none';
}

function createRequestObject()
{
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		ro = new XMLHttpRequest();
	}
	return ro;
}

var http = createRequestObject();

function update_content(content) {
	http.open('get', content);
	http.onreadystatechange = handleResponse;
	http.send(null);
}

function handleResponse() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('content').innerHTML = response;
    }
}





function openWindow(url,name,window_width,window_height,window_top,window_left,scroll,resize)
{
var displayWindow = "";

if (name == null)
	{name = "quokawindow";}
if (window_width == null)
	{window_width = 150;}
if (window_height == null)
	{window_height = 100;}
if (window_top == null)
	{window_top = 0;}
if (window_left == null)
	{window_left = 0;}
if (scroll == null)
	{scroll = "no";}
if (resize == null)
	{resize = "no";}

if ((window_top==0) && (window_left==0))	//	center window
	{
	if (navigator.appVersion.substring(0,1)>'3')
		{
		window_top 		= ((screen.availHeight-window_height)/2);
		window_left 	= (screen.availWidth-window_width)/2;
		}
	else
		{
		window_width	+= 20;
		window_height	+= 40;
		window_top 		= ((600-window_height)/2)-20;
		window_left 	= (800-window_width)/2;
		}
	}

displayWindow = document.open(url, name, 'resizable=' + resize + ',menubar=no,scrollbars=' + scroll + ',status=no,directories=no,width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left);
displayWindow.focus();
return displayWindow;
}
