item_status = new Array();

function swapmenu(index) {
  if (item_status[index]==1) {
    document.getElementById('div'+index).style.display = "none";
    item_status[index]=0;
  } else {
    document.getElementById('div'+index).style.display = "block";
	item_status[index]=1;
  }
}

function swapstufe(index) {
  if (index==1) {
    document.getElementById('ski_stufe').style.display = "block";
    document.getElementById('snowboard_stufe').style.display = "none";
  } else {
    document.getElementById('ski_stufe').style.display = "none";
    document.getElementById('snowboard_stufe').style.display = "block";
  }
}


function swapanm() {
  if (document.frmConfigEdit.visible.checked) {
    document.getElementById('anm_conf_on').style.display = "block";
    document.getElementById('anm_conf_off').style.display = "none";
  } else {
    document.getElementById('anm_conf_on').style.display = "none";
    document.getElementById('anm_conf_off').style.display = "block";
  }
}


function nothing() {
  return;
}

function emoticon(text) {
	var txtarea = document.frmGBook.Eintrag;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
		txtarea.focus();
	} else {
		txtarea.value  += text;
		txtarea.focus();
	}
}

function lademarke() {
    file = document.form.briefmarke[document.form.briefmarke.selectedIndex].value;
    briefmarke2 = new Image;
    briefmarke2.src = '/pic/marke/'+ file;
    document.briefmarke.src = briefmarke2.src;
}

function user_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Benutzer '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/user&action=Del&id=' + status_id;
  }
}

function gbook_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Gästebuch eintrag von '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=gbook&action=Del&id=' + status_id;
  }
}

function gbook2_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Spezial Gästebuch eintrag von '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=gbook2&action=Del&id=' + status_id;
  }
}

function linkcat_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du die Link Kategorie '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/link&action=DelCat&id=' + status_id;
  }
}

function link_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Link '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/link&action=DelLink&id=' + status_id;
  }
}

function sponsor_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Sponsor '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/sponsoren&action=Del&id=' + status_id;
  }
}

function imagegroup_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du die Image Gruppe '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/pic/cat&action=DelGroup&id=' + status_id;
  }
}

function imagecat_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du die Image Kategorie '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/pic/cat&action=DelCat&id=' + status_id;
  }
}

function pic_delete(status_id, viewtyp, pagenr, idpic) {
  if (confirm("Bist du sicher, dass du dieses Bild und alle zugehörigen Objekte löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=pic&typ=2001&action=del&IDC=' + status_id + '&oldtyp=' + viewtyp + '&IDP=' + pagenr + '&IDI=' + idpic;
  }
}

function content_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Content '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/content&action=Del&pk_content_id=' + status_id;
  }
}

function termin_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Termin '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/termine&action=Del&id=' + status_id;
  }
}

function anm_del(status_id,config_id,status_str) {
  if (confirm("Bist du sicher, dass du die Anmeldung '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/anm&action=Del&id=' + status_id + '&idc=' + config_id;
  }
}

function anm_all_del(config_id) {
  if (confirm("Bist du sicher, dass du ALLE Anmeldungen löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adm/anm&action=DelAll&idc=' + config_id;
  }
}

function adr_sponsoren_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du die Sponsor Adresse '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adr/sponsoren&action=Del&id=' + status_id;
  }
}

function submenu_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du den Link '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=termine/submenu&action=Del&id=' + status_id;
  }
}


function leiter_del(status_id,status_str) {
  if (confirm("Bist du sicher, dass du die Leiter Adresse '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adr/leiter&action=Del&id=' + status_id;
  }
}

function member_del(status_id,status_id2,status_str) {
  if (confirm("Bist du sicher, dass du die Mitglieder Adresse '" + status_str + "' löschen möchtest ?")) {
    parent.frames['main'].location.href='?page=adr/member&action=Del&id=' + status_id + '&status=' + status_id2;
  }
}