// Enter Javascript here
function openPrint(path)
{
	window.print();
}

function openPagemailer(path)
{
	pagemailer = window.open(path,"mail","width=500,height=400,resizable=no");
	pagemailer.focus();
}

function errorMsg(name,ext,cat)
{
  // alert("Netscape 6 or Mozilla is needed to install a sherlock plugin");
  f=document.createElement("form");
  f.setAttribute("name","installform");
  f.setAttribute("method","post");
  f.setAttribute("action","http://mycroft.mozdev.org/error.html");
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","name");
  fe.setAttribute("value",name);
  f.appendChild(fe);
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","ext");
  fe.setAttribute("value",ext);
  f.appendChild(fe);
  fe=document.createElement("input");
  fe.setAttribute("type","hidden");
  fe.setAttribute("name","cat");
  fe.setAttribute("value",cat);
  f.appendChild(fe);
  document.getElementsByTagName("body")[0].appendChild(f);
  if (document.installform) { 
    document.installform.submit();
  } else {
    location.href="http://mycroft.mozdev.org/error.html"; //hack for DOM-incompatible browsers
  }
}
function addEngine(name,ext,cat)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    //cat="Web";
    //cat=prompt("In what category should this engine be installed?","Web")
    window.sidebar.addSearchEngine(
      "http://mycroft.mozdev.org/plugins/"+name+".src",
      "http://mycroft.mozdev.org/plugins/"+name+"."+ext,
      name,
      cat );
  }
  else
  {
    errorMsg(name,ext,cat);
  }
}

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}




/***********************************************
* KALENDER
***********************************************/

function show_calender(idd) {
	var a = "../cms/templates/calendar/cal-date-select.php?idd="+idd;
	F2 = open(a,"Kalender","width=390,height=260,screenX=520,screenY=0");
}

function delete_confirm() {
	check = confirm("Wollen Sie diesen Termin wirklich löschen?");
	return check;
}
function insert_date(d) {
	f = opener.document.forms["p_input"].p_datum.value;
	if (f == "") { opener.document.forms["p_input"].p_datum.value = d; }
	else { opener.document.forms["p_input"].p_datum.value = f+";"+d; }

}