function toggleLayer(whichLayer) {
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}

function openTarget (form, features, windowName) {
		if (!windowName)
		windowName = 'formTarget';
		form.target = windowName;
	open (form, windowName, features);
	}
	function makeEmail(name,domain,link) {
		if (link=='')
			document.write('<a href=mailto:'+name+'@'+domain+'>'+name+'@'+domain+'</a>');
	 	else 
			document.write('<a href=mailto:'+name+'@'+domain+'>'+link+'</a>');
	}
var bookmarkurl="http://www.virtualnigrad.com"
var bookmarktitle="VirtualniGrad |"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
                var firstfenster = true;
                function GrossBild(Bildseite,Breite,Hoehe) {
                  fenster = window.open (Bildseite, "Bildseite","Width="+Breite+",Height="+Hoehe+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
                  firstfenster = false;
                }
                function fensterzu() {
                  if (! firstfenster) {
                    if (fenster.closed == false) fenster.close();
                  }
                }

function popUp(strURL,strType,strHeight,strWidth) {
	var strOptions="";
	if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	window.open(strURL, 'newWin', strOptions);
}
