$(function()
{
  Cufon.replace('#cufonme', { fontFamily: 'kristi' });
  Cufon.replace('.cufonme', { fontFamily: 'kristi' });
  $(".date").datepicker({ beforeShowDay: function(date)
  {
    
var isfree = [].indexOf(date.getDate() + '.' + (date.getMonth() + 1) + '.' + date.getFullYear()) >= 0;
    return [true, isfree ? 'highlight' : '', isfree ? 'Arbeitsfreier Tag' : ''];
  }});
});
function asd(asdf)
{
  var x = $('#content_left #email').val();
  var y = $('#content_left #vorname').val();
  var z = $('#content_left #nachname').val();
  if ((x != '') && (y != '') && (z != ''))
  {
    if (asdf == '1')
  {
    alert('Vielen Dank, sie haben sich eingetragen');
    return true
  }
  else
  {
       alert('Sich haben sich erfolgreich ausgetragen');
       return true
  }
  }
  else
  {
   alert('Bitte fuellen Sie alle Felder aus.');
  }
   return false
}  

function OpenNewWindow(Picture,Breit,Hoch)
{
xsize = Breit;// Zusatz für Rand rechts und links
ysize = Hoch; //Zusatz für Rand oben und unten - damit Button angezeit werden kann 
    
ScreenWidth = screen.width;
ScreenHeight = screen.height;

xpos = (ScreenWidth/2)-(xsize/2);
ypos = (ScreenHeight/2)-(ysize/2);
	
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>Kunstm&uuml;hle Galerie");
	NewWindow.document.write ("</title></head>");
                     NewWindow.document.write ("<body bgcolor='#ffffff' style='margin:0; padding:0;' onload='focus()'>");
	//NewWindow.document.write ("<body bgcolor='#cccccc'>");
	NewWindow.document.write ("<table align='center'><tr><td><center><img src='gfx/logo.gif' style='margin-bottom:5px' /></center></td></tr>");
	NewWindow.document.write ("<tr><td align='center' valign='top'>");
	NewWindow.document.write ("<table border='0' bgcolor='#6E1400' bordercolor='#000000' cellpadding='5' cellspacing='1'><tr><td align='center'>");
	NewWindow.document.write ("<a href='javascript:window.close()'><img style='border:1px solid #ffffff;' src=");
	NewWindow.document.write (Picture);
	NewWindow.document.write ("></a>");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</td></tr><tr>");
	NewWindow.document.write ("<td align='center' valign='bottom'>");
	NewWindow.document.write ("<center>");
	NewWindow.document.write ("</td></tr></table>");
	NewWindow.document.write ("</body></html>");
	NewWindow.document.close();
                     NewWindow.resizeTo(xsize,ysize); 
}
