

function text1_in(str) {
     d = document.getElementById("text1");
     d.innerHTML= '';
     d.innerHTML= str;
}

function text2_in(str) {
     d = document.getElementById("text2");
     d.innerHTML= '';
     d.innerHTML= str;
}

function text3_in(str) {
     d = document.getElementById("text3");
     d.innerHTML= '';
     d.innerHTML= str;
}

function text4_in(str) {
     d = document.getElementById("text4");
     d.innerHTML= '';
     d.innerHTML= str;
}


function Content_Buttons_Cancel_Edit()
{
	document.Content_Buttons.Content_Action.value = "cancel_edit";
	document.Content_Buttons.submit();
}

function Content_Buttons_Save()
{
	if (isHTMLMode) {
		alert("Please uncheck 'HTML'");
		return;
	}

	if (document.Content_Buttons.Content_Edited_Article.value == -1) 
	{
		if (document.Content_Buttons.Content_Menu[0].checked)
		{
			hid_save();
    			document.Content_Buttons.Content_Action.value = "save_content";
    			document.Content_Buttons.EDITARTICLE_content.value = oDiv.innerHTML;
    			document.Content_Buttons.submit();
		}
		else 
		if  (document.Content_Buttons.Content_Menu_Name.value != '')
		{
			hid_save();
    			document.Content_Buttons.Content_Action.value = "save_content";
    			document.Content_Buttons.EDITARTICLE_content.value = oDiv.innerHTML;
    			document.Content_Buttons.submit();
		}
		else alert('Please type a menu item name!');
	}
	else
	{
		hid_save();
		document.Content_Buttons.Content_Action.value = "save_content";
		document.Content_Buttons.EDITARTICLE_content.value = oDiv.innerHTML;
		document.Content_Buttons.submit();
	}
		
}

function Content_Buttons_Add()
{
	document.Content_Buttons.Content_Action.value = "add";
	document.Content_Buttons.submit();
}

function Content_Buttons_Save_As()
{
	document.Content_Buttons.Content_Action.value = "save_as";
	document.Content_Buttons.submit();
}

function Content_Buttons_Edit()
{
	document.Content_Buttons.Content_Action.value = "edit";
	document.Content_Buttons.submit();
}

function Content_Buttons_Delete()
{
	document.Content_Buttons.Content_Action.value = "delete";
	document.Content_Buttons.submit();
}


function Content_Buttons_History(article_id, app_path)
{
		window.open(app_path + 'ghosts/history.php?HISTORY_SECTION=article&HISTORY_ID=' + article_id);
}
//This are functions for box processing

function Content_Boxes_Buttons_History(box_id, app_path)
{
		window.open(app_path + 'ghosts/history.php?HISTORY_SECTION=box&HISTORY_ID=' + box_id);
}

function Content_Boxes_Buttons_Cancel_Edit()
{
	document.Content_Boxes_Buttons.Content_Boxes_Action.value = "cancel_edit";
	document.Content_Boxes_Buttons.submit();
}



function Content_Boxes_Buttons_Save()
{
 if (isHTMLMode) {
	alert("Please uncheck 'HTML'");
	return;
 }
 
 hid_save();

 ext_int_check();

 document.Content_Boxes_Buttons.BOXEDIT_article_id.value = "";
 document.Content_Boxes_Buttons.BOXEDIT_url.value = "";

 if (document.Content_Boxes_Buttons.BOXEDIT_box_type.selectedIndex == 0)	{
	document.Content_Boxes_Buttons.BOXEDIT_article_id.value = document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value;
 }
 else {
	document.Content_Boxes_Buttons.BOXEDIT_url.value = document.Content_Boxes_Buttons.BOXEDIT_url_show.value;
 }

 document.Content_Boxes_Buttons.Content_Boxes_Action.value = "save_content";
 document.Content_Boxes_Buttons.BOXEDIT_description.value = oDiv.innerHTML;



 document.Content_Boxes_Buttons.submit();
}




function Content_Boxes_Buttons_Add()
{
	document.Content_Boxes_Buttons.Content_Boxes_Action.value = "add";
	document.Content_Boxes_Buttons.Content_Boxes_Edited_Box.value = "-1";
	document.Content_Boxes_Buttons.submit();
}


function Content_Boxes_Buttons_Delete($deleted_box)
{
	document.Content_Boxes_Buttons.Content_Boxes_Action.value = "delete";
	if ($deleted_box == '') $deleted_box = -1;
	document.Content_Boxes_Buttons.Content_Boxes_Edited_Box.value = $deleted_box;
	document.Content_Boxes_Buttons.submit();
}
function Content_Boxes_Buttons_Edit($edited_box)
{
	document.Content_Boxes_Buttons.Content_Boxes_Action.value = "edit";
	if ($edited_box == '') $edited_box = -1;
	document.Content_Boxes_Buttons.Content_Boxes_Edited_Box.value = $edited_box;
	document.Content_Boxes_Buttons.submit();
}

function Content_Boxes_Buttons_Search_Article($search_file)
{
	var ret_val = showModalDialog($search_file,"","" );
	if (ret_val != '')
	{
		var ret_val1 = showModalDialog($search_file + '?' + ret_val,"","" );
		if ((ret_val1 != '') && (ret_val1 != null) && (ret_val1 != 'undefined'))
			document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value = ret_val1;
		int_box_link();
	}
}

function Content_Boxes_Buttons_Change_Box_Type()
{
	if (document.Content_Boxes_Buttons.BOXEDIT_box_type.selectedIndex > 0) {
		document.Content_Boxes_Buttons.BOXEDIT_box_link.value = 'http://' + document.Content_Boxes_Buttons.BOXEDIT_box_link.value;
	}
}

//This are functions for list processing


function Content_Lists_Buttons_Search_Article($search_file)
{
	var ret_val = showModalDialog($search_file,"","" );
	if (ret_val != '')
	{
		var ret_val1 = showModalDialog($search_file + '?' + ret_val,"","" );
		if ((ret_val1 != '') && (ret_val1 != null) && (ret_val1 != 'undefined'))
			document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value = ret_val1;
	}
}


