var ns4 = (document.layers) ? true : false
var ie4 = (document.all && !document.getElementById) ? true : false
var ie5 = (document.all && document.getElementById) ? true : false
var ns6 = (!document.all && document.getElementById) ? true : false

function show(obj) {
	hideAll()
	aryObj = obj.split(',')
	for (i=0;i<aryObj.length;i++) {
		aryObj[i] = aryObj[i].replace(' ', '')
		if (ie4 || ie5) document.all[aryObj[i]].style.visibility = 'visible'
		if (ns4) document.layers[aryObj[i]].visibility = 'visible'
		if (ns6) document.getElementById(aryObj[i]).style.visibility = "visible"
	}
}

function hide(obj) {
	if (ie4 || ie5) document.all[obj].style.visibility = 'hidden'
	if (ns4) document.layers[obj].visibility = 'hidden'
	if (ns6) document.getElementById(obj).style.visibility = "hidden"
}

function hideAll() {
	if (ie4) {
		for (i=0;i<document.all.length;i++) {
			if (document.all[i].id) {
				hide(i)
			}
		}
	}

	if (ns6 || ie5) {
		col = document.getElementsByTagName('DIV');
          	for (i=0;i<col.length;i++) {
	  		id = col[i].getAttribute('id') ;			
			if (id) {
				hide(id)
			}
		}
	}
}

function gotoPage(page) {
	window.location=page
}

function newWindow(url, titel) {
	windowprops = "width=800,height=600,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes";
	newWin = window.open(url, titel, windowprops)
	newWin.focus()
}


function aluege(img) {
	foto1 = new Image()
	foto1.src = (img)
	aluegeCheck(img)
}

function aluegeCheck(img) {
  if ((foto1.width != 0) && (foto1.height != 0)) {
	w = foto1.width + 20
	h = foto1.height + 20
	window.open(img,"","width=" + w + ",height=" + h)
  }
  else {
    f = "aluegeCheck('" + img + "')"
    i = setTimeout(f, 20)
  }
}
