function fenster(seite, weite, hoehe,name){ 
var mon, toppos, leftpos; 

toppos = (screen.height - hoehe)/2; 
leftpos = (screen.width - weite)/2; 
features = "scrollbars=1,location=0,toolbar=0,menubar=0,resizable=1,status=0"; 
mon = window.open(seite,"name","width="+weite+",height="+hoehe+",top="+toppos+",left="+leftpos+","+features); 
//mon.document.title=name;
mon.focus();
} 

function fenster1(seite, weite, hoehe, name){ 
var mon, toppos, leftpos; 

toppos = (screen.height - hoehe)/2; 
leftpos = (screen.width - weite)/2; 
features = "scrollbars=1,location=0,toolbar=0,menubar=0,resizable=1,status=0"; 
mon = window.open(seite,"name","width="+weite+",height="+hoehe+",top="+toppos+",left="+leftpos+","+features); 
mon.document.write('<head><title>'+name+'</title></head><body><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle"><img src='+seite+' width="'+eval(weite-40)+'"></td></tr></table></body>');
//mon.document.title=name;
mon.focus();
} 

function MM_displayStatusMsg(msgStr)
{ 
  status=msgStr;
  document.MM_returnValue = true;
}

function getQueryVariable(variable) { 
  var query = window.location.search.substring(1); 
  var vars = query.split("&"); 
  for (var i=0;i<vars.length;i++) { 
    var pair = vars[i].split("="); 
    if (pair[0] == variable) { 
      return pair[1]; 
    } 
  } 
  return "";
}

function getOffer(){
	var angebot=getQueryVariable("angebot");
	if (angebot!="") document.formular.Bemerkung.value="Gewünschte Pauschale: "+urldecode(angebot);
}

function checkForm(){
	var errorMsg="";
	if(document.formular.Art[1].checked==true){
		if(document.formular.Name.value==""){
			document.formular.Name.style.background="#FF9C9C";
			errorMsg+="Bitte geben Sie Ihren vollständigen Namen ein!\n";
		}
		else document.formular.Name.style.background="#FFFFFF";
		if(document.formular.Strasse.value==""){
			document.formular.Strasse.style.background="#FF9C9C";
			errorMsg+="Bitte geben Sie die Strasse Ihrer Postanschrift ein!\n";
		}
		else document.formular.Strasse.style.background="#FFFFFF";
		if(document.formular.Ort.value==""){
			document.formular.Ort.style.background="#FF9C9C";
			errorMsg+="Bitte geben Sie die PLZ und den Ort Ihrer Postanschrift ein!\n";
		}
		else document.formular.Ort.style.background="#FFFFFF";
		if(document.formular.Land.value==""){
			document.formular.Land.style.background="#FF9C9C";
			errorMsg+="Bitte geben Sie das Land Ihrer Postanschrift ein!\n";
		}
		else document.formular.Land.style.background="#FFFFFF";
	}
	if(errorMsg!=""){
		alert(errorMsg);
	}
	else{
		document.formular.submit();
	}
}

function hinweis(lang){
	switch(lang){
		case("en"):
			alert("This page coming soon.");
			break;
		case("fr"):
			alert("Cette page est en construction.");
			break;
		case("it"):
			alert("Questa pagina è attualmente in costruzione.");
			break;
		case("nl"):
			alert("Deze pagina is in ontwikkeling.");
			break;
		default:
			alert("This page coming soon.");
		break;
	
	}
}