/*
var appver=navigator.appVersion;
if (appver.indexOf('MSIE') > 0) {
	var s = navigator.appVersion.split('MSIE');
	version = parseFloat(s[1]);
} else version = parseFloat(appver);
var agent=navigator.userAgent.toLowerCase();
var mac=(agent.indexOf("mac")!=-1)?true:false;
var win=(agent.indexOf("windows")!=-1)?true:false;
var opera=(agent.indexOf('opera')!=-1)?true:false;
if (opera && (agent.indexOf('opera/')==-1)) {
	version = parseFloat(agent.substr(agent.indexOf('opera')+6));
}
var ie=((document.all)&&(version>=4.0)&&(!opera))?true:false;
var dom=document.getElementById?true:false;
var gecko=((version>=5.0)&&((agent.indexOf('netscape')>=0)||(agent.indexOf('gecko')>=0)))?true:false;
*/

function showpic(filename,w,h,title) {
	var l=10, t=10;
	if (w==0) w=780;
	if (h==0) h=400;
	if (screen.width) {
		l=(screen.width)?(screen.width-w)/2:0;
		t=(screen.height)?(screen.height-h)/2:0;
	}
	var p=window.open("", "zoom", "toolbar=no,scrollbars=auto,location=no,directories=no,status=no,menubar=no,resizable=yes,width="+w+",height="+h+",left="+l+",top="+t+",screenX="+l+",screenY="+t);
	if (p) {
		p.document.open('text/html');
		p.document.writeln('<html><head><title>'+title+'</title>');
		p.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
		p.document.writeln('<link rel="STYLESHEET" type="text/css" href="../shared/screen.css">');
		p.document.writeln('<style type="text/css">');
		p.document.writeln('body { margin:10; background-color:#fff; background-image:none; }');
		p.document.writeln('</style>');
		p.document.writeln('</head><body>');
		if (title) p.document.writeln('<h1>'+title+'</h1>');
		p.document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
		p.document.writeln('<tr><td align="center" valign="middle">');
		p.document.writeln('<a href="#" onClick="self.close()"><img src="'+filename+'" alt="" border="0"></a>');
		p.document.writeln('</td></tr>');
		p.document.writeln('</table>');
		p.document.writeln('</body></html>')
		p.document.close();
		p.opener=self;
		p.focus();
	}
}

function mOver(cell) {
	bgCol=cell.bgColor;
	if (cell.id != 'noroll') cell.style.cursor="pointer";
	if (!opera && cell.bgColor!=C_MARKED) cell.bgColor=C_GLOW_BG;
}

function mOut(cell) {
	if (cell.id != 'noroll') cell.style.cursor="default";
	if (!opera && cell.bgColor!=C_MARKED) cell.bgColor=bgCol;
}

function chkTextLength(formid, maxchars, infoid) {
	var n=maxchars-document.formular[formid].value.length;
	if (n<0) n=0;
	document.getElementById(infoid).innerHTML='<small>('+n+')</small>';
	if (n==0) alert('Mehr Zeichen können nicht gespeichert werden!');
}

function popup(w,h,filename) {
	var l=10, t=10;
	if (w<1) w=520;
	if (h<1) h=420;	
	if (screen.width) {
		l=(screen.width)?(screen.width-w)/2:0;
		t=(screen.height)?(screen.height-h)/2:0;
	}
	var p=window.open(filename, "zoom", "toolbar=no,scrollbars=yes,dependent=yes,location=no,directories=no,status=no,menubar=no,resizable=yes,width="+w+",height="+h+",left="+l+",top="+t+",screenX="+l+",screenY="+t);
	if (p) {p.opener=self;p.focus();}
}
