function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function neueseite(s)
{
                seite = window.open(s,0,'toolbar=0,location=0,directories=0,status=1,menubar=0,width=590,height=500,scrollbars=1,resizable=1,dependent=yes');
}

function neu(s) {
        open(s,0,'toolbar=0,location=0,directories=0,status=1,menubar=0,width=620,height=420,scrollbars=1,resizable=0,dependent=yes')
}

// datamints: NOP() wird als dummy-function für buchungslink benötigt
function nop() {}

function checkdata()
{
         var re_email = /^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$/;
         var nachname = document.form1.nachname.value;
         var email = document.form1.email.value;
         var checked = true;

         if ((re_email.test(email))==false || email.length==0) {
            alert("Bitte geben Sie Ihre richtige E-Mail-Adresse ein!");
            checked = false;
            }
         if (nachname.length<=1) {
            alert("Bitte geben Sie Ihren Nachnamen ein!");
            checked = false;
            }
         if (checked) {
           document.form1.method = "post";
           document.form1.action = "kontakt_a.php";
         }
         return checked;
}


function openBuchung(regionId,catId,domId)
{
	/** neu **/
	var	width	= 590;
	var	height	= 570;
	var	top		= 110;
	var	left	= 210;
	var ref = window.open('/buchungsanfrage/buchen_neu/index.php?step=0&region='+regionId+'&category='+catId+'&dom_name='+domId, "popup", "width="+width+", height="+height+", top="+top+", left="+left);
	ref.focus();


	/** alt 
	var x_pos = (screen.width / 2) - (610 / 2);
	var y_pos = (screen.height / 2) - (530 / 2);
	
	self.name = "opener";
	titleofpage = escape("Buchungsanfrage");
	addedurl = "/_common/php/anfrage.php?src=/buchen/buchungsanfrage_popup.php&title="+titleofpage+"&dom_id=" + domId;
	ref = window.open(addedurl, "popparameter", "status=no,scrollbars=no,scrolling=0,resizable=no,width=610,height=530,top="+y_pos+",left="+x_pos+",locationbar=no");
	**/
}

function openBuchung_neu(domId)
{
	var	width	= 568;
	var	height	= 680;
	var	top	= 300;
	var	left	= 235;
	var ref = window.open('/buchen_neu/index.php?dom_id=' + domId, "popup", "width=" + width + ", height=" + height + ", top=" + top + ", left=" + left);
	ref.focus();

}