function itemtype_ch($search_file){
if (document.Content_Lists_Buttons.elements['Content_Lists_list_item_type'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_item_type'].selectedIndex].value=="3")
   {  
    var props = 'status=yes,scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=600,height=300,top=100,left=200';
    select_doc = window.open('ghosts/select_doc_list.php', 'select_doc', props);
    select_doc.focus();
   }
  else
   alert("Bitte wählen Sie den Link-Typ 'Link zu einer Datei' aus!");
}

function Content_Lists_Buttons_History(list_id, app_path)
{
		window.open(app_path + 'ghosts/history.php?HISTORY_SECTION=list&HISTORY_ID=' + list_id);
}


function Content_Lists_Buttons_Cancel_Edit()
{
	document.Content_Lists_Buttons.Content_Lists_Action.value = "cancel_edit";
	document.Content_Lists_Buttons.submit();
}

function Content_Lists_Buttons_Save()
{
	hid_save();
	for(var i=0;i<document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].length;i++)
	{
			document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[i].selected = true;
			document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'].options[i].selected = true;
			document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'].options[i].selected = true;
			document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'].options[i].selected = true;
	}
	document.Content_Lists_Buttons.Content_Lists_Action.value = "save_content";
    document.Content_Lists_Buttons.submit();
}

function Content_Lists_Buttons_Add()
{
	document.Content_Lists_Buttons.Content_Lists_Action.value = "add";
	document.Content_Lists_Buttons.Content_Lists_Edited_List.value = "-1";
	document.Content_Lists_Buttons.submit();
}


function Content_Lists_Buttons_Delete($deleted_list)
{
	document.Content_Lists_Buttons.Content_Lists_Action.value = "delete";
	if ($deleted_list == '') $deleted_list = -1;
	document.Content_Lists_Buttons.Content_Lists_Edited_List.value = $deleted_list;
	document.Content_Lists_Buttons.submit();
}
function Content_Lists_Buttons_Edit($edited_list)
{
	document.Content_Lists_Buttons.Content_Lists_Action.value = "edit";
	if ($edited_list == '') $edited_list = -1;
	document.Content_Lists_Buttons.Content_Lists_Edited_List.value = $edited_list;
	document.Content_Lists_Buttons.submit();
}


function new_list_item()
{
	document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex = -1;
	oDiv.innerHTML = '';
	document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value = '';
	document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value = '';
	document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.focus();
}

function del_list_item()
{
	if (document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex>=0)
	{
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex] = null;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex] = null;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex] = null;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex] = null;
	}
	else alert('First select a list item');
}
function save_list_item()
{
	if (isHTMLMode) {
		alert("Please uncheck 'HTML'");
		return;
	}
	var item_opt = new Option(document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value, document.Content_Lists_Buttons.Content_Lists_list_item_type.value);
	var desc_opt = new Option(oDiv.innerHTML, oDiv.innerHTML);
	var link_opt = new Option(document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value, document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value);
	var headline_opt = new Option(document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value, document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value);

	if (document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex>=0)
	{
		document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value = document.Content_Lists_Buttons.Content_Lists_list_item_type.value;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].text = document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value = oDiv.innerHTML;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].text = oDiv.innerHTML;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value = document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].text = document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value = document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].text = document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value;
	}
	else
	{
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].length] = desc_opt;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].length] = link_opt;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].length] = headline_opt;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].length] = item_opt;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].length - 1].selected = true;
		document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].text = document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value;
	}

}


function list_item_clicked()
{
	if (document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex>=0)
	{
 	 var_dn1=document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value;
	 if (isHTMLMode) 
 	  oDiv.innerText = var_dn1.replace(/-qout-/g,'"');
	 else
	  oDiv.innerHTML = var_dn1.replace(/-qout-/g,'"');
	 document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value = document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value;
	 document.Content_Lists_Buttons.Content_Lists_list_item_headline_content.value = document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value;
	 document.Content_Lists_Buttons.Content_Lists_list_item_type.selectedIndex =  document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex].value - 1;
	}
}


function Menu_Buttons_History(app_path)
{
		window.open(app_path + 'ghosts/history.php?HISTORY_SECTION=menu&HISTORY_ID=' + document.Menu_Buttons.Menu_Edited_Item.value);
}

function Menu_Buttons_Edit()
{
	document.Menu_Buttons.Menu_Action.value = 'edit';
	document.Menu_Buttons.submit();
}
function Menu_Buttons_Delete()
{
	document.Menu_Buttons.Menu_Action.value = 'delete';
	document.Menu_Buttons.submit();
}
function Menu_Buttons_Del_Cancel()
{
	document.Menu_Buttons.Menu_Action.value = 'cancel';
	document.Menu_Buttons.submit();
}
function Menu_Buttons_Save()
{
	hid_save();
	for(var i=0;i<document.Menu_Editing_Form.elements['Menu_list_items[]'].length;i++)
	{

		document.Menu_Editing_Form.elements['Menu_list_items[]'].options[i].selected = true;
		document.Menu_Editing_Form.elements['Menu_list_items_name[]'].options[i].selected = true;
		document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'].options[i].selected = true;
		document.Menu_Editing_Form.elements['Menu_list_items_description[]'].options[i].selected = true;
		document.Menu_Editing_Form.elements['Menu_list_items_domain[]'].options[i].selected = true;
		document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[i].selected = true;;
		document.Menu_Editing_Form.elements['Menu_list_items_freigeben[]'].options[i].selected = true;
	}
	document.Menu_Editing_Form.Menu_Action.value = 'save';
	document.Menu_Editing_Form.submit();
}

function Menu_Buttons_Cancel()
{
	document.Menu_Editing_Form.Menu_Action.value = 'cancel';
	document.Menu_Editing_Form.submit();
}

function Menu_Buttons_Search_Article($search_file)
{
	new_new3333=window.open("/ghosts/article_search.php?spezial_js=Menu_Buttons_Search_Article_Set",'new_new3333', 'directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0,width=980,height=650,left=10,top=30');
	new_new3333.focus();
}

function Menu_Buttons_Search_Article_Set(id)
{
 document.Menu_Editing_Form.MENUEDIT_article_id.value=id;
}

function Menu_Buttons_Search_Sub_item_Article($search_file)
{
	new_new3333=window.open("/ghosts/article_search.php?spezial_js=Menu_Buttons_Search_Sub_item_Article_Set",'new_new3333', 'directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0,width=980,height=650,left=10,top=30');
	new_new3333.focus();
}

function Menu_Buttons_Search_Sub_item_Article_Set(id)
{
	document.Menu_Editing_Form.Menu_subitem_article_id.value = id;
menu_save_subitem()

}

function menu_item_clicked()
{
	if (document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex>=0)
	{
		var pos = document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex;
		document.Menu_Editing_Form.Menu_subitem_name.value = document.Menu_Editing_Form.elements['Menu_list_items_name[]'].options[pos].value;
		document.Menu_Editing_Form.Menu_subitem_article_id.value = document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'].options[pos].value;
		document.Menu_Editing_Form.Menu_subitem_description.value = document.Menu_Editing_Form.elements['Menu_list_items_description[]'].options[pos].value;
		//document.Menu_Editing_Form.Menu_subitem_domain_name.value = document.Menu_Editing_Form.elements['Menu_list_items_domain[]'].options[pos].value;
		if ((document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[pos].value != '') && (document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[pos].value != 0))
			document.Menu_Editing_Form.Menu_subitem_hidden.checked = true;
   		else
			document.Menu_Editing_Form.Menu_subitem_hidden.checked = false;

		if ((document.Menu_Editing_Form.elements['Menu_list_items_freigeben[]'].options[pos].value != '') && (document.Menu_Editing_Form.elements['Menu_list_items_freigeben[]'].options[pos].value != 0))
			document.Menu_Editing_Form.Menu_subitem_freigeben.checked = true;
   		else
			document.Menu_Editing_Form.Menu_subitem_freigeben.checked = false;
	}
}


function interchange(obj, pos1, pos2)
{
	var tmp_value = obj.options[pos1].value;
	var tmp_text = obj.options[pos1].text;

	if ((pos1 >=0) && (pos2 >= 0) && (pos1 < obj.length) && (pos2 < obj.length)) {
		obj.options[pos1].value = obj.options[pos2].value;
		obj.options[pos2].value = tmp_value;
		obj.options[pos1].text = obj.options[pos2].text;
		obj.options[pos2].text = tmp_text;
		for (var i=0; i<obj.options.length;i++){
			obj.options[i].selected = false;
			if (i == pos1) obj.options[pos1].selected = true;
		}
	}
}
function menu_move_subitem_up()
{
	if (document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex>=0)
	{
		var list = document.Menu_Editing_Form.elements['Menu_list_items[]'];
		var list1 = document.Menu_Editing_Form.elements['Menu_list_items_name[]'];
		var list2 = document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'];
		var list3 = document.Menu_Editing_Form.elements['Menu_list_items_description[]'];
		var list4 = document.Menu_Editing_Form.elements['Menu_list_items_domain[]'];
		var list5 = document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'];

		if (list.selectedIndex>0)
		{
			i = list.selectedIndex;
			interchange(list, i - 1, i);
			interchange(list1, i - 1, i);
			interchange(list2, i - 1, i);
			interchange(list3, i - 1, i);
			interchange(list4, i - 1, i);
			interchange(list5, i - 1, i);
		}
		else
		{
			i = list.length;
			interchange(list, i -1, 0);
			interchange(list1, i -1, 0);
			interchange(list2, i -1, 0);
			interchange(list3, i -1, 0);
			interchange(list4, i -1, 0);
			interchange(list5, i -1, 0);
		}
	}
	else alert('First select a menu subitem');
}

