function forum_enter()
{
	window.location="index.php?command=hideall_content;user:show_content_login;forum:show_content_main;";
}

function goto_topic(category_id)
{
	window.location="index.php?command=hideall_content;user:show_content_login;forum:show_content_plist;category:forum="+category_id+";forum:initnavigation;navigation:show_content_default;";
}

function showMainContent(content_id,cat_id)
{
  if(content_id == -1) return;
  window.location = "index.php?command=hideall_content;menu:show_content_maincategorybox;menu:setmaincategory_"+cat_id+";editor:show_content_preview;editor:setcontent_"+content_id;
}

function nop()
{
}

function gallery_enter()
{
  window.location = "index.php?command=hideall_content,picturegallery:show_content_default";
}

function showContent(content_id,menu_id)
{
  switch(menu_id)
  {
    case  0: window.location = "index.php?command=hideall_content;menu:show_content_categorybox;editor:show_content_preview;editor:setcontent_"+content_id;
    break;

    case -1: window.location = "index.php?command=hideall_content;menu:show_content_categorybox;editor:show_content_preview;editor:setcontent_"+content_id;
    break;
    default:
       if(content_id == -1) window.location = "index.php?command=hideall_content;menu:show_content_category;menu:setcategory_"+menu_id+";menu:show_content_categorybox";
       else                 window.location = "index.php?command=hideall_content;menu:show_content_category;menu:setcategory_"+menu_id+";menu:show_content_categorybox;editor:show_content_preview;editor:setcontent_"+content_id;
  }
}
function goto_gallery(id)
{
	window.location="index.php?command=hideall_content;picturegallery:show_content_gallery;picturegallery:set_"+id;
}

function showWeekProg()
{
    window.location = "index.php?command=hideall_content;program:show_content_default";
}

function showLink(cat_id)
{
    window.location = "index.php?command=hideall_content;link:setcategory_"+cat_id+";link:show_content_default;";
}
function showXmas(cat_id)
{
    window.location = "index.php?command=hideall_content;xmas:setcategory_"+cat_id+";xmas:show_content_default;";
}
function showtoplist(cat_id)
{
    window.location = "index.php?command=hideall_content;toplist:setcategory_"+cat_id+";toplist:show_content_default;";
}

function showdownload()
{
    window.location = "index.php?command=hideall_content;download:show_content_default;";
}

function showNews(cat_id)
{
    if(cat_id == 6)
      window.location = "index.php?command=hideall_content;news:setcategory_"+cat_id+";news:initnav;news:show_content_default";
    else
      window.location = "index.php?command=hideall_content;news:setcategory_"+cat_id+";news:initnav;news:show_content_default;navigation:show_content_default;";
}
function showxmas(cat_id)
{
      window.location = "index.php?command=hideall_content;xmas:setcategory_1;xmas:initnav;xmas:show_content_default;navigation:show_content_default;";
}


function showNewsDetail(id)
{
    window.location = "index.php?command=hideall_content;news:setitem_"+id+";news:show_content_detailed;";
}

function showAlbumDetail(id)
{
    window.location = "index.php?command=hideall_content;album:setitem_"+id+";album:show_content_default;";
}

function showEvent(cat_id)
{
    window.location = "index.php?command=hideall_content;event:setcategory_"+cat_id+";event:show_content_default;event:setint_1";
}
function showAllEvent(cat_id)
{
    window.location = "index.php?command=hideall_content;event:setcategory_"+cat_id+";event:show_content_default;event:setint_4";
}

function showContent2(content_id,menu_id)
{
  window.location = "index.php?command=hideall_content;menu:setcategory_"+menu_id+";menu:show_content_categorybox;editor:show_content_preview;editor:setcontent_"+content_id;
}


function editContent(id)
{
    var u = "index.php?command=style:editor;hideall;editor:show_content_editor;editor:setcontent_"+id+";&popup=1"

    window.open(u,'editor','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=100,left=100,width=838,height=600');
}



function saveContent()
{
  document.editorform.style_a.value = styleArray;
  document.editorform.submit();
}

function changeContent()
{
  document.content.command.value = "editor:changecontent";
  document.content.submit();
}

function newContent()
{
  if(document.content.content_name.value == "") return;
  document.content.command.value = "content:newcontent";
  document.content.submit();
}

function modContent(id)
{
  if(document.content.content_name.value == "") return;
  document.content.command.value = "content:modify_"+id;
  document.content.submit();

}

function delContent(id)
{
  window.location = "index.php?command=content:del_"+id;
}

function changeGallery()
{
  document.gallery.command.value = "picturegallery:changegallery";
  document.gallery.submit();
}

function newGallery()
{
  if(document.gallery.gallery_name.value == "") return;
  document.gallery.command.value = "picturegallery:newgallery";
  document.gallery.submit();
}

function modGallery(id)
{
  if(document.gallery.gallery_name.value == "") return;
  document.gallery.command.value = "picturegallery:modify_"+id;
  document.gallery.submit();

}

