$(document).ready(function() {
			// Fenster f�r Agenda �ffnen
			$("#winagenda").newWindow({
				windowTitle : "",
				titleBarClass : ".window-titleBar-agenda", 
				content: "",
				ajaxURL: "agenda.php",
				width : 326,
				height : 420,
				posx : 150,
				posy : 150,
				onDragBegin : null,
				onDragEnd : null,
				onResizeBegin : null,
				onResizeEnd : null,
				onAjaxContentLoaded : null,
				statusBar: false,
				minimizeButton: true,
 				minimizeIcon: "--",
				maximizeButton: false,
				maximizeIcon: "O",
				closeButton: true,
				closeIcon: "x",
				draggable: true,
				resizeable: false,
				resizeIcon: "#"
			});
			// Fenster für Projekte öffnen
			$("#winprojects").newWindow({
				windowTitle : "",
				titleBarClass : ".window-titleBar-proj", 
				content: "",
				ajaxURL: "projects.php",
				width : 326,
				height : 420,
				posx : 450,
				posy : 180,
				onDragBegin : null,
				onDragEnd : null,
				onResizeBegin : null,
				onResizeEnd : null,
				onAjaxContentLoaded : null,
				statusBar: false,
				minimizeButton: true,
 				minimizeIcon: "--",
				maximizeButton: false,
				maximizeIcon: "O",
				closeButton: true,
				closeIcon: "x",
				draggable: true,
				resizeable: false,
				resizeIcon: "#"
			});
			// Fenster für Discography öffnen
			$("#windisco").newWindow({
				windowTitle : "",
				titleBarClass : ".window-titleBar-disco", 
				content: "",
				ajaxURL: "discography.php",
				width : 326,
				height : 420,
				posx : 550,
				posy : 200,
				onDragBegin : null,
				onDragEnd : null,
				onResizeBegin : null,
				onResizeEnd : null,
				onAjaxContentLoaded : null,
				statusBar: false,
				minimizeButton: true,
 				minimizeIcon: "--",
				maximizeButton: false,
				maximizeIcon: "O",
				closeButton: true,
				closeIcon: "x",
				draggable: true,
				resizeable: false,
				resizeIcon: "#"
			});
			// Fenster für Kontaktformular öffnen
			$("#wincontact").newWindow({
				windowTitle : "",
				titleBarClass : ".window-titleBar-contact", 
				content: "",
				ajaxURL: "contact.php",
				width : 326,
				height : 420,
				posx : 250,
				posy : 300,
				onDragBegin : null,
				onDragEnd : null,
				onResizeBegin : null,
				onResizeEnd : null,
				onAjaxContentLoaded : null,
				statusBar: false,
				minimizeButton: true,
 				minimizeIcon: "--",
				maximizeButton: false,
				maximizeIcon: "O",
				closeButton: true,
				closeIcon: "x",
				draggable: true,
				resizeable: false,
				resizeIcon: "#"
			});
			// Fenster für Downloads öffnen
			$("#windownload").newWindow({
				windowTitle : "",
				titleBarClass : ".window-titleBar-dl", 
				content: "",
				ajaxURL: "download.php",
				width : 326,
				height : 420,
				posx : 350,
				posy : 370,
				onDragBegin : null,
				onDragEnd : null,
				onResizeBegin : null,
				onResizeEnd : null,
				onAjaxContentLoaded : null,
				statusBar: false,
				minimizeButton: true,
 				minimizeIcon: "--",
				maximizeButton: false,
				maximizeIcon: "O",
				closeButton: true,
				closeIcon: "x",
				draggable: true,
				resizeable: false,
				resizeIcon: "#"
			});
			// Fenster für Biographie öffnen
			$("#winbiography").newWindow({
				windowTitle : "",
				titleBarClass : ".window-titleBar-bio", 
				content: "",
				ajaxURL: "biography.php",
				width : 326,
				height : 420,
				posx : 750,
				posy : 350,
				onDragBegin : null,
				onDragEnd : null,
				onResizeBegin : null,
				onResizeEnd : null,
				onAjaxContentLoaded : null,
				statusBar: false,
				minimizeButton: true,
 				minimizeIcon: "--",
				maximizeButton: false,
				maximizeIcon: "O",
				closeButton: true,
				closeIcon: "x",
				draggable: true,
				resizeable: false,
				resizeIcon: "#"
			});
			
			// $('.map').maphilight();
			$('.map').maphilight({
				fill: false,
				fillColor: '000000',
				fillOpacity: 0.2,
				stroke: true,
				strokeColor: '000000',
				strokeOpacity: 1,
				strokeWidth: 1,
				fade: false,
				alwaysOn: false,
				neverOn: false,
				groupBy: false
			}).parent().addClass('center-map');
		});

// E-Mail �berpr�fen
function validate_email(field, alerttxt) {
  with (field) {
  apos = value.indexOf("@");
  dotpos = value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2) {
	alert(alerttxt);
	return false;
  }
  else 
  {
	return true;
  }
  }
}
// Obligatorische Felder pr�fen
function validate_required(field,alerttxt) {
with (field) {
  if (value==null||value=="")
    {
  alert(alerttxt);
  return false;
    }
  else
    {
  return true;
    }
  }
}
// Formular �berpr�fen
function validate_form(thisform) {
with(thisform) {
  if (validate_email(contmail, "Sie haben eine ungueltige E-Mail Adresse eingegeben.") == false) {
	contmail.focus();
	return false;
  }
  
  if(validate_required(contname, "Bitte geben Sie einen Namen ein.") == false) {
	contname.focus();
	return false;
  }
  
  if(validate_required(contmess, "Bitte geben Sie eine Nachricht ein.") == false) {
	contmess.focus();
	return false;
  }
}
}