<!--
if (document.layers)  {ns = 1; ie = 0; ns6=0;} 
if (document.all) {ns = 0; ie = 1; ns6=0;}
if (document.getElementById&&!document.all) {ns6=1; ns=0; ie=0;}
var slides=[];

function logcheck() {
var usn= document.log.uname.value;
var psw= document.log.pass.value;
var err1="Username fehlt\n"; var err2="Passwort fehlt\n"; 
var errorstring = "";
if(usn == "") {errorstring += err1;}
if(psw == "") {errorstring += err2;}
if(errorstring != "") {alert(errorstring); return false;}
else {return true;}
}

function count(tx) {var xlen=tx.length; var noch=tmax-xlen;
if(noch<0) {alert('Maximal Anzahl Zeichen überschritten!\n'+xlen); 
var txx=tx.substring(0,tmax); document.form.nact.value=txx;
var xlen=txx.length; var noch=tmax-xlen;}
fill_div('vct',noch);
}

function changeSCol() {	//upload
for (n = 0; n < 24; n++) {
var x=document.form.npic[n].value;
var name="vsz"+x; 
if(document.form.npic[n].checked==true) {
	document.getElementById(name).style.color="#990000";
	document.form.thepic.value=x;}
else {document.getElementById(name).style.color="#000000";}
}}

function checkST(d,mid) {
if((d=="gb")&&(document.form[d+mid].checked==true)) {
var dx="cb"+mid; document.form[dx].checked=false;}
if((d=="cb")&&(document.form[d+mid].checked==true)) {
var dx="gb"+mid; document.form[dx].checked=false;}
}

function del_go(url,obid) {
if(url.indexOf('editobid') >-1) {var e=1;} else {var e="";}
var go=del_quest(e);
var goref="";

if(go) {
if(e) {goref=del_quest(2);} if(goref) {url +="+&ref=1";}
location.href=url;}
}

function del_quest(e) {var err="Diesen Eintrag löschen?\n";

	if(e==1) {var err="";
	err +="Diesen Eintrag mit Bilder und Anfragen löschen?\n";
	err +="ACHTUNG - vorher Evidenz-Liste drucken!\n";
	}

	if(e==2) {var err="";
	err +="in die Referenz Liste übertragen?\n\n";
	err +="OK = JA - in die Referenzliste\n";
	err +="ABBRECHEN = NEIN - Eintrag nur löschen\n";
	}

return confirm(err);
}


function showDia(pic,v,p) {
if(p > 18) {var to="screen"; var ptext=eval("ptxt"+p); if(ptext != "") {ptext=ptext+"<p>";}
var content='<div align=right><input type=button class=xbut value="X" onclick="hideplan()"></div>';
content +='<center><font class=verd11a>'+ptext+'<img src="'+pic+'" border=0></font></center>';
fill_div(to,content);
document.getElementById(to).style.visibility = "visible";}

else {iss[0].stopover(pic,v,p); }
}


function picscreen(uid,obid) {
var url="upload.mv?showpic+&uid="+uid+"+&obid="+obid;
var content='<iframe src="'+url+'" width=625 height=550 frameborder=0></iframe>';
var to="screen"; fill_div(to,content);
document.getElementById(to).style.visibility = "visible";
}

function hidescreen() {var name="screen";
parent.document.getElementById(name).style.visibility = "hidden";}

function hideplan() {var name="screen";
document.getElementById(name).style.visibility = "hidden";}

function fill_div(to,content) {
if (ie) {document.all[to].innerHTML=content;}
if (ns6) {document.getElementById(to).innerHTML=content;}
}


function datTxt() {
var sel=document.form.aft.value;
var txt="";
	if(sel =="allein") {txt="Ablaufdatum";}
	if(sel =="schlicht") {txt="Berichtdatum";}
	if(sel =="eigen") {txt="kein Datum";}

document.getElementById("dtxt").innerHTML=txt;
}

function artikcheck() {
var rub= document.form.nskat.value;
var bez= document.form.nbez.value;
var titel= document.form.ntitle.value;
var miete= document.form.mietpreis.value;
var kauf= document.form.kaufpreis.value;
var tx= document.form.nact.value;
var txlen=tx.length;

var err1="Kategorie fehlt\n"; 
var err2="Bezirk fehlt\n"; 
var err3="Titel fehlt\n"; 
var err4="Miete oder Kaufpreis fehlt\n"; 
var err5="Text zu lange ("+txlen+" Zeichen!)\n"; 

var errorstring = "";
if(rub == "") {errorstring += err1;}
if(bez == "") {errorstring += err2;}
if(titel == "") {errorstring += err3;}
//if((miete=="")&&(kauf=="")) {errorstring += err4;}
if(txlen>tmax) {errorstring += err5;}

if(errorstring != "") {alert(errorstring); return false;}
else {return true;}
}


function currency(currval,df) {
currval=""+currval; currval=inOut(' ','',currval);
str=""+currval; if(currval<0) {str="";}

var valid = "0123456789"; var ok = "yes"; var tx;
	for (var i=0; i<currval.length; i++) {
	tx = "" + currval.substring(i, i+1);
	if (valid.indexOf(tx) == "-1") {str=inOut(tx,'',str);}
	}

var error="";
error +="nur Ziffern erlaubt\n";
if(str != currval) {alert(error); document.form[df].value=str; }
}

function inOut(out,add,thestr) {
thestr = ""+thestr; 
while (thestr.indexOf(out)>-1) {pos= thestr.indexOf(out);
thestr = "" + (thestr.substring(0, pos) + add + thestr.substring((pos + out.length), thestr.length));}
return thestr;
}

function chkDel(d) {
if(document.form[d][3].checked==true) {alert('Sie haben diesen Eintrag zum löschen markiert');}
}

function on(name)  {document[name].src = "images/pax.gif";}
function off(name)  {document[name].src = "images/paa.gif";}

function pron()  {document['back'].src = "images/backc.jpg";}
function proff()  {document['back'].src = "images/backc_a.jpg";}
function nxon()  {document['next'].src = "images/nextc.jpg";}
function nxoff()  {document['next'].src = "images/nextc_a.jpg";}

function showOB() {var name="obx";
document.getElementById(name).className = "obixview";}


function popsmall(url,id) {
window.open(url,id,"height=400,width=400,top=110,left=300,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}

function printpop(url,id) {
window.open(url,id,"height=550,width=690,top=10,left=20,toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}

function kEmpty(word) {
if((word=="Stichwort")||(word=="keyword")||(word=="suchbegriff")) 
{document.search.keyword.value="";}}

function fill_div(to,content) {
if (ie) {document.all[to].innerHTML=content;}
if (ns6) {document.getElementById(to).innerHTML=content;}
}


document.write("<LINK REL='stylesheet' HREF='font_ie.css' TYPE='text/css'>");
document.write("<LINK REL='stylesheet' HREF='font.css' TYPE='text/css'>");
// -->
