var GOrt='Dummy Harz';
UrlName = new Array();
UrlName[0]='logo';
UrlName[1]='htm';
var UrlAnteile=document.URL.split("/");
var UrlName=UrlAnteile[UrlAnteile.length-1].split(".");
var MapWin;
var NeuWin;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var xsize = screen.width;
var ysize = screen.height;
var win_x = 1;
var win_y = 1;
//if (ie4up) { win_x = document.body.clientWidth; }// ie 
//if (ns4up) { win_x = window.outerWidth; }// ns 
var breite=xsize*3/4; 
var hoehe=ysize*3/4;
var xpos=(xsize-breite)/1;
var ypos=(ysize-hoehe);
//alert('Fenster:'+win_x+' * '+breite+' px');

/*------------------ Strip+Replace-Tags Anfang ---------------------*/
function strip_tags (str, allowed_tags) {
    // Strips HTML and PHP tags from a string  
    // 
    // version: 908.406
    // discuss at: http://phpjs.org/functions/strip_tags
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Luke Godfrey
    // +      input by: Pul
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: Onno Marsman
    // +      input by: Alex
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: Marc Palau
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: Eric Nagel
    // +      input by: Bobby Drake
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: Tomasz Wesolowski
    // *     example 1: strip_tags('<p>Kevin</p> <br /><b>van</b> <i>Zonneveld</i>', '<i><b>');
    // *     returns 1: 'Kevin <b>van</b> <i>Zonneveld</i>'
    // *     example 2: strip_tags('<p>Kevin <img src="someimage.png" onmouseover="someFunction()">van <i>Zonneveld</i></p>', '<p>');
    // *     returns 2: '<p>Kevin van Zonneveld</p>'
    // *     example 3: strip_tags("<a href='http://kevin.vanzonneveld.net'>Kevin van Zonneveld</a>", "<a>");
    // *     returns 3: '<a href='http://kevin.vanzonneveld.net'>Kevin van Zonneveld</a>'
    // *     example 4: strip_tags('1 < 5 5 > 1');
    // *     returns 4: '1 < 5 5 > 1'
    var key = '', allowed = false;
    var matches = [];
    var allowed_array = [];
    var allowed_tag = '';
    var i = 0;
    var k = '';
    var html = '';

    var replacer = function (search, replace, str) {
        return str.split(search).join(replace);
    };

    // Build allowes tags associative array
    if (allowed_tags) {
        allowed_array = allowed_tags.match(/([a-zA-Z0-9]+)/gi);
    }

    str += '';

    // Match tags
    matches = str.match(/(<\/?[\S][^>]*>)/gi);

    // Go through all HTML tags
    for (key in matches) {
        if (isNaN(key)) {
            // IE7 Hack
            continue;
        }

        // Save HTML tag
        html = matches[key].toString();

        // Is tag not in allowed list? Remove from str!
        allowed = false;

        // Go through all allowed tags
        for (k in allowed_array) {
            // Init
            allowed_tag = allowed_array[k];
            i = -1;

            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+'>');}
            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+' ');}
            if (i != 0) { i = html.toLowerCase().indexOf('</'+allowed_tag)   ;}

            // Determine
            if (i == 0) {
                allowed = true;
                break;
            }
        }

        if (!allowed) {
            str = replacer(html, "", str); // Custom replace. No regexing
        }
    }

    return str;
}		//	strip_tags
//----------------------------------------------
function FjsLiesWetter(DivStr)
{
	 var TDivStr = [];
//	alert(DivStr);
	Pos=DivStr.toLowerCase().indexOf('<table');
	DivStr=DivStr.substring(Pos);
//	alert(Pos+' , '+DivStr);
	DivStr=DivStr.split('Vorhersage für ').join(' ');
//	alert(Pos+' , '+DivStr);
	Pos=DivStr.toLowerCase().indexOf('</td>');
	DivStr=DivStr.split('</td>').join('$$');
	DivStr=DivStr.split('<br>').join('$$');
	DivStr=DivStr.split('</TD>').join('$$');
	DivStr=DivStr.split('<BR>').join('$$');
//	alert(DivStr);
	DivStr=strip_tags(DivStr,'');
//	alert(DivStr);
	TDivStr=DivStr.split('$$');
	// for (i=0; i<TDivStr.length; i++)
//	 for (i=0; i<=9; i++)	{alert(i+' , '+TDivStr[i])}
	DivStr='<tr><td style="text-align:left;">'+TDivStr[1].split(',').join('</td><td style="text-align:left;">')+
			'</td><td>'+TDivStr[3]+'</td><td style="text-align:right;">'+TDivStr[5]+'</td><td style="text-align:right;">'+TDivStr[7]+
			'</td><td style="text-align:right;">'+TDivStr[9].split('km/h').join('km/h</td><td style="text-align:left;">')+'</td><td></td></tr>';
	return DivStr;
}		// 	FjsLiesWetter(DivStr)