function menu_move_subitem_down()
{
	if (document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex>=0)
	{		
		var list = document.Menu_Editing_Form.elements['Menu_list_items[]'];
		var list1 = document.Menu_Editing_Form.elements['Menu_list_items_name[]'];
		var list2 = document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'];
		var list3 = document.Menu_Editing_Form.elements['Menu_list_items_description[]'];
		var list4 = document.Menu_Editing_Form.elements['Menu_list_items_domain[]'];
		var list5 = document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'];

		if (list.selectedIndex<list.length - 1)
		{
			i = list.selectedIndex;
			interchange(list, i + 1, i);
			interchange(list1, i + 1, i);
			interchange(list2, i + 1, i);
			interchange(list3, i + 1, i);
			interchange(list4, i + 1, i);
			interchange(list5, i + 1, i);
		}
		else
		{
			i = list.length - 1;
			interchange(list, 0, i);
			interchange(list1, 0, i);
			interchange(list2, 0, i);
			interchange(list3, 0, i);
			interchange(list4, 0, i);
			interchange(list5, 0, i);
		}
	}
	else alert('First select a menu subitem');
}

function menu_add_new_article()
{
	if (document.Menu_Editing_Form.MENUEDIT_add_new_article_id.checked)
	{
		document.Menu_Editing_Form.MENUEDIT_article_id.value = "";
	}
}

function menu_article_id_change()
{
	if (document.Menu_Editing_Form.MENUEDIT_article_id.value != "")
	{
		document.Menu_Editing_Form.MENUEDIT_add_new_article_id.checked = false;
	}
}

function menu_add_new_sub_article()
{
	if (document.Menu_Editing_Form.Menu_subitem_add_new_article_id.checked)
	{
		document.Menu_Editing_Form.Menu_subitem_article_id.value = "";
	}
}

function menu_sub_article_id_change()
{
	if (document.Menu_Editing_Form.Menu_subitem_article_id.value != "")
	{
		document.Menu_Editing_Form.Menu_subitem_add_new_article_id.checked = false;
	}
}


function  menu_new_subitem()
{
	document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex = -1;
	document.Menu_Editing_Form.Menu_subitem_name.value = '';
	document.Menu_Editing_Form.Menu_subitem_article_id.value = '';
	document.Menu_Editing_Form.Menu_subitem_description.value = '';
	//document.Menu_Editing_Form.Menu_subitem_domain_name.value = '';
	document.Menu_Editing_Form.Menu_subitem_hidden.checked = false;
	document.Menu_Editing_Form.Menu_subitem_add_new_article_id.checked = false;
	document.Menu_Editing_Form.Menu_subitem_add_new_article_id.checked = true;
	if (document.Menu_Editing_Form.Menu_subitem_freigeben) document.Menu_Editing_Form.Menu_subitem_freigeben.checked = true;
	document.Menu_Editing_Form.Menu_subitem_name.focus();
}

function  menu_save_subitem()
{
	if (document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex >= 0) {
		pos = document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex;
		document.Menu_Editing_Form.elements['Menu_list_items[]'].options[pos].text = document.Menu_Editing_Form.Menu_subitem_name.value;
		document.Menu_Editing_Form.elements['Menu_list_items_name[]'].options[pos].value = document.Menu_Editing_Form.Menu_subitem_name.value;
		document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'].options[pos].value = document.Menu_Editing_Form.Menu_subitem_article_id.value;
		document.Menu_Editing_Form.elements['Menu_list_items_description[]'].options[pos].value = document.Menu_Editing_Form.Menu_subitem_description.value;


		//document.Menu_Editing_Form.elements['Menu_list_items_domain[]'].options[pos].value = document.Menu_Editing_Form.Menu_subitem_domain_name.value;
		if (document.Menu_Editing_Form.Menu_subitem_hidden.checked)
			document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[pos].value = 1;
		else
			document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[pos].value = 0;

		if (document.Menu_Editing_Form.Menu_subitem_freigeben.checked)
			document.Menu_Editing_Form.elements['Menu_list_items_freigeben[]'].options[pos].value = 1;
		else
			document.Menu_Editing_Form.elements['Menu_list_items_freigeben[]'].options[pos].value = 0;
	}
	else {
		var item = new Option(document.Menu_Editing_Form.Menu_subitem_name.value, -1);
		var item1 = new Option(document.Menu_Editing_Form.Menu_subitem_name.value, document.Menu_Editing_Form.Menu_subitem_name.value);
		var item2 = new Option(document.Menu_Editing_Form.Menu_subitem_article_id.value, document.Menu_Editing_Form.Menu_subitem_article_id.value);
		var item3 = new Option(document.Menu_Editing_Form.Menu_subitem_description.value, document.Menu_Editing_Form.Menu_subitem_description.value);
		//var item4 = new Option(document.Menu_Editing_Form.Menu_subitem_domain_name.value, document.Menu_Editing_Form.Menu_subitem_domain_name.value);
		var item4 = new Option('','');
		if (document.Menu_Editing_Form.Menu_subitem_hidden.checked)
			var item5 = new Option(1,1);
		else
			var item5 = new Option(0,0);
		
		if (document.Menu_Editing_Form.Menu_subitem_freigeben.checked)
			var item6 = new Option(1,1);
		else
			var item6 = new Option(0,0);
		
		pos = document.Menu_Editing_Form.elements['Menu_list_items[]'].length;
		document.Menu_Editing_Form.elements['Menu_list_items[]'].options[pos] = item;
		document.Menu_Editing_Form.elements['Menu_list_items_name[]'].options[pos] = item1;
		document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'].options[pos] = item2;
		document.Menu_Editing_Form.elements['Menu_list_items_description[]'].options[pos] = item3;
		document.Menu_Editing_Form.elements['Menu_list_items_domain[]'].options[pos] = item4;
		document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[pos] = item5;
		document.Menu_Editing_Form.elements['Menu_list_items_freigeben[]'].options[pos] = item6;
		document.Menu_Editing_Form.elements['Menu_list_items[]'].options[pos].selected = true;
	}
}


function  menu_delete_subitem()
{
	if (document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex >= 0) {
		pos = document.Menu_Editing_Form.elements['Menu_list_items[]'].selectedIndex;

		document.Menu_Editing_Form.elements['Menu_list_items_name[]'].options[pos] = null;
		document.Menu_Editing_Form.elements['Menu_list_items_article_id[]'].options[pos] = null;
		document.Menu_Editing_Form.elements['Menu_list_items_description[]'].options[pos] = null;
		document.Menu_Editing_Form.elements['Menu_list_items_domain[]'].options[pos] = null;
		document.Menu_Editing_Form.elements['Menu_list_items_hidden[]'].options[pos] = null;
		document.Menu_Editing_Form.elements['Menu_list_items[]'].options[pos] = null;
	}
	else alert('First select an item');
}

function Light_Search()
{
	document.LightSearch_Form.LightSearch_Action.value='search';
	document.LightSearch_Form.submit();
}


function AnotherPageClick()
{
	if (document.ScrollDB.LIGHTSEARCH_see_this.options[document.ScrollDB.LIGHTSEARCH_see_this.selectedIndex].value != document.ScrollDB.LIGHTSEARCH_current_page.value)
	document.ScrollDB.submit();
}

function PreviousPageClick()
{
	document.ScrollDB.LIGHTSEARCH_see_this.value = (document.ScrollDB.LIGHTSEARCH_see_this.value*1) - 1;
	document.ScrollDB.submit();
}
function NextPageClick()
{
	document.ScrollDB.LIGHTSEARCH_see_this.value = (document.ScrollDB.LIGHTSEARCH_see_this.value*1) + 1;
	document.ScrollDB.submit();
}


