var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}

// use:
// <a href="link" title="title" target="popUpWin" onclick="popUpWin(this.href,'console',640,480);return false;">link</a>
function popUpWin(url, type, strWidth, strHeight)
{
	closeWin();
	
	if (type == "fullScreen"){
		strWidth = screen.availWidth - 10;
		strHeight = screen.availHeight - 160;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
	if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=100,top=100";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}

function vis(layID) {
	var who = document.getElementById(layID);
	if (who.style.display=="none") {who.style.display="";} else {who.style.display="none";}
}

function over(image){
	ti = new Array();
	ti['b0'] = '/tpl/img/wintergarten.jpg';
	ti['b1'] = '/tpl/img/einzelzimmer.jpg';
	ti['b2'] = '/tpl/img/doppelzimmer_neu.jpg';
	ti['b3'] = '/tpl/img/tresen.jpg';
	ti['b4'] = '/tpl/img/garten.jpg';
	ti['b5'] = '/tpl/img/terasse.jpg';
	ti['b6'] = '/tpl/img/restaurant.jpg';
	ti['b7'] = '/tpl/img/rathaus.jpg';
	ti['b8'] = '/tpl/img/alter-markt.jpg';
	ti['b9'] = '/tpl/img/theater.jpg';
	ti['b10'] = '/tpl/img/hafen.jpg';
	ti['b11'] = '/tpl/img/gorch-fock.jpg';
	ti['b12'] = '/tpl/img/nikolaikirche.jpg';
	ti['b13'] = '/tpl/img/kueche.jpg';
	ti['b15'] = '/tpl/img/kamin.jpg';
	ti['b14'] = '/tpl/img/bad.jpg';
	ti['b16'] = '/tpl/img/schlafbereich.jpg';
	var im = document.getElementById('tbild');
	im.src = ti[image];
}
function out(){ 
var im = document.getElementById('tbild');
im.src = "/tpl/img/blank.gif";
//document.aa.src ="/tpl/img/blank.gif";
}