/*------------------ Strip+Replace-Tags Ende ---------------------*/

/*-----------------  Google Map -------------------------*/

function FnkMapFenster(POrt) 
{
var Map='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.de/maps?f=q&amp;hl=de&amp;geocode=&amp;time=&amp;date=&amp;ttype=&amp;q='+POrt+',+Germany&amp;ie=UTF8&amp;om=1&amp;s=AARTsJo_xUWlqLRGeA9ptFm0_8QDel8MFA&amp;ll=&amp;spn=&amp;z=11&amp;iwloc=addr&amp;output=embed"></iframe><br />';
if (typeof MapWin == 'undefined'){;}
else { MapWin.close();}
//if (MapWin) { MapWin.close();}
//wstat=window.open("schaumal.htm","LinkSeite","scrollbars=yes,status=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,menubar=yes,width="+breite+",height="+hoehe+",screenX="+xpos+",screenY="+ypos+",top="+ypos+",left="+xpos)
//wstat=window.open("./mapseite.htm?f=q&amp;Ort=Goslar%22","MapSeite",'width=500,height=400,toolbar=no');
MapWin=window.open("http://maps.google.de/maps?q="+POrt+",+Germany&sa=X&oi=map&ct=title","MapSeite","scrollbars=yes,status=no,toolbar=no,location=no,directories=no,resizable=yes,menubar=no,width="+breite+",height="+hoehe+",screenX="+xpos+",screenY="+ypos+",top="+ypos+",left="+xpos);
//wstat.document.write(Map);
MapWin.focus();
}


function FnkDLMapFenster(URL) 
{
//var Map='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=URL></iframe><br />';
if (typeof MapWin == 'undefined'){;}
else { MapWin.close();}
//if (MapWin) { MapWin.close();}
//wstat=window.open("schaumal.htm","LinkSeite","scrollbars=yes,status=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,menubar=yes,width="+breite+",height="+hoehe+",screenX="+xpos+",screenY="+ypos+",top="+ypos+",left="+xpos)
//wstat=window.open("./mapseite.htm?f=q&amp;Ort=Goslar%22","MapSeite",'width=500,height=400,toolbar=no');
MapWin=window.open(URL,"MapSeite","scrollbars=yes,status=no,toolbar=no,location=no,directories=no,resizable=yes,menubar=no,width="+breite+",height="+hoehe+",screenX="+xpos+",screenY="+ypos+",top="+ypos+",left="+xpos);
//wstat.document.write(Map);
MapWin.focus();
}

/*-----------------------  Neues Unterfenster öffnen --------------*/

function FnkNeuesFenster(PDatei) 
{
if (PDatei=='#') {return false;}
if (typeof NeuWin == 'undefined'){;}
else { NeuWin.close();}
//if (NeuWin) { NeuWin.close();}
NeuWin=window.open(PDatei,"123","scrollbars=yes,status=no,toolbar=no,location=no,directories=no,resizable=yes,menubar=no,width="+breite+",height="+hoehe+",screenX="+xpos+",screenY="+ypos+",top="+ypos+",left="+xpos);
//NeuWin=window.open(PDatei,"123");
NeuWin.focus();
}					// function FnkNeuesFenster

