function myConfirm(path, items){ 
	if( confirm('Möchten Sie den Eintrag "'+items+'" wirklich löschen?'))
	{
		window.location.href = path;
	}
}

function GoTo (select) {
  var wert = select.options[select.options.selectedIndex].value;
  location.href = wert;
  select.form.reset();
}

function Page( path )
{
  screenheight=screen.height/2;
  screenwidth=screen.width/2;
  windowheight=600/2;
  windowwidth=800/2;
  positionx=screenwidth-windowwidth;
  positiony=screenheight-windowheight;
  window.open(path,"popup","width=800,height=600,left="+ positionx +",top="+ positiony +",scrollbars=yes,resizable=no");
}

var fenster=null;
function popup(imageurl,imagewidth,imageheight,imagetitle)
{
	if(fenster != null && fenster.closed == false)
		fenster.close();fenster=window.open('','Fenster','width='+imagewidth+',height='+imageheight+',dependent=yes');

	with(fenster.document)
	{
		writeln('<HTML><HEAD><TITLE>'+imagetitle+'</TITLE></HEAD>');
		writeln('<BODY BGCOLOR="#000000" LINK="#666666" VLINK="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
		writeln('<a href="javascript:self.close();"><img src="'+imageurl+'" border="0" alt="'+imagetitle+'"></a>');
		writeln('</BODY></HTML>');
		close();
	}
	fenster.focus();
}

function __DoPostBack( )
{
	text.submit();
}

var hash = {
		  '.jpg'  : 1,
		  '.JPG'  : 1,
		  '.jpeg' : 1,
		  '.JPEG' : 1
};

function check_extension(filename) {
      var re = /\..+$/;
      var ext = filename.match(re);
      if (hash[ext]) {
        return true;
      } else {
        alert("Falsches Dateiformat - Nur JPG-Datein sind erlaubt!");

        return false;
      }
}

function autofillSecondDate() {
	
	//alert($("#txt_timestamp_to").val());
	if( $("#txt_timestamp_to").val() === "" )
	{
		$("#txt_timestamp_to").val($("#txt_timestamp").val())
	}
}

function showAndHide( element )
{
	element.toggle();
}