function EventsAnotherPageClick()
{
	if (document.ScrollDB.EVENTSSEARCH_see_this.options[document.ScrollDB.EVENTSSEARCH_see_this.selectedIndex].value != document.ScrollDB.EVENTSSEARCH_current_page.value)
	document.ScrollDB.submit();
}
function EventsPreviousPageClick()
{
	document.ScrollDB.EVENTSSEARCH_see_this.options[document.ScrollDB.EVENTSSEARCH_see_this.selectedIndex].value = parseInt(document.ScrollDB.EVENTSSEARCH_see_this.options[document.ScrollDB.EVENTSSEARCH_see_this.selectedIndex].value, 10) - 1;
	document.ScrollDB.submit();
}
function EventsNextPageClick()
{
	document.ScrollDB.EVENTSSEARCH_see_this.options[document.ScrollDB.EVENTSSEARCH_see_this.selectedIndex].value = parseInt(document.ScrollDB.EVENTSSEARCH_see_this.options[document.ScrollDB.EVENTSSEARCH_see_this.selectedIndex].value,10) + 1;
	document.ScrollDB.submit();
}
function AnotherNewsPageClick()
{
	if (document.ScrollDB.NEWSLIST_see_this.options[document.ScrollDB.NEWSLIST_see_this.selectedIndex].value != document.ScrollDB.NEWSLIST_current_page.value)
	document.ScrollDB.submit();
}
function PreviousNewsPageClick()
{
	document.ScrollDB.NEWSLIST_see_this.options[document.ScrollDB.NEWSLIST_see_this.selectedIndex].value = parseInt(document.ScrollDB.NEWSLIST_see_this.options[document.ScrollDB.NEWSLIST_see_this.selectedIndex].value, 10) - 1;
	document.ScrollDB.submit();
}
function NextNewsPageClick()
{
	document.ScrollDB.NEWSLIST_see_this.options[document.ScrollDB.NEWSLIST_see_this.selectedIndex].value = parseInt(document.ScrollDB.NEWSLIST_see_this.options[document.ScrollDB.NEWSLIST_see_this.selectedIndex].value,10) + 1;
	document.ScrollDB.submit();
}
function AdvAnotherPageClick()
{
	if (document.Site_Map.ADVSEARCH_see_this.options[document.Site_Map.ADVSEARCH_see_this.selectedIndex].value != document.Site_Map.ADVSEARCH_current_page.value)
	document.Site_Map.submit();
}

function AdvPreviousPageClick()
{
	document.Search.SEARCH_ARTICLES_site_cur.value = (document.Search.SEARCH_ARTICLES_site_cur.value*1) - 1;
	document.Search.submit();
}
function AdvNextPageClick()
{
	document.Search.SEARCH_ARTICLES_site_cur.value = (document.Search.SEARCH_ARTICLES_site_cur.value*1) + 1;
	document.Search.submit();
}



function ChangeImageSource(img, new_src)
{
	img.src = new_src;
}

function PrevOut(img)
{
	img.src = "modules/shared/imgs/layout/prev.gif";
}
function PrevOver(img)
{
	img.src = "modules/shared/imgs/layout/prev_in.gif";
}
function NextOut(img)
{
	img.src = "modules/shared/imgs/layout/next.gif";
}
function NextOver(img)
{
	img.src = "modules/shared/imgs/layout/next_in.gif";
}
function list_move_subitem_up()
{
	if (document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex>=0)
	{
		var list  = document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'];
		var list1 = document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'];
		var list2 = document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'];
		var list3 = document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'];


		if (list.selectedIndex>0)
		{
			i = list.selectedIndex;
			interchange(list, i - 1, i);
			interchange(list1, i - 1, i);
			interchange(list2, i - 1, i);
			interchange(list3, i - 1, i);
		}
		else
		{
			i = list.length;
			interchange(list, i -1, 0);
			interchange(list1, i -1, 0);
			interchange(list2, i -1, 0);
			interchange(list3, i -1, 0);
		}
	}
	else alert('First select a list subitem');
}

function list_move_subitem_down()
{
	if (document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex>=0)
	{		
		var list  = document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'];
		var list1 = document.Content_Lists_Buttons.elements['Content_Lists_list_items_descriptions[]'];
		var list2 = document.Content_Lists_Buttons.elements['Content_Lists_list_items_link[]'];
		var list3 = document.Content_Lists_Buttons.elements['Content_Lists_list_items_headlines[]'];


		if (list.selectedIndex<list.length - 1)
		{
			i = list.selectedIndex;
			interchange(list, i + 1, i);
			interchange(list1, i + 1, i);
			interchange(list2, i + 1, i);
			interchange(list3, i + 1, i);
		}
		else
		{
			i = list.length - 1;
			interchange(list, 0, i);
			interchange(list1, 0, i);
			interchange(list2, 0, i);
			interchange(list3, 0, i);
		}
	}
	else alert('First select a list subitem');
}

function menu_button_over(but, img)
{
	but.src = img;
}

function menu_button_out(but, img)
{
  but.src = img;
}



function array_interchange(obj, pos1, pos2)
{
	var tmp_value = obj[pos1];

	if ((pos1 >=0) && (pos2 >= 0) && (pos1 < obj.length) && (pos2 < obj.length)) {
		obj[pos1] = obj[pos2];
		obj[pos2] = tmp_value;
	}
}

function project_move_person_up()
{

	if (document.Project_Edit.my_users.selectedIndex>=0)
	{
		var list = document.Project_Edit.my_users;
		var list1 = Project_Users;
		var list2 = Project_Users_Name;
		var list3 = Project_Assignment;
		var list4 = Project_Users_Department;
		var list5 = Project_Users_Department_Id;

		if (list.selectedIndex>0)
		{
			i = list.selectedIndex;
			interchange(list, i - 1, i);
			array_interchange(list1, i - 1, i);
			array_interchange(list2, i - 1, i);
			array_interchange(list3, i - 1, i);
			array_interchange(list4, i - 1, i);
			array_interchange(list5, i - 1, i);
		}
		else
		{
			i = list.length;
			interchange(list, i -1, 0);
			array_interchange(list1, i -1, 0);
			array_interchange(list2, i -1, 0);
			array_interchange(list3, i -1, 0);
			array_interchange(list4, i -1, 0);
			array_interchange(list5, i -1, 0);
		}
	}
	else alert('First select project person');
}

function project_move_person_down()
{
	if (document.Project_Edit.my_users.selectedIndex>=0)
	{		
		var list = document.Project_Edit.my_users;
		var list1 = Project_Users;
		var list2 = Project_Users_Name;
		var list3 = Project_Assignment;
		var list4 = Project_Users_Department;
		var list5 = Project_Users_Department_Id;

		if (list.selectedIndex<list.length - 1)
		{
			i = list.selectedIndex;
			interchange(list, i + 1, i);
			array_interchange(list1, i + 1, i);
			array_interchange(list2, i + 1, i);
			array_interchange(list3, i + 1, i);
			array_interchange(list4, i + 1, i);
			array_interchange(list5, i + 1, i);
		}
		else
		{
			i = list.length - 1;
			interchange(list, 0, i);
			array_interchange(list1, 0, i);
			array_interchange(list2, 0, i);
			array_interchange(list3, 0, i);
			array_interchange(list4, 0, i);
			array_interchange(list5, 0, i);
		}
	}
	else alert('First select project person');
}







// EYEGLOSS \\
// :::::::: welcher Browser ? ::::::::
if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}


