

function showCalendar(form,tag,monat,jahr,atag,amonat,ajahr,session)
{
	var widthpos=(screen.width/2)-200;
        var heightpos=(screen.height/2)-250;
	var calenderWin =  window.open("/admin/balkenumfragen/calendar.php?PHPSESSID="+session+"&m="+amonat+"&dj="+ajahr+"&form="+form+"&fieldtag="+tag+"&fieldmonat="+monat+"&fieldjahr="+jahr+"&atag="+atag+"&amonat="+amonat+"&ajahr="+ajahr, "calendar","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=210,height=210,left="+widthpos+",top="+heightpos);
	calenderWin.focus();
}

function datensenden(nr)
{ 
	document.forms[nr].submit();
}


function confirmDelete(confirmMsg)
{

    var is_confirmed = confirm(confirmMsg);
    if (is_confirmed) {
        return true;
    }

    return false;
}



function getQuickLogin(kuerzel,url)
{
  var cardwidth=150;
  var cardheight=200;
  var login = window.open("/"+kuerzel+"/quicklogin.php?url="+url,"quicklogin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+cardwidth+",height="+cardheight+",left=10,top=10");

}



function getDetail(id,cardwidth,cardheight)
{


  var windowscard = window.open("/ecardvorschau.php?id="+id,"ecard","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+cardwidth+",height="+cardheight+",left=10,top=10");

}


function getGalDetail(session,id,cardwidth,cardheight,rubrik,kuerzel)
{
  var windowscard = window.open("/galleriepreview.php?PHPSESSID="+session+"&id="+id+"&rubrik="+rubrik+"&kuerzel="+kuerzel,"ecard","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+cardwidth+",height="+cardheight+",left=10,top=10");
}


function getGalDetailMember(memberid,session,id,cardwidth,cardheight,rubrik,kuerzel)
{
  var windowscard = window.open("/galleriepreviewmember.php?member="+memberid+"&PHPSESSID="+session+"&id="+id+"&rubrik="+rubrik+"&kuerzel="+kuerzel,"ecard","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+cardwidth+",height="+cardheight+",left=10,top=10");
}

function getGalDetailPublic(session,id,cardwidth,cardheight,rubrik,kuerzel)
{
  var windowscard = window.open("/galleriepreviewpublic.php?PHPSESSID="+session+"&id="+id+"&rubrik="+rubrik+"&kuerzel="+kuerzel,"ecard","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+cardwidth+",height="+cardheight+",left=10,top=10");
}




function changeRubrik(url)
{
   location.href=url+"&rubrid="+document.getElementById("rubrikenchoice").value;
}


function changeAnimalRubrik(url)
{
   location.href=url+"&rubrik="+document.getElementById("rubrikenchoice").value;
}


function goLink(link)
{
 document.location.href=link;
}

function getFrameLink(link)
{
 document.detailframe.location.href=link;
}




function doNav(id)
{
 if(id!="subnavbgractive" && id!="logout")
 	document.getElementById(id).style.background="#ffffff";
}


function wegNav(id)
{
  if(id!="subnavbgractive" && id!="logout")	
 	document.getElementById(id).style.background="#ffffff";
}

function doHNav(id)
{
 	document.getElementById(id).style.background="#ffffff";
}


function wegHNav(id)
{	
 	document.getElementById(id).style.background="#EEF3FF";
}


		
function sendboxdata(box)
{
  document.forms['rightboxes'].boxtodo.value=box;
  document.forms['rightboxes'].submit();
}


function setCheckboxes(the_form, do_check)
{
    var elts      =  document.forms[the_form].elements['contblock[]'];
                  
    var elts_cnt  = (typeof(elts.length) != 'undefined')
                  ? elts.length
                  : 0;

    if (elts_cnt) {
        for (var i = 0; i < elts_cnt; i++) {
            elts[i].checked = do_check;
        } // end for
    } else {
        elts.checked        = do_check;
    } // end if... else

    return true;
} // end of the 'setCheckboxes()' function



function startRezeptSearch(err1,err2,err3,err4)
{

 if(document.forms["rezeptsuche"].stichworte.value=="")
 {
  alert(err1);
  document.forms["rezeptsuche"].stichworte.focus();
  return;
 }
 

 
 
document.forms["rezeptsuche"].submit();
}





function VoteRezept(err)
{

 if(document.forms['rezeptbewertung'].vote.value==0)
 {
  alert(err);
  return;
 }
 else
 {
  document.forms['rezeptbewertung'].submit();
 }

}

