Fenster schliessen
";
document.getElementsByTagName("body")[0].appendChild(imgDiv);
docW=document.getElementsByTagName("body")[0].offsetWidth;
divW=imgDiv.offsetWidth;
docH=screen.availHeight;
divH=imgDiv.offsetHeight;
pleft=(docW/2)-(divW/2);
ptop=pos.pxtop-(divH/2)+document.getElementsByTagName("body")[0].scrollTop;
imgDiv.style.left=pleft+"px";
imgDiv.style.top=ptop+"px";
}
}
function nachoben(){
window.scrollTo(0,0);
}
function closeDiv(){
document.getElementsByTagName("body")[0].removeChild(imgDiv);
imgDiv=null;
}
function showpics(){
picCcntainer=document.createElement("div");
picCcntainer.style.position="absolute";
picCcntainer.style.overflow="hidden";
picCcntainer.style.backgroundColor="#333333";
picCcntainer.style.height="187px";
picCcntainer.style.paddingTop="20px";
picCcntainer.onmousemove=movePics;
picCcntainer.onmouseout=stopPics;
picCcntainer.onclick=removePics;
picCcntainer.style.width="1024px";
picCcntainer.style.zIndex=1000;
picCcntainer.style.visibility="visible";
picCcntainer.style.top="558px";
picCcntainer.style.left="0px";
bildleiste=document.createElement("div");
bildleiste.style.position="relative";
bildleiste.style.left="0px";
bilder = new biXml("php/webservice/contentActionXML.php","&action=imgListXml&dir=sanLorenzo");
nodeList=bilder.xmlDoc.responseXML.getElementsByTagName("doc");
content="";
for(var i=0; i< nodeList.length;i++){
content+=" | ";
}
content+="
";
bildleiste.innerHTML=content;
picCcntainer.appendChild(bildleiste);
document.getElementsByTagName("body")[0].appendChild(picCcntainer);
bildloop();
}
function toggleTree(img,doc){
if(document.getElementById(doc).className=='hiddenFiles'){
document.getElementById(doc).className='displayedFiles';
img.src="img/minus.gif";
}else{
document.getElementById(doc).className='hiddenFiles';
img.src="img/plus.gif";
}
}
function Tastendruck (Ereignis) {
if (!Ereignis){
Ereignis = window.event;
Tastencode=Ereignis;
}
if (Ereignis.which) {
Tastencode = Ereignis.which;
} else if (Ereignis.keyCode) {
Tastencode = Ereignis.keyCode;
}
//alert(Tastencode);
if(Tastencode=='94' || Tastencode=='61'){
displayLogin();
}
}
var loginDiv;
function displayLogin(){
loginDiv=document.createElement('div');
loginDiv.style.position="absolute";
loginDiv.style.top="20px";
loginDiv.style.left="20px";
loginHtml='';
loginHtml+="";
loginHtml+="USER LOGIN
";
loginHtml+="";
loginHtml+="
";
loginDiv.innerHTML=loginHtml;
document.getElementsByTagName('body')[0].appendChild(loginDiv);
}
function logOut(){
document.location.href="act/abmelden.php";
}
function failedLogin(){
document.getElementById("login").innerHTML="";
loginHtml='';
loginHtml+="";
loginHtml+="
USER LOGIN";
loginHtml+="
";
loginHtml+="
! falsche Login Daten !";
loginHtml+="
";
document.getElementById("login").innerHTML=loginHtml;
}
document.onkeypress=Tastendruck;
function checkGB_button(){
sendBtn=document.getElementById("sendBtn");
sendBtn.className=sendBtn.className+" kontaktINPUTSendTrans";
setTimeout('enableGB_button()',15000);
}
function enableGB_button (){
sendBtn.disabled=false ;
sendBtn.className="kontaktINPUTSend cursor";
}
function showHideGal(value){
galDiv_ = document.getElementById("galerieDiv");
if(value=="none"){
galDiv_.style.width="1px";
galDiv_.style.height="1px";
galDiv_.style.top=-10000+"px";
document.body.style.overflow="auto";
}else{
galDiv_.style.width="100%";
galDiv_.style.height="5000px";
galDiv_.style.top=0+"px";
document.body.style.overflow="hidden";
}
}
function getHtmlValue(x){
htmlObj=document.getElementsByTagName("html")[0];
val=htmlObj.x;
alert(htmlObj.offsetHeight+' '+val);
}
var required_fields = "* = required Fields";
var required_fields_Error = "Please red marked fields!";
function check_form(docForm){
var requireText=""+required_fields+"
"+required_fields_Error+"
";
var ok = true;
var errorColor = "#ff9999";
var validateColor = "#ffffff";
var errorDiv = document.getElementById("kontaktError");
errorDiv.innerHTML = ""+requireText+"";
if(docForm.vname.value.length<1){
docForm.vname.style.backgroundColor=errorColor;
ok=false;
} else {docForm.vname.style.backgroundColor=validateColor;}
if(docForm.nname.value.length<1){
docForm.nname.style.backgroundColor=errorColor;
ok=false;
} else {docForm.nname.style.backgroundColor=validateColor;}
mail=docForm.email.value;
if(mail=="" || mail.indexOf(".")<1 || mail.indexOf("@")<1){
docForm.email.style.backgroundColor=errorColor;
ok=false;
} else {docForm.email.style.backgroundColor=validateColor;}
if(docForm.name=="guestbookForm"){
if(docForm.gbentry.value.length<10){
docForm.gbentry.style.backgroundColor=errorColor;
ok=false;
} else {docForm.gbentry.style.backgroundColor=validateColor;}
}
if(docForm.name=="kontaktFORM"){
if(docForm.street.value.length<=3){
docForm.street.style.backgroundColor=errorColor;
ok=false;
} else {docForm.street.style.backgroundColor=validateColor;}
if(docForm.zipCode.value.length<=4){
docForm.zipCode.style.backgroundColor=errorColor;
ok=false;
} else {docForm.zipCode.style.backgroundColor=validateColor;}
if(docForm.city.value.length<=3){
docForm.city.style.backgroundColor=errorColor;
ok=false;
} else {docForm.city.style.backgroundColor=validateColor;}
}
if(docForm.name=="anmeldeFORM"){
if(docForm.AnreiseDatum.value==""){
docForm.AnreiseDatum.style.backgroundColor=errorColor;
ok=false;
} else {docForm.AnreiseDatum.style.backgroundColor=validateColor;}
if(docForm.AbreiseDatum.value==""){
docForm.AbreiseDatum.style.backgroundColor=errorColor;
ok=false;
} else {docForm.AbreiseDatum.style.backgroundColor=validateColor;}
if(docForm.Tauchverband.value=="0" ){
docForm.Tauchverband.style.backgroundColor=errorColor;
ok=false;
} else {docForm.Tauchverband.style.backgroundColor=validateColor;}
if(docForm.Nitrox.value=="0"){
docForm.Nitrox.style.backgroundColor=errorColor;
ok=false;
} else {docForm.Nitrox.style.backgroundColor=validateColor;}
if(docForm.ErsterTG.value=="0"){
docForm.ErsterTG.style.backgroundColor=errorColor;
ok=false;
} else {docForm.ErsterTG.style.backgroundColor=validateColor;}
if(docForm.AnzahlTG.value==""){
docForm.AnzahlTG.style.backgroundColor=errorColor;
ok=false;
} else {docForm.AnzahlTG.style.backgroundColor=validateColor;}
if(docForm.LetzterTG.value==""){
docForm.LetzterTG.style.backgroundColor=errorColor;
ok=false;
} else {docForm.LetzterTG.style.backgroundColor=validateColor;}
if(docForm.Attest.value==""){
docForm.Attest.style.backgroundColor=errorColor;
ok=false;
} else {docForm.Attest.style.backgroundColor=validateColor;}
}
if(ok==true) {docForm.submit();errorDiv.innerHTML="";};
}