//  ::::::::  PopUp-Texte (in Reihenfolge der Links) ::::::::
descarray = new Array(
"Link 0: Keine Informationen hinterlegt...",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_1-4.gif' width='350' height='24' border='0' alt=''><span class=s><br>Um die Verletzung mit einer frei laufenden Dissolverscheibe auszuschließen, schreibt die Maschinenrichtlinie 98/37/EG vor, dass jeder Dissolver über eine entsprechende Sicherheitseinrichtung verfügen muss. Diese besteht aus den Komponenten 1 bis 4:<br><br><strong>Komponente 1:</strong><br>Höhenverstellbares Teleskop-Wellenschutzrohr aus Edelstahl.</span>",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_1-4.gif' width='350' height='24' border='0' alt=''><span class=s><br><strong>Komponente 2:</strong><br>Höhenverstellbares Behälterspannsystem mit Gewindeverstellung.<br></span>",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_1-4.gif' width='350' height='24' border='0' alt=''><span class=s><br><strong>Komponente 3:</strong><br>Sicherheits-Endschalter - lässt nur eine Inbetriebnahme zu, wenn der Behälter festgespannt ist.<br></span>",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_1-4.gif' width='350' height='24' border='0' alt=''><span class=s><br><strong>Komponente 4:</strong><br>Sicherheits-Endschalter - ermöglicht die Inbetriebnahme nur, wenn sich die Dissolverscheibe innerhalb des Gefäßes befindet.<br></span>",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_ha.gif' width='350' height='24' border='0' alt=''><span class=s><br>Die Maschinenrichtlinie 98/37/EG schreibt vor, dass der Motor abgeschaltet werden muss, wenn sich das Dispergierwerkzeug außerhalb des Behälters befindet.<br><br><strong>Höhenmessung Ha</strong><br>Die Höhe der Dissolverscheibe wird permanent überwacht und im Display der Dissolversteuerung ausgegeben. Die sicherheitsrelevanten Schaltpunkte H1 und H2 können mit Hilfe der elektrischen Höhenverstellung angefahren und durch Drücken der Tasten H1 und H2 an der Dissolversteuerung gespeichert werden.<br><br>Die Innovation der integrierten Höhenmessung erlaubt den exakten Abstand zwischen Behälterboden und Dissolverscheibe zu reproduzieren um einen optimalen Dougnuteffekt zu erzielen.",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_ha.gif' width='350' height='24' border='0' alt=''><span class=s><br><img align='left' src='http://www.vma-getzmann.de/uploads/ftp/stativ/h1_h2.gif' width='100' height='80' border='0' alt=''><strong>Position H1</strong><br>Wenn die rotierende Dissolverscheibe beim Hochfahren die Position H1 erreicht, schalten der Hubmotor und der Hauptantriebsmotor ab. Der Dissolver ist nur Betriebsbereit, wenn sich die Dissolverscheibe zwischen H1 und H2 befindet.</span>",
"</center><img align='center' src='http://www.vma-getzmann.de/uploads/ftp/stativ/sd_ha.gif' width='350' height='24' border='0' alt=''><span class=s><br><img align='left' src='http://www.vma-getzmann.de/uploads/ftp/stativ/h1_h2.gif' width='100' height='80' border='0' alt=''><strong>Position H2</strong><br>H2 sollte so eingestellt sein, dass eine Berührung der Dissolverscheibe mit dem Behälterboden vermieden wird. Wenn die Dissolverscheibe beim Herabfahren die Position H2 erreicht, schaltet der Hubmotor ab.</span>"
);
//  :::::::: PopUp-Texte bis hier ::::::::


overdiv="0";

//  ::::::::  zeigt die PopUp-Box on einer  Tabelle ::::::::
function popLayer(a){
if(!descarray[a]){descarray[a]="<font color=ffffff>Dieses PopUp (#"+a+") ist nicht korrekt definiert - Beschreibung fehlt</font>";}
if (navigator.family == "gecko") {pad=0; bord="0 bordercolor=#ffffff";}
else {pad=1; bord=0;}
desc = "<table cellspacing=0 cellpadding="+pad+" border="+bord+" bgcolor='#ffffff' class=sbb<tr><td>\n"
        +"<table cellspacing=0 cellpadding=8 border=0 width=370><tr><td bgcolor='#c4c4c4' class=s><center>\n"
        +descarray[a]
        +"\n</td></tr></table>\n"
        +"</td></tr></table>";


if (navigator.appVersion.indexOf("MSIE ")>-1 || navigator.userAgent.indexOf("Opera")>-1)
{
	if(event.clientX) mouseX=event.clientX;
	if(event.clientY) mouseY=event.clientY;
	if (document.documentElement.scrollLeft) mouseX+=document.documentElement.scrollLeft;
	if (document.documentElement.scrollTop) mouseY+=document.documentElement.scrollTop;
}

document.getElementById("object1").innerHTML=desc;
document.getElementById("object1").style.left=(mouseX+22*1)+"px";
document.getElementById("object1").style.top=(mouseY-20*1)+"px";

}

//  :::::::: versteckt die PopUp-Box ::::::::
function hideLayer()
{
/*
if (overdiv == "0") {
        if(navigator.family =="nn4") {eval(document.object1.top="-500");}
        else if(navigator.family =="ie4"){object1.innerHTML="";}
        else if(navigator.family =="gecko") {document.getElementById("object1").style.top="-500";}
        }
*/

document.getElementById("object1").innerHTML="";
document.getElementById("object1").style.left="-20px";
document.getElementById("object1").style.top="-20px";

}


//  :::::::: überwacht Maus-Position / plaziert die Box dementsprechend ::::::::
// --deleted


function tril() {};