function modGalleryDefault(id)
{
  if(document.gallery.gallery_name.value == "") return;
  document.gallery.command.value = "picturegallery:gallerydefault_"+id;
  document.gallery.submit();

}

function delGallery(id)
{
  window.location = "index.php?command=picturegallery:del_"+id;
}


function showGallery(id)
{
    var u = "index.php?command=style:popup;hideall;picturegallery:show_content_gallery;picturegallery:set_"+id+";&popup=1"

    window.open(u,'gallery','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=100,left=100,width=760,height=510');
}


function changeLink()
{
  document.link.command.value = "link:changelink";
  document.link.submit();
}

function newLink()
{
  document.link.command.value = "link:newlink";
  document.link.submit();
}

function changexmas()
{
  document.xmas.command.value = "xmas:changexmas";
  document.xmas.submit();
}

function newxmas()
{
  document.xmas.command.value = "xmas:newxmas";
  document.xmas.submit();
}

function changetoplist()
{
  document.toplist.command.value = "toplist:changetoplist";
  document.toplist.submit();
}

function newtoplist()
{
  document.toplist.command.value = "toplist:newtoplist";
  document.toplist.submit();
}

function changedownload()
{
  document.download.command.value = "download:changedownload";
  document.download.submit();
}

function newdownload()
{
  document.download.command.value = "download:newdownload";
  document.download.submit();
}

function changeNews()
{
  document.news.command.value = "news:changenews";
  document.news.submit();
}

function newNews()
{
  document.news.command.value = "news:newnews";
  document.news.submit();
}

function newWeekProgram()
{
  document.weekprogram.command.value = "program:newweekprogram";
  document.weekprogram.submit();
}

function delWeekProgram(id)
{
  document.weekprogram.command.value = "program:delweekprogram_"+id;
  document.weekprogram.submit();
}

function modLink(id)
{
  document.link.command.value = "link:modify_"+id;
  document.link.submit();
}
function modxmas(id)
{
  document.xmas.command.value = "xmas:modify_"+id;
  document.xmas.submit();
}

function modtoplist(id)
{
  document.toplist.command.value = "toplist:modify_"+id;
  document.toplist.submit();
}
function moddownload(id)
{
  document.download.command.value = "download:modify_"+id;
  document.download.submit();
}
function modNews(id)
{
  document.news.command.value = "news:modify_"+id;
  document.news.submit();
}

function delNews(id)
{
  window.location = "index.php?command=news:del_"+id;
}

function delLink(id)
{
  window.location = "index.php?command=link:del_"+id;
}
function delxmas(id)
{
  window.location = "index.php?command=xmas:del_"+id;
}

function showLink(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;link:show_content_default;link:setcategory_"+id;
}
function deltoplist(id)
{
  window.location = "index.php?command=toplist:del_"+id;
}

function showtoplist(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;toplist:show_content_default;toplist:setcategory_"+id;
}
function deldownload(id)
{
  window.location = "index.php?command=download:del_"+id;
}

function showdownload(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;download:show_content_default;download:setcategory_"+id;
}

function changeOrganization()
{
  document.organization.command.value = "organization:changeorganization";
  document.organization.submit();
}

function newOrganization()
{
  document.organization.command.value = "organization:neworganization";
  document.organization.submit();
}

function modOrganization(id)
{
  document.organization.command.value = "organization:modify_"+id;
  document.organization.submit();

}

function delOrganization(id)
{
  window.location = "index.php?command=organization:del_"+id;
}

function showOrganization(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;organization:show_content_default;organization:setcategory_"+id;
}

function changeInstitution()
{
  document.institution.command.value = "institution:changeinstitution";
  document.institution.submit();
}

function newInstitution()
{
  document.institution.command.value = "institution:newinstitution";
  document.institution.submit();
}

function modInstitution(id)
{
  document.institution.command.value = "institution:modify_"+id;
  document.institution.submit();

}

function delInstitution(id)
{
  window.location = "index.php?command=institution:del_"+id;
}

function showInstitution(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;institution:show_content_default;institution:setcategory_"+id;
}

function changeEvent()
{
  document.event.command.value = "event:changeevent";
  document.event.submit();
}

function newEvent()
{
  document.event.command.value = "event:newevent";
  document.event.submit();
}

function modEvent(id)
{
  document.event.command.value = "event:modify_"+id;
  document.event.submit();

}

function delEvent(id)
{
  window.location = "index.php?command=event:del_"+id;
}

function showEvent(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;event:show_content_default;event:setcategory_"+id;
}



function changeReport()
{
  document.report.command.value = "report:changereport";
  document.report.submit();
}

function newReport()
{
  document.report.command.value = "report:newreport";
  document.report.submit();
}

function modReport(id)
{
  document.report.command.value = "report:modify_"+id;
  document.report.submit();

}

function delReport(id)
{
  window.location = "index.php?command=report:del_"+id;
}

function showReport(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;report:show_content_default;report:setcategory_"+id;
}

