<!--
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 code;

function clearK(word) {
if((word=="Stichwort")||(word=="keyword")||(word=="suchbegriff")) 
{document.fk.keyword.value="";}}

function kEmpty(word) {
if((word=="Stichwort")||(word=="keyword")||(word=="suchbegriff")) 
{document.search.keyword.value="";}}

function searchFor() {var key; var temp;
key=document.search.keyword.value;

var name="searchresult";

if (ie) {
	document.all[name].innerHTML="";
	document.all[name].style.visibility = "hidden";}
if (ns6) {
	document.getElementById(name).innerHTML="";
	document.getElementById(name).style.visibility = "hidden";}


temp = "" + key; out = " "; add = ""; 
t_len=temp.length; while (temp.substring(0, 1)==out) {temp=temp.substring(1, t_len); t_len=temp.length;}
t_len=temp.length; while (temp.substring(t_len-1, t_len)==out) {temp=temp.substring(0, t_len-1); t_len=temp.length;}

if((temp=="")||(temp=="suchbegriff")) {
			document.search.keyword.value=temp; 
			document.search.this_key.value="";
			document.search.result.value="";
			}

else {
this_key=document.search.this_key.value;
	if(this_key==temp) {showresult();}

else {
document.search.this_key.value=temp;
document.search.result.value="";
temp = "" + key; out = " "; add = "_";
while (temp.indexOf(out)>-1) {pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length));}

url="suche.mv?select+&keyword="+temp;
document.getElementById("tsuche").src=url;
     }}
}


function showresult() {var name="searchresult"; var xres="";
xres=document.search.result.value;

if (ie) {
	document.all[name].innerHTML=xres;
	document.all[name].style.width = "570px";
	document.all[name].style.height = "100%";
	document.all[name].style.visibility = "visible";}
if (ns6) {
	document.getElementById(name).innerHTML=xres;
	document.getElementById(name).style.width = "570px";
	document.getElementById(name).style.height = "450px";
	document.getElementById(name).style.overflow = "auto";
	document.getElementById(name).style.visibility = "visible";}
}


function hideresult() {var name="searchresult";
if (ns) {document.layers[name].visibility = "hide";}
if (ie) {document.all[name].style.visibility = "hidden";}
if (ns6) {document.getElementById(name).style.visibility = "hidden";}
}

function customize(form) {
var url = "http://backoffice.apswiss.ch/login.mv?verify+goto";
var id = document.form.uid.value;
var ux = document.form.uname.value;
var px = document.form.pass.value;
url = url+"+&id="+id+"+&uname="+ux+"+&pass="+px;
popuxp(url,id);
document.form.uname.value="";
document.form.pass.value="";
}


function popmap(street,who,zip,city) {
var url="http://link2.map24.com/?lid=a24a6fca&maptype=JAVA&country0=ch";
var zip ="&zip0="+zip;
var city ="&city0="+city;
var street ="&street0="+street; 
var who ="&description0="+who; 
url +=zip+city+street+who; popuxp(url,'map');
}


function set_date(heute) {var this_day=heute;
for(var i=0; i<5; i++) {if(document.form.fdate[i].checked==true){num=i;}}
datum=document.form.fdate[num].value;
if(datum.length>0) {
sy=datum.substring(0,4); sm=datum.substring(4,6); sd=datum.substring(6,8);
ey=datum.substring(8,12); em=datum.substring(12,14); ed=datum.substring(14,16);}
else {
sy=this_day.substring(0,4); sm=this_day.substring(4,6); sd=this_day.substring(6,8);
ey=0; em=0; ed=0;}
sm=sm-1; sd=sd-1;
	var s; var boxLength=document.form.cyear.length;
	for (s=0; s < boxLength; s++) {var item=document.form.cyear.options[s].value;
	if(item==sy) {document.form.cyear.options[s].selected=true;}}
document.form.cmon.options[sm].selected=true;
document.form.cday.options[sd].selected=true;
	var e; var boxLength=document.form.eyear.length;
	for (e=0; e < boxLength; e++) {var item=document.form.eyear.options[e].value;
	if(item==ey) {document.form.eyear.options[e].selected=true;}}
document.form.emon.options[em].selected=true;
document.form.eday.options[ed].selected=true;
}

function popuxp(url,id) {
window.open(url,id,"height=550,width=800,top=20,left=50,toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}

function printpop(url,id) {
if(printags) {url=printags;}
window.open(url,id,"height=550,width=675,top=10,left=20,toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}

function immomarkt(dateiname) {
var hori = screen.availWidth;
var verti = screen.availHeight;
var w=625; var h=600;
window.open(dateiname, 'Immo', 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width='+ w  +',height='+ h +',left='+((hori - w- 10)* .5) +',top='+((verti - h- 30)* .5))
window.focus;
}

function film(dateiname) {var url="http://www.ettiswil.ch/"+dateiname;
var hori = screen.availWidth;
var verti = screen.availHeight;
var w=430; var h=390;
window.open(url, 'Film', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+ w  +',height='+ h +',left='+((hori - w- 10)* .5) +',top='+((verti - h- 30)* .5))
window.focus;
}

function showAllD(vm) {var vm=vm*1; vm=vm+1; var fx;
for (fx=1; fx < vm; fx++) {
var name="fold"+fx; var tdx="da"+fx;
var cx="evdet"; var bc="eeeeee";
document.getElementById(name).className = cx;
document.getElementById(tdx).style.backgroundColor=bc;
}}

function showEvDet(fx) {var fx=fx; var name="fold"+fx; var cx; var bc; var tdx="da"+fx; 
var clx=document.getElementById(name).className;
var cx_open="evdet"; var cx_close="evdex";
if(clx==cx_open) {var cx=cx_close; var bc="ffffff";}
if(clx==cx_close) {var cx=cx_open; var bc="eeeeee";}
document.getElementById(name).className = cx;
document.getElementById(tdx).style.backgroundColor=bc;
}


function fillpic(file,agent,ak) {
var filex="http://backoffice.apswiss.ch/"+agent+"/"+file;
var hox='<img src="images/hold2.gif" width=1 height=370 border=0>';
var content=""; var to="picframe"+ak; var side="pichold"+ak;
if(file !="") {content='<a href="javascript:closepic('+ak+')"><img src="'+filex+'" border=0></a><br>'+file;}
if(ak !="") {
document.getElementById(side).innerHTML=hox;
document.getElementById(to).innerHTML=content;}
}

function closepic(ak) {
var to="picframe"+ak; var side="pichold"+ak;
document.getElementById(to).innerHTML="click thumbnail ...";
document.getElementById(side).innerHTML="";
}

   document.write("<LINK REL='stylesheet' HREF='font_ie.css' TYPE='text/css'>");
   document.write("<LINK REL='stylesheet' HREF='font.css' TYPE='text/css'>"); 

// -->