function FnkDivPopUp(Code)
{
var V_DivPopUp=document.getElementById("DivPopUp");
	V_DivPopUp.style.visibility = "visible";
	Code="<div onClick='document.getElementById(\"DivPopUp\").style.visibility = \"hidden\";'>Fenster schliessen.</div>"+Code+"<br><div onClick='document.getElementById(\"DivPopUp\").style.visibility = \"hidden\";'>Fenster schliessen.</div>";
	V_DivPopUp.innerHTML = Code;
	if (V_DivPopUp.getElementsByTagName("img")[0]) 
		{
			 V_DivPopUp.style.left = screen.width/2-V_DivPopUp.getElementsByTagName("img")[0].width/2; V_DivPopUp.style.top=260;
		}
}			// FnkDivPopUp(Code)

//-------------  vertikales Menue  nach oben  Anfang --------------------
function ScrollMenuV(i)
{
	var thepoint = document.getElementById('IdMenuPM' + i.toString() ).offsetTop;
	document.getElementById('MenueVInner').scrollTop = thepoint;
}	// function ScrollMenuH(i)



//--------  document dlclick Anfang ---------->
//don't forget to add <body ondblclick="dictionary()">

function dictionary() 
{
	if (navigator.appName!='Microsoft Internet Explorer') 
	{
		var t = document.getSelection();
		od(t);
	}
	else 
	{
		var t = document.selection.createRange();
		if(document.selection.type == 'Text' && t.text>'') 
		{
			document.selection.empty();
			od(t.text);
		}
   }

function od(t) 
{
	t=t.replace(/[!.:?,;"]/, '');
	while (t.substr(t.length-1,1)==' ') {t=t.substr(0,t.length-1);}
	while (t.substr(0,1)==' ') 			{t=t.substr(1);}
	if (t) window.open('http://www.fewo-9.de/'+escape(t), 'dict', 'width=700,height=500,resizable=1,menubar=1,scrollbars=1,status=1,titlebar=1,toolbar=1,location=1,personalbar=1');
}   

};

status='double-click any word - get its instant definition in the dictionary.';

//document.ondblclick=dictionary; //works for IE only. For other browsers add <body ondblclick="dictionary()">

//--------  document dlclick Anfang ---------->






/*-----------------  Teile des vertikales Menü ein- und ausblenden -------------------------*/

function changeMenuFMGS(id)
{
	Code1='IdMenu'+id;
	Code2='IdMenuPM'+id;
	objDaughter1=document.getElementById(Code1);
	objDaughter2=document.getElementById(Code2);
//	objDaughter2=document.getElementById(Code2);
/*	if (objDaughter1.style.display!='none')		
	{
		objDaughter1.style.display='none'; 
		objDaughter2.innerHTML = '<img src="./bilder/symb_folderclose.gif" align="absmiddle"  /> ';
//		objDaughter2.innerHTML = '&gt;';
	}
	else 
	{
		objDaughter1.style.display='block';  
//		objDaughter2.innerHTML = '&lt; ';
		objDaughter2.innerHTML = '<img src="./bilder/symb_folderopen.gif" align="absmiddle"  /> ';
	} 
*/	
	if (objDaughter1.style.display!='block')		
	{
		objDaughter1.style.display='block';  
//		objDaughter2.innerHTML = '&lt; ';
		objDaughter2.innerHTML = '<img src="./bilder/symb_folderopen.gif" align="absmiddle"  /> ';
	}
	else 
	{
		objDaughter1.style.display='none'; 
		objDaughter2.innerHTML = '<img src="./bilder/symb_folderclose.gif" align="absmiddle"  /> ';
//		objDaughter2.innerHTML = '&gt;';
	} 
}		// changeMenuFMGS(id)


/*----------  Suckerfish Anfang ----  http://www.htmldog.com/articles/suckerfish/dropdowns/example/#  -----*/
/* 
" sfHover=function()" 
ist nicht nötig wenn HTM-Datei mit 
" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> " 
startet.
*/

<!--//--><![CDATA[//><!--



sfHover = function() {
	var sfEls = document.getElementById("sfnav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

/*----------  Suckerfish Ende ----  http://www.htmldog.com/articles/suckerfish/dropdowns/example/#  -----*/