function changeInformation()
{
  document.information.command.value = "information:changeinformation";
  document.information.submit();
}

function newInformation()
{
  document.information.command.value = "information:newinformation";
  document.information.submit();
}

function modInformation(id)
{
  document.information.command.value = "information:modify_"+id;
  document.information.submit();

}

function delInformation(id)
{
  window.location = "index.php?command=information:del_"+id;
}

function showInformation(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;information:show_content_default;information:setcategory_"+id;
}



function changeEducation()
{
  document.education.command.value = "education:changeeducation";
  document.education.submit();
}

function newEducation()
{
  document.education.command.value = "education:neweducation";
  document.education.submit();
}

function modEducation(id)
{
  document.education.command.value = "education:modify_"+id;
  document.education.submit();

}

function delEducation(id)
{
  window.location = "index.php?command=education:del_"+id;
}

function showEducation(id)
{
  window.location = "index.php?command=hideall_content;menu:show_content_categorybox;education:show_content_default;education:setcategory_"+id;
}



function newPicture()
{
  var v = "";
  var e = 0;
  if(document.picture.picture.value == "")  { v = "Adja meg a feltölteni kívánt képet!"; e = 1; }
  if(document.picture.picture_descr.value == "") { if(e == 1) {v += "\n"}; v += "Adja meg a képaláírást!"; }
  if(e == 1) { alert(v); return }

  document.picture.command.value = "picturegallery:upload";
  document.picture.submit();

}

function delPicture(id)
{
  document.picture.command.value = "picturegallery:delpicture_"+id;
  document.picture.submit();
}

function modPictureOrder(id,order,m)
{
  if (!m) neworder=prompt("Uj sorszam?",order); else neworder=order+m;
  if (neworder)
  {
    document.picture.neworder.value=neworder;
    modPicture(id);
  }
}

function modPicture(id)
{
  document.picture.command.value = "picturegallery:modpicture_"+id;
  document.picture.submit();
}

function modPictureAll()
{
  if(document.picture.descr.value!="")
    if(!confirm("Biztosan felülírja az összes kép aláírását ezzel:"+document.picture.descr.value)) return;
  document.picture.command.value = "picturegallery:modpictureall";
  document.picture.submit();
}

function goLevel(id_category, level)
{
  if(level == "") window.location =  "index.php?command=hideall_content;content:show_content_contentlist;content:setcategory_"+id_category
	if(level == 2) window.location =  "index.php?command=hideall_content;content:show_content_contentlist"+level+";content:setcategory_"+id_category
	if(level == 3) window.location =  "index.php?command=hideall_content;content:show_content_contentlist"+level+";content:setsubcategory_"+id_category

}

function authorize(id, t)
{
if(t == 1)   window.location =  "index.php?command=content:authorize_"+id;
else         window.location =  "index.php?command=content:cancel_"+id;
}

function authorizeEducation(id, t)
{
if(t == 1)   window.location =  "index.php?command=education:authorize_"+id;
else         window.location =  "index.php?command=education:cancel_"+id;
}

function authorizeInformation(id, t)
{
if(t == 1)   window.location =  "index.php?command=information:authorize_"+id;
else         window.location =  "index.php?command=information:cancel_"+id;
}

function authorizeReport(id, t)
{
if(t == 1)   window.location =  "index.php?command=report:authorize_"+id;
else         window.location =  "index.php?command=report:cancel_"+id;
}

function showRequest()
{
  window.location =  "index.php?command=hideall_content;request:show_content_admin";
}
function showSzieszta()
{
  window.location =  "index.php?command=hideall_content;szieszta:show_content_admin";
}
function showBday()
{
  window.location =  "index.php?command=hideall_content;bday:show_content_admin";
}
function showOf()
{
  window.location =  "index.php?command=hideall_content;of:show_content_admin";
}
function showWish()
{
  window.location =  "index.php?command=hideall_content;wish:show_content_admin";
}

function showMix()
{
  window.location =  "index.php?command=hideall_content;mix:show_content_admin";
}
function goto_registration()
{
  window.location="index.php?command=hideall_content;user:show_content_registration;";
}

function goto_forum(category_id)
{
  window.location="index.php?command=hideall_content;user:show_content_login;forum:show_content_tlist;category:forum="+category_id+";forum:inittopicnavigation;navigation:show_content_default;";
}
function goto_advert(category_id)
{
	window.location="index.php?command=hideall_content;user:show_content_login;advert:show_content_tlist;category:advert="+category_id;
}

  function newtopic()
  {
    document.newtopicform.command.value = "forum:newtopic";
    document.newtopicform.submit();
  }

  function topic_delete(topic_id)
  {
    window.location="index.php?command=forum:delete_topic_"+topic_id;
  }


  function goto_topic(category_id)
  {
    window.location="index.php?command=hideall_content;user:show_content_login;forum:show_content_plist;category:forum="+category_id+";forum:initnavigation;navigation:show_content_default;";
  }

