<!--
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;}

function printpop(url,id) {
window.open(url,id,"height=550,width=705,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 setDIV() {var minheight=270;
var content=document.getElementById? document.getElementById("abox") : document.all.abox
var contentheight=content.offsetHeight;
if(contentheight<minheight) {content.style.height=minheight+"px";}
content.style.overflowX="hidden";
}

function gotop() {document.body.scrollTop=0;}

function favadd(ob,cd,lg,uid) {var url; var ado;
if((ob.length==32)&&(uid.length==32)) {var ado="add_ob";}
if(ado) {var url="favor.mv?+" +ado+ "+&uid=" +uid+ "+&lg=" +lg+ "+&obid=" +ob+"+&cd="+cd;}
	if(url !="") {to="favo";
	content='<iframe src="' +url+ '" frameborder=0 width=1 height=1 scrolling=no></iframe>';
	fill_div(to,content);}

// var bx1="divbox1"; var bx3="divbox3";
// document.getElementById(bx1).className = bx3;
// document.getElementById(bx3).className = bx1;
// document.getElementById(bx3).style.visibility = "visible";
}


function showPic(pic,p) {
	var p=p*1; var n=p+1; if(n>pmax) {n=1;}
	var nextpic=eval("npic"+n);
	nexturl='<a href="javascript:showPic(';
	nexturl +="'"+nextpic+"','"+n+"'";
	nexturl +=')">';
var picurl="http://backoffice.apswiss.ch/"+agt+"/"+pic;
var content=nexturl+'<img src="'+picurl+'" border=0></a>';
var to="headbox"; fill_div(to,content);
}

function fill_div(to,content) {
if (ie) {document.all[to].innerHTML=content;}
if (ns6) {document.getElementById(to).innerHTML=content;}
}

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 ziffern(currval,df,fx) {
var valid = "0123456789"; var tx; var ph="";
	for (var i=0; i<currval.length; i++) {tx = "" + currval.substring(i, i+1);
	if (valid.indexOf(tx) >-1) {ph +=tx;}}
if(ph !=currval) {document.form[df].value=ph; currval=ph;}

// if(fx) {MinMax(currval,df,fx);}
}


function MinMax(currval,df,fx) {
err=0;
var minx="min"+fx; var maxx="max"+fx;
var minne="minval"+fx; var maxe="maxval"+fx;

var minval=document.form[minne].value; minval=minval*1;
var maxval=document.form[maxe].value; maxval=maxval*1;
currval=currval*1;

if (df.indexOf('min') >-1) {
	if(currval < minval) {document.form[df].value=minval; err++;}
	else {if(currval > maxval) {document.form[df].value=maxval; err++;}} }
if (df.indexOf('max') >-1) {
	if(currval > maxval) {document.form[df].value=maxval; err++;}
	else {if(currval < minval) {document.form[df].value=minval; err++;}} }

var min=document.form[minx].value; min=min*1;
var max=document.form[maxx].value; max=max*1;

if ((min !="")&&(max !="")) {
if ((min > max) || (max < min)) {
	document.form[minx].value=max;
	document.form[maxx].value=min;
}}
return err;
}


function questcheck(lg) {
var name=document.form.name.value;
var phone=document.form.phone.value;
var email=document.form.email.value;
var comments=document.form.comments.value;

if(lg =="de") {
var err1="Name fehlt\n";
var err2="Telefon fehlt\n";
var err3="E-Mail fehlt\n";
var err4="E-Mail fehlerhaft ...\n";
}
else {
var err1="Name missing\n";
var err2="Phone missing\n";
var err3="E-Mail missing\n";
var err4="something wrong in E-Mail ...\n";
}

var error="";
if(name =="") {error +=err1;}
if(phone =="") {error +=err2;}
if(email =="") {error +=err3;}
else {if((email.indexOf('@') == -1) || (email.indexOf('.') == -1))   {error +=err4;}}

if(error != "") {alert(error); return false;} 
else {return true;}
}


document.write("<LINK REL='stylesheet' HREF='font_ie.css' TYPE='text/css'>");
document.write("<LINK REL='stylesheet' HREF='font.css' TYPE='text/css'>");
// -->