var pic,pics,dir;
function preloadImages(){var d=document;if(d.images){if(!d.p){d.p=new Array();}var i,j=d.p.length,a=preloadImages.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.p[j]=new Image;d.p[j++].src=a[i];}}}}
function change_abreise(){document.kontaktform.abreise.value=document.kontaktform.anreise.value;}
function showGalleryPic(i){if(i!=pic){document.getElementById("thumb"+pic).src='images/'+dir+'/'+pic+'_kl.jpg';};pic=i;document.getElementById("bg").src='images/'+dir+'/'+i+'.jpg';document.getElementById("gallery_current").innerHTML=i;document.getElementById("thumb"+i).src='images/'+dir+'/'+i+'_kl_hover.jpg';}
function thumbOver(i){if(i!=pic){document.getElementById("thumb"+i).src='images/'+dir+'/'+i+'_kl_hover.jpg';}}
function thumbOut(i){if(i!=pic){document.getElementById("thumb"+i).src='images/'+dir+'/'+i+'_kl.jpg';}}
function nextGalleryPic(){document.getElementById("thumb"+pic).src='images/'+dir+'/'+pic+'_kl.jpg';pic++;if(pic>pics){pic=1;}showGalleryPic(pic);}
function prevGalleryPic(){document.getElementById("thumb"+pic).src='images/'+dir+'/'+pic+'_kl.jpg';pic--;if(pic<=0){pic=pics;}showGalleryPic(pic);}
