/*  Fkt_Window.js - v1.0 (02/2009)
 *  ============================= 
 *  copyright (c) 2009 by Rainer Krüger
 */


	var Wnd=null;
	function Fkt_Windowsmall(file,window) {
	
		var h=515;//1230;
		var b=592;//448;583
		var x=(Fkt_FW()-b)/2;

		Wnd=Fkt_WindowPopupOpenS(file,window,h,b,x,0); // H,B,X,Y
		//if (window.focus) {Wnd.focus()}

		return false;
	}
	function Fkt_Window(file,window) {
	
		var h=800;//1230;
		var b=583;//448;
		var x=(Fkt_FW()-b)/2;

		Wnd=Fkt_WindowPopupOpenS(file,window,h,b,x,0); // H,B,X,Y
		//if (window.focus) {Wnd.focus()}

		return false;
	}

	function Fkt_WindowPrint(file,window) {
	
		var h=800;
		var b=525;
		var x=(Fkt_FW()-b)/2;

		Wnd=Fkt_WindowPopupOpenS(file,window,h,b,x,0); // H,B,X,Y
		//if (window.focus) {Wnd.focus()}

		return false;
	}	
	function Fkt_WindowPopupOpenS(Datei,Name,H,B,X,Y){

		var browser=navigator.appName;
		if ((browser=="Microsoft Internet Explorer"))	{
			if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
				var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
			}
			wnd=window.open(Datei,Name,'width='+B+',height='+H+',screenX='+X+',screenY='+Y+',resizeable=yes,directories=no,personalbar=no,toolbar=no,menubar=no,scrollbars=yes,status=no,location=no,left='+X+',top='+Y+'');
			//if((ieversion>=7))  {
				if(window.focus) {wnd.focus();}	
			//}
  	}
  	else	{  //browser=="Netscape"
			H+=1000;
			wnd=window.open(Datei,Name,'width='+B+',height='+H+',screenX='+X+',screenY='+Y+',scrollbars=yes,resizeable=yes,directories=0,personalbar=0,toolbar=0,menubar=0,status=0,location=0,left='+X+',top='+Y+'');
			if (window.focus) {wnd.focus();}
  	}

		return wnd;

	}	// end function

	function Fkt_FW()	{

		if(window.innerWidth)	{
			return window.innerWidth;
		}
		else 	{
			if(document.body && document.body.offsetWidth)	{
				return document.body.offsetWidth;
			}
			else
				return 1024;
		}
	}


	function Fkt_WindowPopupOpenS1(Datei,Name,H,B,X,Y){

/*
		var ref, bildschirmbreite, bildschirmhoehe, top, left, url, title;		
		bildschirmbreite=screen.width;
		bildschirmhoehe=screen.height;
		left=(bildschirmbreite-B)/2;
		top=(bildschirmhoehe-H)/2;
		pop=window.open(Datei,Name,"fullscreen=1, scrolling=no");
		pop.resizeTo(B,H);
		pop.moveTo(left,100);
		pop.focus();		
var title="eee";
var frameString=""+ 

"<html><head><title>"+title+"</title></head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+ 
"<frame name='top' src='"+Datei+"' scrolling=no>"+ 
"<frame name='bottom' src='about:blank' scrolling='no'>"+ 
"</frameset>"+ "<body onclick='alert();'>TEST</body></html>"
pop.document.open();
pop.document.write(frameString);
pop.document.close();
*/

	}	// end function

	function Fkt_Window1(file,name) {	
	
		var popUpSizeX=700;
		var popUpSizeY=500;

	
		var popUpLocationX=50;
		var popUpLocationY=50;

		var popUpURL="http://temp.stadtwerke-schwedt.de/sws/werbung/werbung1.php";

		splashWin = window.open("",'x','fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0');

	splashWin.blur();
	window.focus();

	splashWin.resizeTo(popUpSizeX,popUpSizeY);
	splashWin.moveTo(popUpLocationX,popUpLocationY);
	splashWin.location=popUpURL;
	splashWin.focus();

}

function fkt_map(art, info, nr,pos, posx) {	
	//var sz = eval(info);  
	//alert("info=" & info);   

	if(art==0)	{ // mouseover
		//document.getElementById("InfoBlock").style.border = "1px solid #030303";
		document.getElementById("Info").style.marginTop = pos+20+"px";
		document.getElementById("Info").style.marginLeft = posx+20 +"px";
		//document.getElementById("InfoBlock0").innerHTML = "<strong><i><b class=\"font134gn\">"+nr+"</b></i></strong>";
		document.getElementById("InfoBlock").innerHTML = info;
		document.getElementById("Info").style.visibility = "visible";
	}
	else{
		//document.getElementById("InfoBlock").style.border = "0px solid #030303";
		document.getElementById("Info").style.marginTop = "0px";
		document.getElementById("InfoBlock").innerHTML = "Erläuterungen";
		document.getElementById("Info").style.visibility = "hidden";
	}
	
}	
function changeClass(elem, className1,className2)
{
    elem.className = (elem.className == className1)?className2:className1;
}
