function lib_bwcheck() { 
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
this.ns=this.ns6||this.ns4
this.ah=screen.availHeight;
this.aw=screen.availWidth;
this.cd=screen.colorDepth;
this.h=screen.height;
this.w=screen.width;
this.pd=screen.pixelDepth;
this.i="param?"+this.ver+"?"+this.agent+"?"+this.dom+"?"+this.opera5+"?"+this.ie5+"?"+this.ie6+"?";
this.i+=this.ie4+"?"+this.ie+"?"+this.mac+"?"+this.ns6+"?"+this.ns4+"?"+this.bw+"?"+this.ns+"?";
this.i+=this.ah+"?"+this.aw+"?"+this.cd+"?"+this.h+"?"+this.w+"?"+this.pd+"?END";
return this
}
var bw=new lib_bwcheck()
function getStylesBack() {
	if (bw.ns4) window.location.reload
}
function init() {
	var my_str = "<img src=\"/media/blind.gif?"+bw.i+" width=\"0\" height=\"0\">";
	document.write(my_str);
}
function openPopup (pfad,name,x,y,pos_x,pos_y,view_time) {
    if (pos_x == -1 && pos_y == -1) {
		var X=(Math.ceil((screen.availWidth-x)/2));
		var Y=(Math.ceil((screen.availHeight-y)/2));
    }
	else
    {
		var X=pos_x;
		var Y=pos_y;
	}
	var p = "dependent=no,height="+y+",width="+x+",locationbar=no,menubar=0,toolbar=0,resizable=no,toolbar=no,scrollbars=no,status=no,top="+Y+",left="+X;
	var fenster = window.open(pfad,name,p);
 	fenster.focus();
	if (view_time) {
		fenster.setTimeout("close()",view_time);
	}
}
function openLivecam () {
	openPopup("http://www.nuernberger.de/t/lt.php?http://livecam.odn.de/nv/lc.cgi?ve=.nv-start","Livecam_wird_geladen_bitte_warten",650,435,0,0,0);
}
// generate mailto link
function generateMto(a,f,h) {
	var d = "lto:";
	var c = "mai";
	var e = String.fromCharCode(64);
	document.write("<a href='http://www.nuernberger.de/t/lt.php?"+c+d+a+e+f+"' class=\"cont\">"+h+"</a>");
}
// generate mailto linkwith subj  param
function generateMtoS(a,f,h,s) {
        var d = "lto:";
        var c = "mai";
        var e = String.fromCharCode(64);
        s=encodeURI(s);
        document.write("<a href='http://www.nuernberger.de/t/lt.php?"+c+d+a+e+f+"?subject="+s+"' class=\"cont\">"+h+"</a>");
}