function popupinit (bilder_seiten_id)
{
	width=778;
  height=503;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	height_pos-=30;
	eval('select_dock=window.open("/modules/bildergalerie.php?bilder_seiten_id='+bilder_seiten_id+'","select_dock","directories=0,location=0,menubar=0,resizable=1, scrollbars=0,status=0,toolbar=0,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
	select_dock.focus();
}



function flash(str)
{
	document.write(str);
}

function suchen_click()
{
	if (document.suche.Search_text.value=="suchen ..." || document.suche.Search_text.value=="search..." ) document.suche.Search_text.value="";
}


function suchen_change(wort)
{
	if (document.suche.Search_text.value=="") document.suche.Search_text.value=wort;
}



// 08072501: Bildergallerie ----------------------------------------------------------------------------------- //
function bilder2_ch(bild_id)
{//ändert das große Bild
	bild_gross_array=bilder_array[bild_id].split("===");
	document.getElementById("bild_gross").innerHTML="<img src='http://www.vma-getzmann.de/"+bild_gross_array[1]+"' alt=''>";
	document.getElementById("bild_text").innerHTML=bild_gross_array[0];
}

function bilder2_klein_fill()
{
	str="";
	str_cache="";
	counter=bilder_array.length-1
	if (counter<6)
	{
		for(i=6;i>counter;i--)
		{
			str+='<div class="bilder">&nbsp;</div>';
		}
	}
	for(i=0;i<counter;i++)
	{
		css_class="bilder_klein";
		if (i==5 && counter==6) css_class="bilder_klein2";
		if (i==2 && counter==6) css_class="bilder_klein2";
		if (i==4 && counter==5) css_class="bilder_klein2";
		if (i==1 && counter==5) css_class="bilder_klein2";
		if (i==3 && counter==4) css_class="bilder_klein2";
		if (i==0 && counter==4) css_class="bilder_klein2";
		if (i==2 && counter==3) css_class="bilder_klein2";
		if (i==1 && counter==2) css_class="bilder_klein2";
		if (i==0 && counter==1) css_class="bilder_klein2";
		bild_klein_array=bilder_array[i].split("===");
		bild_gr=bild_klein_array[1];
		bild_klein_array[1]=bild_klein_array[1].replace(/\/uploads\/ftp2\//gi,"/uploads_thumbnails_3/ftp/");
		str+='<div class="bilder"><img src="http://www.vma-getzmann.de/'+bild_klein_array[1]+'.gif" alt="" class="'+css_class+'" onmouseover="bilder2_over_start(\''+i+'\')"></div>';
		//str+='<div class="bilder">'+i+'</div>';
		str_cache+='<img src="http://www.vma-getzmann.de/'+bild_gr+'">';
	}
 if (str!="") document.getElementById("bild_liste").innerHTML=str;
 if (str_cache!="" && document.getElementById("bild_cache")) document.getElementById("bild_cache").innerHTML=str_cache;
}






function bilder2_over_start(bild_id)
{
	timer2="";
	document.getElementById("bild_gross2").innerHTML=document.getElementById("bild_gross").innerHTML;
	set_alpha("bild_gross2",100)
	set_alpha("bild_gross",100)
	bilder2_ch(bild_id);
	alphawert=100;
	timer2=setTimeout('bilder2_over()',timer_sec);	
}

function bilder2_over()
{
	alphawert-=schrittweite;
	set_alpha("bild_gross2",alphawert)
	if (alphawert>1) timer2=setTimeout('bilder2_over()',timer_sec);	
}

function bilder2_out()
{
	bilder2_ch(0);
	set_alpha("bild_gross",100)
	set_alpha("bild_gross2",0)
}

function set_alpha(op,wert)
{
	if (is_ie) document.getElementById(op).style.filter="Alpha(opacity="+wert+", style=0)";
	if (is_safari || is_opera) document.getElementById(op).style.opacity=wert/100;
	if (is_firefox) document.getElementById(op).style.MozOpacity=wert/100;
}
//------------------------------------------------------------------------------------ 08072501: Bildergallerie //


//Bildchanger (Mail Freitag, 12. September 2008 14:55) ---------------------------------------------------------//

function bildchanger_start(bild)
{
	if (document.getElementById('oDiv')) return;		//im Adminbereich soll das nicht gehen

	set_alpha("bildchange_over",0)
	document.getElementById("bildchange_over").style.backgroundImage = "url("+bild+")";
	bildchanger_alpha(0)
}

function bildchanger_alpha(alpha)
{
	if (document.getElementById('oDiv')) return;		//im Adminbereich soll das nicht gehen

	if (is_ie) alpha=alpha*1+15;
	if (is_firefox) alpha=alpha*1+5;
	if (is_opera) alpha=alpha*1+5;
	if (is_safari) alpha=alpha*1+4;
	set_alpha("bildchange_over",alpha);
	if (alpha<100) alpha_timer=setTimeout("bildchanger_alpha("+alpha+")", 1);
}

function bildchanger_stop()
{
	if (document.getElementById('oDiv')) return;		//im Adminbereich soll das nicht gehen

	if (alpha_timer) clearTimeout(alpha_timer);
	set_alpha("bildchange_over",0)
}

function bildchanger_cache(bilder)
{
	bilder_array=bilder.split(",");

	str="";
	for(i=0;i<bilder_array.length;i++)
	{
		str+="<img src='"+bilder_array[i]+"'>\n"
	}

	self.document.write("<div id=\"bildchange_cache\">"+str+"</div>");
}


//---------------------------------------------------------Bildchanger (Mail Freitag, 12. September 2008 14:55) //

var alpha=0;
var alpha_timer=0;
is_safari=is_firefox=is_opera=is_ie=0;
ver=navigator.appVersion
agent=navigator.userAgent
if (ver.indexOf("MSIE")>-1) {is_ie=1;}
if (agent.indexOf("Opera")>-1) {is_opera=1;is_ie=0;}
if (agent.indexOf("Firefox")>-1) {is_firefox=1;}
if (agent.indexOf("Safari")>-1) {is_safari=1;}
if (is_safari==0 && is_firefox==0 && is_opera==0 && is_ie==0) is_opera=1;
var warenkopf_top=20;



function bar_over(zeiger)
{
	document.getElementById(zeiger).src=document.getElementById(zeiger).src.replace("_out.gif","_over.gif")
}

function bar_out(zeiger)
{
	document.getElementById(zeiger).src=document.getElementById(zeiger).src.replace("_over.gif","_out.gif")
}


//-------------------------------------- PDF Warenkorb --------------------------------------//
function pdfwarenkorb_hinzufuegen(article_id)
{
	document.pdfwarenkorbhidden.pdf_a_id.value=article_id;
	document.pdfwarenkorbhidden.add.value="yes";
	document.pdfwarenkorbhidden.submit();
}

function pdfwarenkorb_loeschen()
{
	document.pdfwarenkorb.del.value="yes";
	document.pdfwarenkorb.submit();
}

function pdfwarenkorb_position_minus()
{
	document.pdfwarenkorb.position.value="minus";
	document.pdfwarenkorb.submit();

//	if (document.getElementById("pdfwarenkorb_warenkorb_scroll").scrollHeight*1-114>0)
//	{
//		warenkopf_top--;
//		document.getElementById("pdfwarenkorb_warenkorb_scroll").style.top=warenkopf_top+"px";
//	}	

//	document.getElementById("pdfwarenkorb_warenkorb_scroll").style.top=;
}

function pdfwarenkorb_position_plus()
{
	document.pdfwarenkorb.position.value="plus";
	document.pdfwarenkorb.submit();
}


function pdfwarenkorb_fertig(warenkorb_session)
{
	width=400;
  height=200;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('select_fdock=window.open("/modules/pdfgesamt.php?erzeugen=yes&warenkorb_session='+warenkorb_session+'","select_fdock","scrollbars=1,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
	select_fdock.focus();

}

function pdfwarenkorb_fertig_french(warenkorb_session)
{
	width=400;
  height=200;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('select_fdock=window.open("/modules/pdfgesamt.php?erzeugen=yes&warenkorb_session='+warenkorb_session+'&domain=french_vmagetzmann_com","select_fdock","scrollbars=1,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
	select_fdock.focus();
}

function pdfwarenkorb_fertig_english(warenkorb_session)
{
	width=400;
  height=200;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('select_fdock=window.open("/modules/pdfgesamt.php?erzeugen=yes&warenkorb_session='+warenkorb_session+'&domain=english_vmagetzmann_com","select_fdock","scrollbars=1,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
	select_fdock.focus();

}

function pdfwarenkorb_fertig_russian(warenkorb_session)
{
	width=400;
  height=200;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('select_fdock=window.open("/modules/pdfgesamt.php?erzeugen=yes&warenkorb_session='+warenkorb_session+'&domain=russian_vmagetzmann_com","select_fdock","scrollbars=1,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
	select_fdock.focus();

}
//-------------------------------------------------------------------------------------------//

function printnow()
{
	self.print();
}

function donow(){}










function wind(width,height,scroll)
{
 width_pos=(screen.width/2)-(width/2);
 height_pos=(screen.height/2)-(height/1.5);
 if (height==600 || height==500) eval('a_new=window.open("","a_new","directories=0,location=0,menubar=0,resizable=1,scrollbars=='+scroll+',status=1,toolbar=0,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');    
 else eval('a_new=window.open("","a_new","directories=0,location=0,menubar=0,resizable=1,scrollbars='+scroll+',status=1,toolbar=0,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');    
 a_new.focus();
}


function druckversion(op)
{
 width=screen.width/2-350;
 height=screen.height/2-320;
 eval('druckwind=window.open("","druckwind","directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=1,width=700,height=500,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 druckwind.document.location.href="index.php?Show_this_article="+op+"&druckversion=on";
 druckwind.moveTo(width,height);
 druckwind.focus();
}

function druckversionhtml()
{
	url_=document.location.href;
	url_=url_.split("?");
	url_=url_[0];
	url_=url_.replace(".html","")+"_druck.html"
	url_=url_.replace("#top","");	
	width=screen.width/2-400;
	height=screen.height/2-320;
	eval('druckwind=window.open("","druckwind","directories=1,location=1,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1,width=800,height=500,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
	druckwind.document.location.href=url_;
	druckwind.moveTo(width,height);
	druckwind.focus();
}

function druckversionpdf()
{
return;
 url_=document.location.href;
 width=screen.width/2-475;
 height=screen.height/2-450;
 eval('druckwind=window.open("","druckwind","directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=1,width=950,height=700,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 url_=url_.replace(".html","")+".pdf";
 url_=url_.replace("/home/","/");
 url_=url_.replace(window.location.hostname,"");
 url_=url_.replace("http://","");
 url_="/modules/pdf_download.php?file="+url_;
 druckwind.document.location.href=url_
 //druckwind.moveTo(width,height);
 druckwind.focus();
}

function druckversionhtmllogin(op)
{
 url=document.location.href;
 width=screen.width/2-400;
 height=screen.height/2-320;
eval('druckwind=window.open("","druckwind","directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=1,width=800,height=500,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 druckwind.document.location.href=url.replace(".html","")+"_druck.html";
 druckwind.moveTo(width,height);
 druckwind.focus();
}

function ext_box_link2()
{
 if (document.Content_Boxes_Buttons.BOXEDIT_url_show.value!="") 
 {
  document.Content_Boxes_Buttons.BOXEDIT_url_show.value=document.Content_Boxes_Buttons.BOXEDIT_url_show.value.replace("http://","");
  document.Content_Boxes_Buttons.BOXEDIT_url_show.value="http://"+document.Content_Boxes_Buttons.BOXEDIT_url_show.value
  document.Content_Boxes_Buttons.BOXEDIT_box_type.selectedIndex=1;
 }
 ext_int_check();
}

function int_box_link()
{
 if (document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value!="") document.Content_Boxes_Buttons.BOXEDIT_box_type.selectedIndex=0;
 ext_int_check();
}

function ext_int_check()
{
 if (document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value==0) document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value="";
 if (document.Content_Boxes_Buttons.BOXEDIT_url_show.value!="" && document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value=="")    document.Content_Boxes_Buttons.BOXEDIT_box_type.selectedIndex=1;
 if (document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value!="" && document.Content_Boxes_Buttons.BOXEDIT_url_show.value=="") document.Content_Boxes_Buttons.BOXEDIT_box_type.selectedIndex=0;
}


var old_content_height;
var old_content_Width;

old_content_height=0;
old_content_Width=0;

function cont()
{
 content_height=window.innerHeight-187;
  if (content_height<1) content_height=1;
  if (old_content_height>window.innerHeight && navigator.appName=="Netscape") window.document.location.href=window.document.location.href;
  if (old_content_Width>window.innerWidth && navigator.appName=="Netscape") window.document.location.href=window.document.location.href;
  old_content_height=window.innerHeight;
  old_content_Width=window.innerWidth;
  document.getElementById('content').style.height=content_height+"px";
  timer=setTimeout("cont()", 1);
}



function cont2()
{
 content_height=window.innerHeight-200;
 if (content_height<1) content_height=1;
 if (old_content_height>window.innerHeight && navigator.appName=="Netscape") window.document.location.href=window.document.location.href;
 if (old_content_Width>window.innerWidth && navigator.appName=="Netscape") window.document.location.href=window.document.location.href;
 old_content_height=window.innerHeight;
 old_content_Width=window.innerWidth;
 document.getElementById('content').style.height=content_height+"px";
 timer=setTimeout("cont2()", 1);
}



function aktuelle_angebote()
{

 window.open('http://iha-hotelfuehrer.de/neu2/aktuelle_angebote.php?spr=d&url=hotelerie.modico.de//home/page_sta_1294.html','aktuelle_angbote_wind', 'directories=0,location=0,menubar=0,resizable=0,scrollbars=1,status=1,toolbar=0,width=400,height=480,left=320,top=150');

}

function Content_Buttons_Artikelcontent_Delete(article_id)
{
 width=screen.width/2-300;
 height=screen.height/2-110;
 eval('druckwind=window.open("","druckwind","directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,width=600,height=120,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 druckwind.document.location.href="/ghosts/article_content_delete.php?article_id="+article_id;
 druckwind.focus();
}

function hid_save()
{
if(document.getElementById("save")){
document.getElementById("save").style.cursor="normal";
document.getElementById("save").style.filter="Alpha(opacity=50, style=0)";
document.getElementById("save").onclick="";
}

if(document.getElementById("save2")){
document.getElementById("save2").style.cursor="normal";
document.getElementById("save2").style.filter="Alpha(opacity=50, style=0)";
document.getElementById("save2").onclick="";
}

if(document.getElementById("save3")){
document.getElementById("save3").style.cursor="normal";
document.getElementById("save3").style.filter="Alpha(opacity=50, style=0)";
document.getElementById("save3").onclick="";
}

if(document.getElementById("save4")){
document.getElementById("save4").style.cursor="normal";
document.getElementById("save4").style.filter="Alpha(opacity=50, style=0)";
document.getElementById("save4").onclick="";
}
}

function article_path(aid,path,col)
{
 width=screen.width/2-100;
 height=screen.height/2-100;
 eval('articlewind=window.open("","articlewind","directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,width=200,height=200,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 articlewind.document.location.href="/ghosts/article_path.php?aid="+aid+"&path="+path+"&col="+col;
 articlewind.moveTo(width,height);
 articlewind.focus();
}


function gen(a_id)
{
 width=520;
 height=100;
 width_pos=(screen.width/2)-(width/2);
 height_pos=(screen.height/2)-(height/1.5);
 eval('gen_new=window.open("","gen_new","directories=0,location=0,menubar=0,resizable=1,scrollbars=0,status=1,toolbar=0,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
  gen_new.focus();
 gen_new.document.location.href="/ghosts/gen.php?a_id="+a_id;
}


function boxzuordnung(a_id,col_id)
{
 width=480;
 height=550;
 width_pos=(screen.width/2)-(width/2);
 height_pos=(screen.height/2)-(height/1.5);
 eval('gen_new=window.open("","gen_new","directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');

 gen_new.focus();
 gen_new.document.location.href="/ghosts/boxes.php?a_id="+a_id+"&col_id="+col_id;
}


/////////////////////////////////////// Kontaktformular 2008 ///////////////////////////////////////
function kontakt_formular_2008_auswahl()
{
	document.getElementById("formular_2008_1").style.visibility="hidden";
	document.getElementById("formular_2008_1").style.height="1px";
	document.getElementById("formular_2008_2").style.visibility="hidden";
	document.getElementById("formular_2008_2").style.height="1px";
	document.getElementById("formular_2008_3").style.visibility="hidden";
	document.getElementById("formular_2008_3").style.height="1px";
	document.getElementById("formular_2008_4").style.visibility="hidden";
	document.getElementById("formular_2008_4").style.height="1px";
	document.getElementById("formular_2008_5").style.visibility="hidden";
	document.getElementById("formular_2008_5").style.height="1px";

	if(document.hidden.kontakt_kategorie.value==1)
	{
		document.getElementById("formular_2008_1").style.visibility="visible";
		document.getElementById("formular_2008_1").style.height="780px";
		document.formular_2008_1.elements['kontakt_kategorie'].selectedIndex=0;
	}
	if(document.hidden.kontakt_kategorie.value==2)
	{
		document.getElementById("formular_2008_2").style.visibility="visible";
		document.getElementById("formular_2008_2").style.height="720px";
		document.formular_2008_2.elements['kontakt_kategorie'].selectedIndex=1;
	}
	if(document.hidden.kontakt_kategorie.value==3)
	{
		document.getElementById("formular_2008_3").style.visibility="visible";
		document.getElementById("formular_2008_3").style.height="720px";
		document.formular_2008_3.elements['kontakt_kategorie'].selectedIndex=2;
		document.formular_2008_3.Betreff.value=Betreff3;
	}
	if(document.hidden.kontakt_kategorie.value==4)
	{
		document.getElementById("formular_2008_4").style.visibility="visible";
		document.getElementById("formular_2008_4").style.height="720px";
		document.formular_2008_4.elements['kontakt_kategorie'].selectedIndex=3;
		document.formular_2008_4.Betreff.value=Betreff4;
	}
	if(document.hidden.kontakt_kategorie.value==5)
	{
		document.getElementById("formular_2008_5").style.visibility="visible";
		document.getElementById("formular_2008_5").style.height="720px";
		document.formular_2008_5.elements['kontakt_kategorie'].selectedIndex=4;
	}


}
////////////////////////////////////////////////////////////////////////////////////////////////////






//function hoehe_ch(){}



//== Galerie-PopUp ==========================================================//
function bild_change2010_over(bild_id)
{//borderBottomColor
	bild_change2010_out();

	if (bild_id<4)
	{
		document.getElementById("bild"+bild_id).style.borderTopColor="#658DB1";
		document.getElementById("bild"+bild_id).style.borderLeftColor="#658DB1";
		document.getElementById("bild"+(bild_id*1+1*1)).style.borderLeftColor="#658DB1";
		document.getElementById("bild"+(bild_id*1+4*1)).style.borderTopColor="#658DB1";
	}
	if (bild_id==4)
	{
		document.getElementById("bild"+bild_id).style.borderTopColor="#658DB1";
		document.getElementById("bild"+bild_id).style.borderLeftColor="#658DB1";
		document.getElementById("bild"+bild_id).style.borderRightColor="#658DB1";
		document.getElementById("bild"+(bild_id*1+4*1)).style.borderTopColor="#658DB1";
	}
	if (bild_id>4 && bild_id<8)
	{
		document.getElementById("bild"+bild_id).style.borderTopColor="#658DB1";
		document.getElementById("bild"+bild_id).style.borderLeftColor="#658DB1";
		document.getElementById("bild"+bild_id).style.borderBottomColor="#658DB1";
		document.getElementById("bild"+(bild_id*1+1*1)).style.borderLeftColor="#658DB1";
	}
	if (bild_id==8)
	{
		document.getElementById("bild"+bild_id).style.borderColor="#658DB1";
	}
}

function bild_change2010_out()
{
	for(i=1;i<=8;i++) document.getElementById("bild"+i+"").style.borderColor="#DDDDDD";

	for(i=1;i<=kein_bild;i++) document.getElementById("bild"+i+"").style.borderColor="#ffffff";

	document.getElementById("bild1").style.borderLeftColor="#DDDDDD";
	document.getElementById("bild4").style.borderRightColor="#DDDDDD";
	document.getElementById("bild5").style.borderLeftColor="#DDDDDD";
	document.getElementById("bild5").style.borderBottomColor="#DDDDDD";
	document.getElementById("bild6").style.borderBottomColor="#DDDDDD";
	document.getElementById("bild7").style.borderBottomColor="#DDDDDD";
	document.getElementById("bild8").style.borderBottomColor="#DDDDDD";
	document.getElementById("bild8").style.borderRightColor="#DDDDDD";
	
}

//===========================================================================//




//== Bildergalerie innerhalb der Seite ======================================//
function bilder2_ch2010(bild_id)
{//ändert das große Bild
	bild_gross_array=bilder_array[bild_id].split("===");
	document.getElementById("bildgross_insite").innerHTML="<img src='http://www.vma-getzmann.de/"+bild_gross_array[1]+"' alt='' height=322 width=294>";
	document.getElementById("beschreibung_insite").innerHTML=bild_gross_array[0];
}

function bilder2_klein_fill2010()
{
	str="";
	str_cache="";

	//== leeren Bilder ========================================================//
	for(i=1;i<=kein_bild;i++)
	{
		str+='<img src="/layout/imgs/layout/trans50.gif" id="bild'+i+'" width="71" height="78">';
	}
	//=========================================================================//

	//== die normalen Bilder ==================================================//
	kein_bild++;
	for(i=kein_bild;i<=8;i++)
	{
		fromX_set=0;
		if (i==4 || i==8) fromX_set=-70;
		bild_klein_array=bilder_array[i-kein_bild].split("===");
		bild_gr=bild_klein_array[1];
		bild_klein=bild_klein_array[1].replace(/\/uploads\/ftp2\//gi,"/uploads_thumbnails_3/ftp/");
		str+='<a href="javascript:popupinit2010(\''+bilder_seiten_id+'\','+(i-kein_bild+1)+');bild_change2010_over('+i+');" onmouseover="bild_change2010_over('+i+');fromX='+fromX_set+';popUp(\''+mouseoverinfo+'\');bilder2_over_start2010(\''+(i-kein_bild)+'\');"  onmouseout="popOut();fromX=0;" ><img src="http://www.vma-getzmann.de/'+bild_klein+'.gif" id="bild'+i+'" width="71" height="78"></a>';
		str_cache+='<img src="http://www.vma-getzmann.de/'+bild_gr+'">';
	}
	//=========================================================================//

 if (str!="") document.getElementById("kleinebilder_insite").innerHTML=str;
 if (str_cache!="" && document.getElementById("bild_cache")) document.getElementById("bild_cache").innerHTML=str_cache;

}


function popupinit2010(bilder_seiten_id,position)
{
	width=778;
  height=503;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	height_pos-=30;
	eval('select_dock=window.open("/modules/bildergalerie.php?bilder_seiten_id='+bilder_seiten_id+'&sprache='+sprache+'&seite="+position+"","select_dock","directories=0,location=0,menubar=0,resizable=1, scrollbars=0,status=0,toolbar=0,width='+width+',height='+height+',left='+width_pos+',top='+height_pos+',screenX='+width_pos+',screenY='+height_pos+'");');
	select_dock.focus();
}


function bilder2_over_start2010(bild_id)
{
	timer2="";
	set_alpha("bildgross_insite2",100)
	set_alpha("bildgross_insite",100)
	document.getElementById("bildgross_insite2").innerHTML=document.getElementById("bildgross_insite").innerHTML;
	bilder2_ch2010(bild_id);
	alphawert=100;
	timer2=setTimeout('bilder2_over2010()',timer_sec);	
}

function bilder2_over2010()
{
	alphawert-=schrittweite;
	set_alpha("bildgross_insite2",alphawert)
	if (alphawert>1) timer2=setTimeout('bilder2_over2010()',timer_sec);	
}

function bilder2_over_start2010_popup(bild_id)
{
	timer2="";
	set_alpha("bildgrossdiv2",100)
	set_alpha("bildgrossdiv",100)
	document.getElementById("bildgrossdiv2").innerHTML=document.getElementById("bildgrossdiv").innerHTML;
	bilder2_ch2010popup(bild_id);
	alphawert=100;
	timer2=setTimeout('bilder2_over2010popup()',timer_sec);	
}

function bilder2_ch2010popup(bild_id)
{//ändert das große Bild
	bild_gross_array=bilder_array[bild_id].split("===");
	document.getElementById("bildgrossdiv").innerHTML="<img src='http://www.vma-getzmann.de/"+bild_gross_array[1]+"' alt='' height=440 width=400>";
	document.getElementById("beschreibung").innerHTML=bild_gross_array[0];
}

function bilder2_over2010popup()
{
	alphawert-=schrittweite;
	set_alpha("bildgrossdiv2",alphawert)
	if (alphawert>1) timer2=setTimeout('bilder2_over2010popup()',timer_sec);	
}

//===========================================================================//

