/**************************************************************************
*  09.2005, dominik fehr, www.pinkytoes.com greetz you, add 03.2010       *
***************************************************************************/
function openDetailWin(){
  winDetailPop = window.open("../../deu/kontakt/popAdresse.htm" , "winDetailPop", "width=560,height=750,left=200,top=50,scrollbars=no,status=no,toolbar=no,resizable=yes,menubar=no,location=no");
  winDetailPop.focus();
}

//test form input - (whatForm=from-nr in document(p.ex. 0,1,etc // proofWhatFields=what fields(p.ex. 0_1_1_0 > second and third field are required)
function testAndSubmForm(whatForm,proofWhatFields) {
  error_counter=0;
  jumpToFiled=0;
  arrRequiredFields=proofWhatFields.split("_");
  for(var arrIndex in arrRequiredFields){
    if(arrRequiredFields[arrIndex]==1){ //proof this field
      if(document.forms[whatForm].elements[arrIndex].value.length < 1){
        error_counter=1;
        if(jumpToFiled==0){
	       jumpToFiled=arrIndex; //focus first empty must-field
        }
      }
    }
  }
  if(error_counter==1){
    alert("Bitte füllen Sie alle mit einem *\nmarkierten Felder aus. Danke.");
    document.forms[whatForm].elements[jumpToFiled].focus();
  }
  else{ //all ok > submit form
    document.forms[whatForm].submit();
  }
}

//beware of spam - write e-mail link with javascript
function sendMailLink(whom){
  document.writeln("<a href=\"mailto:"+whom+"&#64;"+"aerosuisse.ch\">"+whom+"&#64;"+"aerosuisse.ch</a>");
}
function sendMailLinkExt(whom,domain){
  document.writeln("<a href=\"mailto:"+whom+"&#64;"+domain+"\">"+whom+"&#64;"+domain+"</a>");
}
function nixBloed(whom1,whom2,domain1,domain2 ) {
    document.writeln("<a href=\"mai" + "lto:" + whom1 + whom2 + "&#64;" + domain1 + domain2 + "\">" + whom1 + whom2 + "&#64;" + domain1 + domain2 + "</a>");
}