function dono(){}

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;
	}

	seite=document.location.href.replace(/\&/gi,"&amp;");
	seite=seite.replace(/\//gi,"\\/");
	seite=seite.replace(/\?/gi,"\\?");
	eval('oDiv.innerHTML=oDiv.innerHTML.replace(/'+seite+'#/gi,"#");');

	oDiv.innerHTML=oDiv.innerHTML.replace(/class=linkmark/gi,"");

	oDiv.innerHTML=oDiv.innerHTML.replace(/PADDING-BOTTOM: 2px; BACKGROUND-COLOR: #ff9000; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px/gi,"");


  if (document.Content_Buttons.freigeben_ab_datum_jahr)
	{
	 datum=document.Content_Buttons.freigeben_ab_datum_jahr.options[document.Content_Buttons.freigeben_ab_datum_jahr.selectedIndex].value;
	 datum=datum+"-"+document.Content_Buttons.freigeben_ab_datum_monat.options[document.Content_Buttons.freigeben_ab_datum_monat.selectedIndex].value;
	 datum=datum+"-"+document.Content_Buttons.freigeben_ab_datum_tag.options[document.Content_Buttons.freigeben_ab_datum_tag.selectedIndex].value;
	 datum=datum+" "+document.Content_Buttons.freigeben_ab_uhrzeit.options[document.Content_Buttons.freigeben_ab_uhrzeit.selectedIndex].value;
	 document.Content_Buttons.EDITARTICLE_freigeben_ab.value=datum;

	 datum=document.Content_Buttons.entsperren_ab_datum_jahr.options[document.Content_Buttons.entsperren_ab_datum_jahr.selectedIndex].value;
	 datum=datum+"-"+document.Content_Buttons.entsperren_ab_datum_monat.options[document.Content_Buttons.entsperren_ab_datum_monat.selectedIndex].value;
	 datum=datum+"-"+document.Content_Buttons.entsperren_ab_datum_tag.options[document.Content_Buttons.entsperren_ab_datum_tag.selectedIndex].value;
	 datum=datum+" "+document.Content_Buttons.entsperren_ab_uhrzeit.options[document.Content_Buttons.entsperren_ab_uhrzeit.selectedIndex].value;
	 document.Content_Buttons.EDITARTICLE_entsperren_ab.value=datum;
	}

  if (document.Content_Buttons.EDITARTICLE_shop_nettopreis)
	{
		document.Content_Buttons.EDITARTICLE_shop_nettopreis.value=document.Content_Buttons.EDITARTICLE_shop_nettopreis.value.replace(",",".");
	}


	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();

  if (document.Content_Boxes_Buttons.BOXEDIT_loeschen_ab)
	{
	 datum=document.Content_Boxes_Buttons.loeschen_jahr.options[document.Content_Boxes_Buttons.loeschen_jahr.selectedIndex].value;
	 datum=datum+"-"+document.Content_Boxes_Buttons.loeschen_monat.options[document.Content_Boxes_Buttons.loeschen_monat.selectedIndex].value;
	 datum=datum+"-"+document.Content_Boxes_Buttons.loeschen_tag.options[document.Content_Boxes_Buttons.loeschen_tag.selectedIndex].value;
	 datum=datum+" "+document.Content_Boxes_Buttons.loeschen_uhrzeit.options[document.Content_Boxes_Buttons.loeschen_uhrzeit.selectedIndex].value;
	 document.Content_Boxes_Buttons.BOXEDIT_loeschen_ab.value=datum;
	}


 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()
{
	new_new3333=window.open("/ghosts/article_search.php?spezial_js=Content_Boxes_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 Content_Boxes_Buttons_Search_Article_Set(id)
{
  document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value = id;
	int_box_link();
}

function Content_Boxes_Buttons_pdf()
{
	var props = 'status=yes,scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=800,height=500,top=100,left=100';
	select_doc = window.open('/ghosts/file.php?js_str=Content_Boxes_Buttons_pdf_now', 'select_doc', props);
	select_doc.focus();
}

function Content_Boxes_Buttons_pdf_now(url)
{
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");

	document.Content_Boxes_Buttons.BOXEDIT_url_show.value=url;
	document.Content_Boxes_Buttons.BOXEDIT_article_id_show.value="";
	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()
{
	document.Content_Lists_Buttons.elements['Content_Lists_list_item_type'].options[0].selected=true;

	new_new3333=window.open("/ghosts/article_search.php?spezial_js=Content_Lists_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 Content_Lists_Buttons_Search_Article_Set(id)
{
	document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value = id;
	save_list_item();
}

function itemtype_ch()
{
	document.Content_Lists_Buttons.elements['Content_Lists_list_item_type'].options[2].selected=true;
	var props = 'status=yes,scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=800,height=500,top=100,left=200';
	select_doc = window.open('/ghosts/file.php?js_str=itemtype_ch_now', 'select_doc', props);
	select_doc.focus();
}

function itemtype_ch_now(url){
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")
   {  
		  url=url.replace(/\/\//gi, "\/");
		  url=url.replace(/\/\//gi, "\/");
  		url=url.replace(/\/\//gi, "\/");
  		url=url.replace(/\/\//gi, "\/");
    document.Content_Lists_Buttons.Content_Lists_list_item_linkto.value=url;

		save_list_item();

   }
}

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_descriptions[]'].options[document.Content_Lists_Buttons.elements['Content_Lists_list_items[]'].selectedIndex] = null;
		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_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 ArchiveNewsPageClick()
{
	if (document.ScrollDB.NEWSLIST_see_this)
		if (document.ScrollDB.NEWSLIST_see_this.selectedIndex!=-1)
			document.ScrollDB.NEWSLIST_see_this.options[document.ScrollDB.NEWSLIST_see_this.selectedIndex].value='';

	document.ScrollDB.submit();
}
function AdvAnotherPageClick()
{
	document.Search.SEARCH_ARTICLES_site_cur.value=document.Search.ADVSEARCH_see_this.options[document.Search.ADVSEARCH_see_this.selectedIndex].value
	document.Search.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');
}



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-390;
 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=780,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(op)
{
 url=document.location.href;
 width=screen.width/2-490;
 height=screen.height/2-400;
 eval('druckwind=window.open("","druckwind","directories=0,location=0,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1,width=990,height=580,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 url3=url.replace(/_mo/gi,"");
 url3=url3.replace("_kopf.html","");
 url3=url3.replace(".html","_druck.html");
 //alert(url3);

 if(url3.indexOf("/home/index.php")>0) url3="http://www.hotellerie.de/home/page_sta_1_druck.html";

 if (linkover!="") druckwind.document.location.href=url3+"?linkover="+linkover;
 if (linkover=="") druckwind.document.location.href=url3;


 druckwind.moveTo(width,height);
 druckwind.focus();
}

function druckversioniha(id,spr,bl,hid,nr,ort,pg)
{
 url="http://iha-hotelfuehrer.de/iha-hoteldaten/iha_hotel_druck.php?id="+id+"&spr="+spr+"&bl="+bl+"&hid="+hid+"&nr="+nr+"&ort="+ort+"&pg="+pg+"&druck=yes";
 width=screen.width/2-390;
 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=780,height=500,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 druckwind.document.location.href=url;
 druckwind.moveTo(width,height);
 druckwind.focus();
}


function druckversioniha2(hid,angebotid,id,kategorien,spr)
{
 url="http://iha-hotelfuehrer.de/iha-hoteldaten/iha_angebote_hotel_druck.php?hid="+hid+"&angebotid="+angebotid+"&id="+id+"&kategorien="+kategorien+"&spr="+spr;
 width=screen.width/2-390;
 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=780,height=500,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 druckwind.document.location.href=url;
 druckwind.moveTo(width,height);
 druckwind.focus();
}

function druckversioniha5(url)
{
 width=screen.width/2-390;
 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=780,height=500,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 druckwind.document.location.href=url;
 druckwind.moveTo(width,height);
 druckwind.focus();
}

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

function suchhilfe()
{
 url="/home/page_sta_3995.html";
 width=screen.width/2-490;
 height=screen.height/2-400;
 eval('druckwind=window.open("","druckwind","directories=0,location=0,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1,width=990,height=580,left='+width+',top='+height+',screenX='+width+',screenY='+height+'");');    
 url3=url.replace(/_mo/gi,"");
 url3=url3.replace("_kopf.html","");
 url3=url3.replace(".html","_druck.html");
 //alert(url3);

 if(url3.indexOf("/home/index.php")>0) url3="http://www.hotellerie.de/home/page_sta_1_druck.html";

 if (linkover!="") druckwind.document.location.href=url3+"?linkover="+linkover;
 if (linkover=="") druckwind.document.location.href=url3;


 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_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()
{
	var content_height=window.innerHeight-210;
	var content_wight=(window.innerWidth/2)-512;
	if (content_height<1) content_height=1;
	if (content_wight<2) content_wight=0;
	document.getElementById('obenover').style.left=content_wight+"px";
	document.getElementById('scroll').style.left=content_wight+"px";
	document.getElementById('scroll').style.height=content_height+"px";

	timer_cont=setTimeout("cont()", 100);
}

function cont_start()
{
	var content_height=window.innerHeight-210;
	var content_wight=(window.innerWidth/2)-512;
	if (content_height<1) content_height=1;
	if (content_wight<2) content_wight=0;
	
	document.writeln("<style rel=\"stylesheet\">");
	document.writeln("#obenover{left:"+content_wight+"px;}");
	document.writeln("#scroll{left:"+content_wight+"px;}");
	document.writeln("#scroll{height:"+content_height+"px;}");
	document.writeln("</style>");
}



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 cont3()
{
height=document.body.offsetHeight-200;
width=document.body.offsetWidth-2;
 document.getElementById('content').style.height=height+"px";
 document.getElementById('content').style.width=width+"px";
 timer=setTimeout("cont3()", 1);
// timer=setTimeout("document.location.href=document.location.href", 5000);
}



function cont2neu()
{
 content_height=window.innerHeight-145;
 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("cont2neu()", 1);
}

function cont3neu()
{
height=document.body.offsetHeight-145;
width=document.body.offsetWidth-2;
 document.getElementById('content').style.height=height+"px";
 document.getElementById('content').style.width=width+"px";
 timer=setTimeout("cont3neu()", 1);
// timer=setTimeout("document.location.href=document.location.href", 5000);
}




function aktuelle_angebote()
{
 window.open('http://www.iha-hotelfuehrer.de/iha-hoteldaten/aktuelle_angebote.php?spr=d&url=www.iha-hotelfuehrer.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 gen(a_id)
{
 width=580;
 height=250;
 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;
}



function pp_bild()
{
	var props = 'status=yes,scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=800,height=500,top=100,left=100';
	select_doc = window.open('/ghosts/file.php?js_str=pp_bild_now', 'select_doc', props);
	select_doc.focus();
}

function pp_bild_now(url)
{
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");

	document.Content_Buttons.EDITARTICLE_pp_bild.value=url;

}





/************************ pulldowns START ******************************/


function selectoeffnen(selectname)
{

	if (!document.getElementById(selectname)) return;


	if (document.getElementById(selectname).style.visibility=="hidden" || document.getElementById(selectname).style.visibility=="")
		document.getElementById(selectname).style.visibility="visible";
	else
		document.getElementById(selectname).style.visibility="hidden";

	//alert(selectname);
	//alert(document.getElementById(selectname).style.left);

}

function eigenschaften(op)
{
	str="";
	arr=op;
	var str_array = new Array("");
 	for (elm in arr) 
 	{
		str_array.push(elm+" = "+arr[elm]);
 	}
	str_array.sort();

 	for (elm in str_array) 
 	{
		str=str+str_array[elm]+" <br>\n";
 	}
  new_3233new56=window.open('','new_3233new56', '');
	new_3233new56.document.writeln(str);
  new_3233new56.focus();
}

function auswahl_machen(wert,feldname,divname,bez)
{
//	alert(feldname+"\n\n"+bez);

	eval ("document."+feldname+".value='"+wert+"'");
	document.getElementById(divname+"_bezeichnung").innerHTML=bez;

	if (feldname=="auswahloben.oben") document.auswahloben.submit();
	if (divname=="auswahlfeld_bilderdatenbank") bilderdatenbank(wert);
}

function auswahl_feld_positionierung(selectname,pixelhoehe,pixelbreite)
{
//	setleft=document.getElementById(selectname+"_oben").offsetLeft;
//	settop=document.getElementById(selectname+"_oben").offsetTop;
//	settop+=pixelhoehe;		
//	setleft+=pixelbreite;		
//	document.getElementById(selectname).style.left=setleft+"px";
//	document.getElementById(selectname).style.top=settop+"px";

	document.getElementById(selectname).style.left=pixelbreite+"px";
	document.getElementById(selectname).style.top=pixelhoehe+"px";

}


function auswahlfelderzeugen(divname,feldname,formname,auswahl_feld_wert)
{
	//erzeugt ein Pulldownfeld mit Divs
	//divname --> dort werden dann css-mässig die Eigenschaften definiert
	//feldname --> name des Feldes dessen Inhalt überhaubt geändert wird
	//auswahl_feld_wert --> dort stehen die Auswahlmöglichkeiten drin(mit Semikolon getrennt)
	//formname --> in welchem Form befindet sich das Feld was geändert werden soll


	auswahl_feld_werte_array=auswahl_feld_wert.split(";");

	werte_array=auswahl_feld_werte_array[0].split('#');
	wert=werte_array[0];
	bez=werte_array[1];

	str="";
	str+='<div id="'+divname+'_oben">\n';
	str+='	<div id="'+divname+'_click" onclick="selectoeffnen(\''+divname+'\')"></div>\n';
	str+='	<div id="'+divname+'_bezeichnung" onclick="selectoeffnen(\''+divname+'\')">'+bez+'</div>\n';
	str+='</div>\n';
	str+='<div id="'+divname+'">\n';
	str+='	<ul>\n';

	//die Werte auslesen
	for (i=1;i<auswahl_feld_werte_array.length;i++)
		{
			werte_array=auswahl_feld_werte_array[i].split('#');
			wert=werte_array[0];
			bez=werte_array[1];
			str+='		<li onmouseover="this.className=\'mouseover\'" onmouseout="this.className=\'mouseout\'" onclick="auswahl_machen(\''+wert+'\',\''+formname+'.'+feldname+'\',\''+divname+'\',\''+bez+'\');selectoeffnen(\''+divname+'\')">'+bez+'</li>\n';
		}
	str+='	</ul>\n';
	str+='</div>\n';

	//alert(str);

	document.writeln(str);


}
/************************ pulldowns ENDE *******************************/





/************************ news-scroll-liste START *******************************/
function hoch1()
{
 document.getElementById('newsdiv1').style.top=--akt_hoehe+"px";
 document.getElementById('newsdiv2').style.top=(akt_hoehe*1)+"px";
 document.getElementById('newsdiv3').style.top=(akt_hoehe*1)+"px";


 if (akt_hoehe>-100) timer=setTimeout("hoch1()", 12);
 else
 {

	document.getElementById('newsdiv1').innerHTML=document.getElementById('newsdiv2').innerHTML=document.getElementById('newsdiv3').innerHTML="";

  akt_hoehe=0;
	akt_anzahl--;
	if (akt_anzahl<0) akt_anzahl=anzahl;
 document.getElementById('newsdiv1').style.top="0px";
	document.getElementById('newsdiv1').innerHTML=arr_content[akt_anzahl];
	akt_anzahl++;
	if (akt_anzahl>anzahl) akt_anzahl=0;
 document.getElementById('newsdiv2').style.top="0px";
	document.getElementById('newsdiv2').innerHTML=arr_content[akt_anzahl];
	akt_anzahl++;
	if (akt_anzahl>anzahl) akt_anzahl=0;
 document.getElementById('newsdiv3').style.top="0px";
	document.getElementById('newsdiv3').innerHTML=arr_content[akt_anzahl];

  timer=setTimeout("hoch1()", 2000);
 }
}


function hoch2()
{
 document.getElementById('newsdiv2').style.top=--akt_hoehe+"px";
 if (akt_hoehe>-100) timer=setTimeout("hoch2()", 25);
 else
 {
  document.getElementById('newsdiv1').style.top="0px";
  document.getElementById('newsdiv2').style.top="100px";
  document.getElementById('newsdiv1').innerHTML=arr_content[akt_anzahl++];
  if (akt_anzahl>=anzahl) akt_anzahl=0;
  document.getElementById('newsdiv2').innerHTML=arr_content[akt_anzahl];
  akt_hoehe=100;
  timer=setTimeout("hoch3()", speedzwischen);
 }
}

function hoch3()
{
 document.getElementById('newsdiv2').style.top=--akt_hoehe+"px";

 if (akt_hoehe>0) timer=setTimeout("hoch3()", 25);
 else
 {
  akt_hoehe=0;
  timer=setTimeout("hoch1()", speedzwischen);
 }
}
/************************ news-scroll-liste ENDE *******************************/

/************************ MENÜÜÜÜ-scroll-liste START *******************************/

function menuhoch1()
{
 document.getElementById('menulistediv1').style.top=--akt_hoehe+"px";
 document.getElementById('menulistediv2').style.top=(akt_hoehe*1)+"px";
 document.getElementById('menulistediv3').style.top=(akt_hoehe*1)+"px";
 document.getElementById('menulistediv4').style.top=(akt_hoehe*1)+"px";


 if (akt_hoehe>-100) timer=setTimeout("menuhoch1()", 12);
 else
 {

	document.getElementById('menulistediv4').innerHTML=document.getElementById('menulistediv1').innerHTML=document.getElementById('menulistediv2').innerHTML=document.getElementById('menulistediv3').innerHTML="";

  akt_hoehe=0;
	akt_anzahl--;
	if (akt_anzahl<0) akt_anzahl=anzahl;
	akt_anzahl--;
	if (akt_anzahl<0) akt_anzahl=anzahl;
	document.getElementById('menulistediv1').style.top="0px";
	document.getElementById('menulistediv1').innerHTML=arr_content[akt_anzahl];
	akt_anzahl++;
	if (akt_anzahl>anzahl) akt_anzahl=0;
	document.getElementById('menulistediv2').style.top="0px";
	document.getElementById('menulistediv2').innerHTML=arr_content[akt_anzahl];
	akt_anzahl++;
	if (akt_anzahl>anzahl) akt_anzahl=0;
	document.getElementById('menulistediv3').style.top="0px";
	document.getElementById('menulistediv3').innerHTML=arr_content[akt_anzahl];
	akt_anzahl++;
	if (akt_anzahl>anzahl) akt_anzahl=0;
	document.getElementById('menulistediv4').style.top="0px";
	document.getElementById('menulistediv4').innerHTML=arr_content[akt_anzahl];

  timer=setTimeout("menuhoch1()", 2000);
 }
}

/*
function menuhoch1()
{
 document.getElementById('menulistediv1').style.top=--akt_hoehe+"px";
 if (akt_hoehe>-100) 
	timer=setTimeout("menuhoch1()", 25);
 else
 {
  akt_hoehe=0;
  timer=setTimeout("menuhoch2()", speedzwischen);
 }

}
*/
function menuhoch2()
{
 document.getElementById('menulistediv2').style.top=--akt_hoehe+"px";
 if (akt_hoehe>-100) timer=setTimeout("menuhoch2()", 25);
 else
 {
  akt_hoehe=0;
  timer=setTimeout("menuhoch3()", speedzwischen);
 }
}

function menuhoch3()
{
 document.getElementById('menulistediv3').style.top=--akt_hoehe+"px";
 if (akt_hoehe>-100) timer=setTimeout("menuhoch3()", 25);
 else
 {
	akt_anzahl--;
  document.getElementById('menulistediv1').innerHTML=arr_content[akt_anzahl++];
	if (akt_anzahl>=anzahl) akt_anzahl=0;
  document.getElementById('menulistediv2').innerHTML=arr_content[akt_anzahl++];
  if (akt_anzahl>=anzahl) akt_anzahl=0;
  document.getElementById('menulistediv3').innerHTML=arr_content[akt_anzahl];

	if (document.getElementById('menulistediv1').innerHTML=="undefined")document.getElementById('menulistediv1').innerHTML=arr_content[anzahl-1];

	document.getElementById('menulistediv1').style.top="0px";
  document.getElementById('menulistediv2').style.top="0px";
  document.getElementById('menulistediv3').style.top="100px";

	akt_hoehe=100
  timer=setTimeout("menuhoch4()", speedzwischen);
 }
}

function menuhoch4()
{
 document.getElementById('menulistediv3').style.top=--akt_hoehe+"px";
 if (akt_hoehe>0) timer=setTimeout("menuhoch4()", 1);
 else
 {
  akt_hoehe=0;
  timer=setTimeout("menuhoch1()", speedzwischen);
 }
}
/************************ MENÜÜÜÜ-scroll-liste ENDE *******************************/


/************************** die Listen *************************/
function listenbildover(op)
{
	document.getElementById('listenbild'+op).src="/layout/imgs/layout/round_pfeil2.gif";
}

function listenbildout(op)
{
	document.getElementById('listenbild'+op).src="/layout/imgs/layout/round_pfeil1.gif";
}




function navi()
{
	if (navigator.appName=="Microsoft Internet Explorer") of_wid=document.getElementById('obenover').offsetWidth-1004;
	else of_wid=window.innerWidth-1020;

	
	if (of_wid>0)	of_wid=of_wid/2;
	else of_wid=0;

	of_wid=parseInt(of_wid);
	of_wid=of_wid+778*1;
	document.getElementById('aznavi').style.left=of_wid+"px";
	timer=setTimeout("navi()", 10000);
}

/************************* PP Bilderwechsel ************************/
function ppdivch1()
{

	if (document.getElementById('ppdiv2').filters.alpha.opacity<1)
	{
		document.getElementById('ppdiv2').filters.alpha.opacity=0;
		document.getElementById('ppdiv2').style.visibility="hidden";
		i++;
		if (i>ppdiv.length-1) i=0;
		timer2=setTimeout("ppdivch2()", navizwischenspeed);
		return;
	}

//alert(ppdiv[i]);
	document.getElementById('ppdiv1').innerHTML=ppdiv[i];
	document.getElementById('ppdiv2').filters.alpha.opacity=document.getElementById('ppdiv2').filters.alpha.opacity-navischrittweite;
  timer=setTimeout("ppdivch1()", navispeed);
}

function ppdivch2()
{
	if (document.getElementById('ppdiv2').filters.alpha.opacity>99)
	{
		document.getElementById('ppdiv2').filters.alpha.opacity=100;
		i++;
		if (i>ppdiv.length-1) i=0;
		timer2=setTimeout("ppdivch1()", navizwischenspeed);
		return;
	}

	document.getElementById('ppdiv2').style.visibility="visible";
	document.getElementById('ppdiv2').innerHTML=ppdiv[i];
	document.getElementById('ppdiv2').filters.alpha.opacity=document.getElementById('ppdiv2').filters.alpha.opacity+navischrittweite;
  timer=setTimeout("ppdivch2()", navispeed);
}


function ppdivch1gecko()
{

	if (document.getElementById('ppdiv2').style.MozOpacity<0.1)
	{
		document.getElementById('ppdiv2').style.visibility="hidden";
		document.getElementById('ppdiv2').style.MozOpacity=0;
		document.getElementById('ppdiv1').style.MozOpacity=0.99;
		i++;
		if (i>ppdiv.length-1) i=0;
		timer2=setTimeout("ppdivch2gecko()", navizwischenspeed);
		return;
	}

	document.getElementById('ppdiv1').innerHTML=ppdiv[i];
	document.getElementById('ppdiv2').style.MozOpacity=document.getElementById('ppdiv2').style.MozOpacity*1-navischrittweite*1;
  timer=setTimeout("ppdivch1gecko()", navispeed);

}

function ppdivch2gecko()
{
	if (document.getElementById('ppdiv2').style.MozOpacity>0.8)
	{
		document.getElementById('ppdiv2').style.MozOpacity=0.99;
		i++;
		if (i>ppdiv.length-1) i=0;
		timer2=setTimeout("ppdivch1gecko()", navizwischenspeed);
		return;
	}

	document.getElementById('ppdiv2').style.visibility="visible";
	document.getElementById('ppdiv2').innerHTML=ppdiv[i];
	document.getElementById('ppdiv2').style.MozOpacity=document.getElementById('ppdiv2').style.MozOpacity*1+navischrittweite*1;
  timer=setTimeout("ppdivch2gecko()", navispeed);
}



function ppdivch1opera()
{

	if (document.getElementById('ppdiv2').style.opacity<0.1)
	{
		document.getElementById('ppdiv2').style.visibility="hidden";
		document.getElementById('ppdiv2').style.opacity=0;
		document.getElementById('ppdiv1').style.opacity=0.99;
		i++;
		if (i>ppdiv.length-1) i=0;
		timer2=setTimeout("ppdivch2opera()", navizwischenspeed);
		return;
	}

	document.getElementById('ppdiv1').innerHTML=ppdiv[i];
	document.getElementById('ppdiv2').style.opacity=document.getElementById('ppdiv2').style.opacity*1-navischrittweite*1;
  timer=setTimeout("ppdivch1opera()", navispeed);

}

function ppdivch2opera()
{

	if (document.getElementById('ppdiv2').style.opacity>0.8)
	{
		document.getElementById('ppdiv1').style.opacity=0.99;
		document.getElementById('ppdiv2').style.opacity=0.99;
		i++;
		if (i>ppdiv.length-1) i=0;
		timer2=setTimeout("ppdivch1opera()", navizwischenspeed);
		return;
	}

	document.getElementById('ppdiv2').style.visibility="visible";
	document.getElementById('ppdiv2').innerHTML=ppdiv[i];
	document.getElementById('ppdiv2').style.opacity=document.getElementById('ppdiv2').style.opacity*1+navischrittweite*1;
  timer=setTimeout("ppdivch2opera()", navispeed);
}
/*******************************************************************************************************************/


/* oben das Suchfeld */
function feldfill(op)
{
	if (op.value=="Bitte Suchbegriff eingeben") op.value="";
	if (op.value=="insert word") op.value="";
}
/**********************************************************************************************************************/

function dpicheck()
{
	document.writeln('<div id="dpicheck"></div>');
	document.getElementById('dpicheck').innerText="abc";

	weite=0;
	if (navigator.appName=="Microsoft Internet Explorer") weite=document.getElementById('dpicheck').offsetWidth;
	else weite=document.getElementById('dpicheck').innerWidth 

	if (weite>22) 
		{
			if (document.getElementById('content')) document.getElementById('content').style.marginRight="9px";
			if (document.getElementById('content')) document.getElementById('content').style.marginLeft="9px";
			if (document.getElementById('contentbreit')) document.getElementById('contentbreit').style.marginRight="8px";
			if (document.getElementById('contentbreit')) document.getElementById('contentbreit').style.marginLeft="8px";
			if (document.getElementById('steckbrief_html')) document.getElementById('steckbrief_html').style.marginRight="8px";
			if (document.getElementById('steckbrief_html')) document.getElementById('steckbrief_html').style.marginLeft="9px";
		}
	document.getElementById('dpicheck').style.visibility="hidden";
	document.getElementById('dpicheck').style.overflow="hidden";
}

function newsscroll()
{
	document.mailliste.von.value=document.mailliste.pagescroll.options[document.mailliste.pagescroll.selectedIndex].value
	document.mailliste.submit();
}

/*************************** Newsletterliste **************************/
function newsletterliste_jahre()
{
	if (document.mailliste.newsletter_pro_seite_start) document.mailliste.newsletter_pro_seite_start.value=0;
	document.mailliste.submit();
}

function newslistescroll()
{
	document.mailliste.newsletter_pro_seite_start.value=document.mailliste.pagescroll.options[document.mailliste.pagescroll.selectedIndex].value
	document.mailliste.submit();
}
		
function newslistescroll_zu(pos)
{
	document.mailliste.newsletter_pro_seite_start.value=pos;
	document.mailliste.submit();
}
/**********************************************************************/

/************************* HOTEL Bilderwechsel ************************/
function ppdivch1_b()
{
	if (document.getElementById('ppdiv2_b').filters.alpha.opacity<1)
	{
		document.getElementById('ppdiv2_b').filters.alpha.opacity=0;
		document.getElementById('ppdiv2_b').style.visibility="hidden";
		i_b++;
		if (i_b>ppdiv_b.length-1) i_b=0;
		timer2=setTimeout("ppdivch2_b()", navizwischenspeed_b);
		return;
	}
		if (i_b>ppdiv_b.length-1) i_b=0;


	document.getElementById('ppdiv1_b').innerHTML=ppdiv_b[i_b];
	document.getElementById('ppdiv2_b').filters.alpha.opacity=document.getElementById('ppdiv2_b').filters.alpha.opacity-navischrittweite_b;
  timer_b=setTimeout("ppdivch1_b()", navispeed_b);
}


function ppdivch2_b()
{
	if (document.getElementById('ppdiv2_b').filters.alpha.opacity>99)
	{
		document.getElementById('ppdiv2_b').filters.alpha.opacity=100;
		//document.getElementById('ppdiv1_b').filters.alpha.opacity=0;
		i_b++;
		if (i_b>ppdiv_b.length-1) i_b=0;
		timer_b2=setTimeout("ppdivch1_b()", navizwischenspeed_b);
		return;
	}

		if (i_b>ppdiv_b.length-1) i_b=0;
//alert(i+"-"+ppdiv_b.length);

	document.getElementById('ppdiv2_b').style.visibility="visible";
	document.getElementById('ppdiv2_b').innerHTML=ppdiv_b[i_b];
	document.getElementById('ppdiv2_b').filters.alpha.opacity=document.getElementById('ppdiv2_b').filters.alpha.opacity+navischrittweite_b;
  timer_b=setTimeout("ppdivch2_b()", navispeed_b);
}

function ppdivch1gecko_b()
{
	if (document.getElementById('ppdiv2_b').style.MozOpacity<0.1)
	{
		document.getElementById('ppdiv2_b').style.visibility="hidden";
		document.getElementById('ppdiv2_b').style.MozOpacity=0;
		document.getElementById('ppdiv1_b').style.MozOpacity=0.99;
		i_b++;
		if (i_b>ppdiv_b.length-1) i_b=0;
		timer_b2=setTimeout("ppdivch2gecko_b()", navizwischenspeed_b);
		return;
	}

	document.getElementById('ppdiv1_b').innerHTML=ppdiv_b[i_b];
	document.getElementById('ppdiv2_b').style.MozOpacity=document.getElementById('ppdiv2_b').style.MozOpacity*1-navischrittweite_b*1;

  timer_b=setTimeout("ppdivch1gecko_b()", navispeed_b);

}

function ppdivch2gecko_b()
{
	if (document.getElementById('ppdiv2_b').style.MozOpacity>0.8)
	{
		document.getElementById('ppdiv2_b').style.MozOpacity=0.99;
		i_b++;
		if (i_b>ppdiv_b.length-1) i_b=0;
		timer_b2=setTimeout("ppdivch1gecko_b()", navizwischenspeed_b);
		return;
	}

	document.getElementById('ppdiv2_b').style.visibility="visible";
	document.getElementById('ppdiv2_b').innerHTML=ppdiv_b[i_b];
	document.getElementById('ppdiv2_b').style.MozOpacity=document.getElementById('ppdiv2_b').style.MozOpacity*1+navischrittweite_b*1;
  timer_b=setTimeout("ppdivch2gecko_b()", navispeed);
}

function ppdivch1opera_b()
{
	if (document.getElementById('ppdiv2_b').style.opacity<0.1)
	{
		document.getElementById('ppdiv2_b').style.visibility="hidden";
		document.getElementById('ppdiv2_b').style.opacity=0;
		document.getElementById('ppdiv1_b').style.opacity=0.99;
		i_b++;
		if (i_b>ppdiv_b.length-1) i_b=0;
		timer_b2=setTimeout("ppdivch2opera_b()", navizwischenspeed_b);
		return;
	}

	document.getElementById('ppdiv1_b').innerHTML=ppdiv_b[i_b];
//document.getElementById('ppdiv1_b').innerHTML="test";
	document.getElementById('ppdiv2_b').style.opacity=document.getElementById('ppdiv2_b').style.opacity*1-navischrittweite_b*1;
  timer_b=setTimeout("ppdivch1opera_b()", navispeed_b);

}

function ppdivch2opera_b()
{
	if (document.getElementById('ppdiv2_b').style.opacity>0.8)
	{
		document.getElementById('ppdiv1_b').style.opacity=0;
		document.getElementById('ppdiv2_b').style.opacity=0.99;
		i_b++;
		if (i_b>ppdiv_b.length-1) i_b=0;
		timer_b2=setTimeout("ppdivch1opera_b()", navizwischenspeed_b);
		return;
	}

	document.getElementById('ppdiv2_b').style.visibility="visible";
	document.getElementById('ppdiv2_b').innerHTML=ppdiv_b[i_b];
//document.getElementById('ppdiv2_b').innerHTML="<table style=\"background-color:#ff0000;\"><tr><td><br>test2</td></tr></table>";
	document.getElementById('ppdiv2_b').style.opacity=document.getElementById('ppdiv2_b').style.opacity*1+navischrittweite_b*1;
//	document.getElementById('ppdiv1_b').style.opacity=document.getElementById('ppdiv1_b').style.opacity*1-navischrittweite_b*1;
  timer_b=setTimeout("ppdivch2opera_b()", navispeed_b);
}
/*******************************************************************************************************************/

/******************** IMPRESSIONEN 2008 Bilderwechsel ************************/
function ppdivch1_c()
{
	if (document.getElementById('ppdiv2_c').filters.alpha.opacity<1)
	{
		document.getElementById('ppdiv2_c').filters.alpha.opacity=0;
		document.getElementById('ppdiv2_c').style.visibility="hidden";
		i_c++;
		if (i_c>ppdiv_c.length-1) i_c=0;
		timer2=setTimeout("ppdivch2_c()", navizwischenspeed_c);
		return;
	}
		if (i_c>ppdiv_c.length-1) i_c=0;


	document.getElementById('ppdiv1_c').innerHTML=ppdiv_c[i_c];
	document.getElementById('ppdiv2_c').filters.alpha.opacity=document.getElementById('ppdiv2_c').filters.alpha.opacity-navischrittweite_c;
  timer_c=setTimeout("ppdivch1_c()", navispeed_c);
}

function ppdivch2_c()
{
	if (document.getElementById('ppdiv2_c').filters.alpha.opacity>99)
	{
		document.getElementById('ppdiv2_c').filters.alpha.opacity=100;
		//document.getElementById('ppdiv1_c').filters.alpha.opacity=0;
		i_c++;
		if (i_c>ppdiv_c.length-1) i_c=0;
		timer_c2=setTimeout("ppdivch1_c()", navizwischenspeed_c);
		return;
	}

		if (i_c>ppdiv_c.length-1) i_c=0;
//alert(i+"-"+ppdiv_c.length);

	document.getElementById('ppdiv2_c').style.visibility="visible";
	document.getElementById('ppdiv2_c').innerHTML=ppdiv_c[i_c];
	document.getElementById('ppdiv2_c').filters.alpha.opacity=document.getElementById('ppdiv2_c').filters.alpha.opacity+navischrittweite_c;
  timer_c=setTimeout("ppdivch2_c()", navispeed_c);
}

function ppdivch1gecko_c()
{
	if (document.getElementById('ppdiv2_c').style.MozOpacity<0.1)
	{
		document.getElementById('ppdiv2_c').style.visibility="hidden";
		document.getElementById('ppdiv2_c').style.MozOpacity=0;
		document.getElementById('ppdiv1_c').style.MozOpacity=0.99;
		i_c++;
		if (i_c>ppdiv_c.length-1) i_c=0;
		timer_c2=setTimeout("ppdivch2gecko_c()", navizwischenspeed_c);
		return;
	}

	document.getElementById('ppdiv1_c').innerHTML=ppdiv_c[i_c];
	document.getElementById('ppdiv2_c').style.MozOpacity=document.getElementById('ppdiv2_c').style.MozOpacity*1-navischrittweite_c*1;

  timer_c=setTimeout("ppdivch1gecko_c()", navispeed_c);

}

function ppdivch2gecko_c()
{
	if (document.getElementById('ppdiv2_c').style.MozOpacity>0.8)
	{
		document.getElementById('ppdiv2_c').style.MozOpacity=0.99;
		i_c++;
		if (i_c>ppdiv_c.length-1) i_c=0;
		timer_c2=setTimeout("ppdivch1gecko_c()", navizwischenspeed_c);
		return;
	}

	document.getElementById('ppdiv2_c').style.visibility="visible";
	document.getElementById('ppdiv2_c').innerHTML=ppdiv_c[i_c];
	document.getElementById('ppdiv2_c').style.MozOpacity=document.getElementById('ppdiv2_c').style.MozOpacity*1+navischrittweite_c*1;
  timer_c=setTimeout("ppdivch2gecko_c()", navispeed);
}


function ppdivch1opera_c()
{
	if (document.getElementById('ppdiv2_c').style.opacity<0.1)
	{
		document.getElementById('ppdiv2_c').style.visibility="hidden";
		document.getElementById('ppdiv2_c').style.opacity=0;
		document.getElementById('ppdiv1_c').style.opacity=0.99;
		i_c++;
		if (i_c>ppdiv_c.length-1) i_c=0;
		timer_c2=setTimeout("ppdivch2opera_c()", navizwischenspeed_c);
		return;
	}

	document.getElementById('ppdiv1_c').innerHTML=ppdiv_c[i_c];
	document.getElementById('ppdiv2_c').style.opacity=document.getElementById('ppdiv2_c').style.opacity*1-navischrittweite_c*1;
  timer_c=setTimeout("ppdivch1opera_c()", navispeed_c);

}

function ppdivch2opera_c()
{
	if (document.getElementById('ppdiv2_c').style.opacity>0.8)
	{
		document.getElementById('ppdiv1_c').style.opacity=0.99;
		document.getElementById('ppdiv2_c').style.opacity=0.99;
		i_c++;
		if (i_c>ppdiv_c.length-1) i_c=0;
		timer_c2=setTimeout("ppdivch1opera_c()", navizwischenspeed_c);
		return;
	}

	document.getElementById('ppdiv2_c').style.visibility="visible";
	document.getElementById('ppdiv2_c').innerHTML=ppdiv_c[i_c];
	document.getElementById('ppdiv2_c').style.opacity=document.getElementById('ppdiv2_c').style.opacity*1+navischrittweite_c*1;
  timer_c=setTimeout("ppdivch2opera_c()", navispeed_c);
}
/*******************************************************************************************************************/

/************************* HOTEL Bilderwechsel ************************/
function ppdivch1_d()
{
	if (document.getElementById('ppdiv2_d').filters.alpha.opacity<1)
	{
		document.getElementById('ppdiv2_d').filters.alpha.opacity=0;
		document.getElementById('ppdiv2_d').style.visibility="hidden";
		i_d++;
		if (i_d>ppdiv_d.length-1) i_d=0;
		timer2=setTimeout("ppdivch2_d()", navizwischenspeed_d);
		return;
	}
		if (i_d>ppdiv_d.length-1) i_d=0;

	document.getElementById('ppdiv1_d').innerHTML=ppdiv_d[i_d];
	document.getElementById('ppdiv2_d').filters.alpha.opacity=document.getElementById('ppdiv2_d').filters.alpha.opacity-navischrittweite_d;
  timer_d=setTimeout("ppdivch1_d()", navispeed_d);
}

function ppdivch2_d()
{
	if (document.getElementById('ppdiv2_d').filters.alpha.opacity>99)
	{
		document.getElementById('ppdiv2_d').filters.alpha.opacity=100;
		//document.getElementById('ppdiv1_d').filters.alpha.opacity=0;
		i_d++;
		if (i_d>ppdiv_d.length-1) i_d=0;
		timer_d2=setTimeout("ppdivch1_d()", navizwischenspeed_d);
		return;
	}
		if (i_d>ppdiv_d.length-1) i_d=0;
//alert(i+"-"+ppdiv_d.length);

	document.getElementById('ppdiv2_d').style.visibility="visible";
	document.getElementById('ppdiv2_d').innerHTML=ppdiv_d[i_d];
	document.getElementById('ppdiv2_d').filters.alpha.opacity=document.getElementById('ppdiv2_d').filters.alpha.opacity+navischrittweite_d;
  timer_d=setTimeout("ppdivch2_d()", navispeed_d);
}


function ppdivch1gecko_d()
{
	if (document.getElementById('ppdiv2_d').style.MozOpacity<0.1)
	{
		document.getElementById('ppdiv2_d').style.visibility="hidden";
		document.getElementById('ppdiv2_d').style.MozOpacity=0;
		document.getElementById('ppdiv1_d').style.MozOpacity=0.99;
		i_d++;
		if (i_d>ppdiv_d.length-1) i_d=0;
		timer_d2=setTimeout("ppdivch2gecko_d()", navizwischenspeed_d);
		return;
	}

	document.getElementById('ppdiv1_d').innerHTML=ppdiv_d[i_d];
	document.getElementById('ppdiv2_d').style.MozOpacity=document.getElementById('ppdiv2_d').style.MozOpacity*1-navischrittweite_d*1;
  timer_d=setTimeout("ppdivch1gecko_d()", navispeed_d);
}

function ppdivch2gecko_d()
{
	if (document.getElementById('ppdiv2_d').style.MozOpacity>0.8)
	{
		document.getElementById('ppdiv2_d').style.MozOpacity=0.99;
		i_d++;
		if (i_d>ppdiv_d.length-1) i_d=0;
		timer_d2=setTimeout("ppdivch1gecko_d()", navizwischenspeed_d);
		return;
	}

	document.getElementById('ppdiv2_d').style.visibility="visible";
	document.getElementById('ppdiv2_d').innerHTML=ppdiv_d[i_d];
	document.getElementById('ppdiv2_d').style.MozOpacity=document.getElementById('ppdiv2_d').style.MozOpacity*1+navischrittweite_d*1;
  timer_d=setTimeout("ppdivch2gecko_d()", navispeed_d);
}

function ppdivch1opera_d()
{
	if (document.getElementById('ppdiv2_d').style.opacity<0.1)
	{
		document.getElementById('ppdiv2_d').style.visibility="hidden";
		document.getElementById('ppdiv2_d').style.opacity=0;
		document.getElementById('ppdiv1_d').style.opacity=0.99;
		i_d++;
		if (i_d>ppdiv_d.length-1) i_d=0;
		timer_d2=setTimeout("ppdivch2opera_d()", navizwischenspeed_d);
		return;
	}
	document.getElementById('ppdiv1_d').innerHTML=ppdiv_d[i_d];
	document.getElementById('ppdiv2_d').style.opacity=document.getElementById('ppdiv2_d').style.opacity*1-navischrittweite_d*1;
  timer_d=setTimeout("ppdivch1opera_d()", navispeed_d);

}

function ppdivch2opera_d()
{

	if (document.getElementById('ppdiv2_d').style.opacity>0.8)
	{
		document.getElementById('ppdiv1_d').style.opacity=0;
		document.getElementById('ppdiv2_d').style.opacity=0.99;
		i_d++;
		if (i_d>ppdiv_d.length-1) i_d=0;
		timer_d2=setTimeout("ppdivch1opera_d()", navizwischenspeed_d);
		return;
	}

	document.getElementById('ppdiv2_d').style.visibility="visible";
	document.getElementById('ppdiv2_d').innerHTML=ppdiv_d[i_d];
	document.getElementById('ppdiv2_d').style.opacity=document.getElementById('ppdiv2_d').style.opacity*1+navischrittweite_d*1;
  timer_d=setTimeout("ppdivch2opera_d()", navispeed_d);
}
/*******************************************************************************************************************/

/************************* Reduzierter Mehrwertsteuersatz **********************************************************/
function ppdivch1_mwst()
{
	if (document.getElementById('ppdiv2_mwst').filters.alpha.opacity<1)
	{
		document.getElementById('ppdiv2_mwst').filters.alpha.opacity=0;
		document.getElementById('ppdiv2_mwst').style.visibility="hidden";
		i_mwst++;
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
		timer2=setTimeout("ppdivch2_mwst()", navizwischenspeed_mwst);
		return;
	}
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;

	document.getElementById('ppdiv1_mwst').innerHTML=ppdiv_mwst[i_mwst];
	document.getElementById('ppdiv2_mwst').filters.alpha.opacity=document.getElementById('ppdiv2_mwst').filters.alpha.opacity-navischrittweite_mwst;
  timer_mwst=setTimeout("ppdivch1_mwst()", navispeed_mwst);
}

function ppdivch2_mwst()
{
	if (document.getElementById('ppdiv2_mwst').filters.alpha.opacity>99)
	{
		document.getElementById('ppdiv2_mwst').filters.alpha.opacity=100;
		//document.getElementById('ppdiv1_mwst').filters.alpha.opacity=0;
		i_mwst++;
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
		timer_mwst2=setTimeout("ppdivch1_mwst()", navizwischenspeed_mwst);
		return;
	}

		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
//alert(i+"-"+ppdiv_mwst.length);

	document.getElementById('ppdiv2_mwst').style.visibility="visible";
	document.getElementById('ppdiv2_mwst').innerHTML=ppdiv_mwst[i_mwst];
	document.getElementById('ppdiv2_mwst').filters.alpha.opacity=document.getElementById('ppdiv2_mwst').filters.alpha.opacity+navischrittweite_mwst;
  timer_mwst=setTimeout("ppdivch2_mwst()", navispeed_mwst);
}

function ppdivch1gecko_mwst()
{
	if (document.getElementById('ppdiv2_mwst').style.MozOpacity<0.1)
	{
		document.getElementById('ppdiv2_mwst').style.visibility="hidden";
		document.getElementById('ppdiv2_mwst').style.MozOpacity=0;
		document.getElementById('ppdiv1_mwst').style.MozOpacity=0.99;
		i_mwst++;
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
		timer_mwst2=setTimeout("ppdivch2gecko_mwst()", navizwischenspeed_mwst);
		return;
	}

	document.getElementById('ppdiv1_mwst').innerHTML=ppdiv_mwst[i_mwst];
	document.getElementById('ppdiv2_mwst').style.MozOpacity=document.getElementById('ppdiv2_mwst').style.MozOpacity*1-navischrittweite_mwst*1;

  timer_mwst=setTimeout("ppdivch1gecko_mwst()", navispeed_mwst);

}

function ppdivch2gecko_mwst()
{
	if (document.getElementById('ppdiv2_mwst').style.MozOpacity>0.8)
	{
		document.getElementById('ppdiv2_mwst').style.MozOpacity=0.99;
		i_mwst++;
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
		timer_mwst2=setTimeout("ppdivch1gecko_mwst()", navizwischenspeed_mwst);
		return;
	}

	document.getElementById('ppdiv2_mwst').style.visibility="visible";
	document.getElementById('ppdiv2_mwst').innerHTML=ppdiv_mwst[i_mwst];
	document.getElementById('ppdiv2_mwst').style.MozOpacity=document.getElementById('ppdiv2_mwst').style.MozOpacity*1+navischrittweite_mwst*1;
  timer_mwst=setTimeout("ppdivch2gecko_mwst()", navispeed);
}

function ppdivch1opera_mwst()
{
	if (document.getElementById('ppdiv2_mwst').style.opacity<0.1)
	{
		document.getElementById('ppdiv2_mwst').style.visibility="hidden";
		document.getElementById('ppdiv2_mwst').style.opacity=0;
		document.getElementById('ppdiv1_mwst').style.opacity=0.99;
		i_mwst++;
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
		timer_mwst2=setTimeout("ppdivch2opera_mwst()", navizwischenspeed_mwst);
		return;
	}

	document.getElementById('ppdiv1_mwst').innerHTML=ppdiv_mwst[i_mwst];
//document.getElementById('ppdiv1_mwst').innerHTML="test";
	document.getElementById('ppdiv2_mwst').style.opacity=document.getElementById('ppdiv2_mwst').style.opacity*1-navischrittweite_mwst*1;
  timer_mwst=setTimeout("ppdivch1opera_mwst()", navispeed_mwst);

}

function ppdivch2opera_mwst()
{
	if (document.getElementById('ppdiv2_mwst').style.opacity>0.8)
	{
		document.getElementById('ppdiv1_mwst').style.opacity=0.99;
		document.getElementById('ppdiv2_mwst').style.opacity=0.99;
		i_mwst++;
		if (i_mwst>ppdiv_mwst.length-1) i_mwst=0;
		timer_mwst2=setTimeout("ppdivch1opera_mwst()", navizwischenspeed_mwst);
		return;
	}
	document.getElementById('ppdiv2_mwst').style.visibility="visible";
	document.getElementById('ppdiv2_mwst').innerHTML=ppdiv_mwst[i_mwst];
//document.getElementById('ppdiv2_mwst').innerHTML="<table style=\"background-color:#ff0000;\"><tr><td><br>test2</td></tr></table>";
	document.getElementById('ppdiv2_mwst').style.opacity=document.getElementById('ppdiv2_mwst').style.opacity*1+navischrittweite_mwst*1;
//	document.getElementById('ppdiv1_mwst').style.opacity=document.getElementById('ppdiv1_mwst').style.opacity*1-navischrittweite_mwst*1;
  timer_mwst=setTimeout("ppdivch2opera_mwst()", navispeed_mwst);
}
/*******************************************************************************************************************/

/************************************************** BILDERDATENBANK ************************************************/
function bilderdatenbank(bilder_kategorie_id)
{
	if (!bilderdb_kat[bilder_kategorie_id]) {alert("da habe ich noch keine Vorschaubilder erzeugt :)");return;}
	if (document.getElementById('bilder_overdiv')) document.getElementById('bilder_overdiv').innerHTML=bilderdb_kat[bilder_kategorie_id];
	if (document.getElementById('bilder_div'))
	{
		bilder=bilderdb[bilder_kategorie_id].split(";");
		str="";
		for(i=0;i<bilder.length-1;i++)
		{
			bild_einzeln=bilder[i].split("#");
			url_=pfad+"/"+bild_einzeln[0]+endung;
			bilder_relations_id=bild_einzeln[1];
			bilder_id=bild_einzeln[2];
			bilderdb_beschreibung[bilder_id]=bilderdb_beschreibung[bilder_id].replace(/\(IHA\)\//,"(IHA)/ ");
			bilderdb_beschreibung2[bilder_id]=bilderdb_beschreibung[bilder_id].replace(/'/,"\\'");
			bild_einzeln_info=bilderdb_bildinfos[bilder_id].split("#");
//			info_name=bild_einzeln[0];
//			if (bild_einzeln[0].length>35) info_name=bild_einzeln[0].substr(0,35)+"...";
			mousovertext="<div class=\\'bildinfo\\'\>";
//			mousovertext+="<b\>Dateiname: </b\></td><td>"+info_name+"<br\>";
			mousovertext+="<b\>Kategorie: </b\>"+bilderdb_kat[bilder_kategorie_id]+"<br\>";
			mousovertext+="<b\>Dateigröße: </b\>"+bild_einzeln_info[2]+"<br\>";
			mousovertext+="<b\>Pixelgröße: </b\>"+bild_einzeln_info[0]+"x"+bild_einzeln_info[1]+" Pixel<br\>";
			mousovertext+="<div class=\\'bildinfobeschreibung\\'\>"+bilderdb_beschreibung2[bilder_id]+"</div\>";
			mousovertext+="</div\>";
			cssclass="einzelbild";
			if (document.bilderdatenbank.bilder_ids.value.indexOf("#"+bilder_id+"#")>-1) cssclass="einzelbildsel";
			str+='<div class="bilder" onclick="bilderdb2(\''+bilder_relations_id+'\',\''+bilder_id+'\');" onmouseover="popUp(\''+mousovertext+'\')" onmouseout="popOut()">';
			str+='	<div class="'+cssclass+'" id="bild_id'+bilder_relations_id+'" style="background-image:url('+url_+');" >&nbsp;</div>';
			str+='	<div class="beschreibung">'+bilderdb_beschreibung[bilder_id]+'</div>';
			str+='</div>';
		}
		str+="<div class=\"clearboth\"></div>";
		document.getElementById('bilder_div').innerHTML=str;
	}
}

function bilderdb2(bilder_relations_id,bilder_id)
{
	eval("document.bilderdatenbank.bilder_ids.value=document.bilderdatenbank.bilder_ids.value.replace(/#"+bilder_id+"#,/,'');");
	if (dateiname=document.getElementById('bild_id'+bilder_relations_id).className=="einzelbild")
	{//Bild ist noch nicht markiert
		dateiname=document.getElementById('bild_id'+bilder_relations_id).className="einzelbildsel";
		document.bilderdatenbank.bilder_ids.value=document.bilderdatenbank.bilder_ids.value+"#"+bilder_id+"#,";
	}
	else
	{//Bild ist bereits markiert
		dateiname=document.getElementById('bild_id'+bilder_relations_id).className="einzelbild";
	}
}

function bilddownload()
{
	if (document.bild.agb.checked)
	{
		document.getElementById("bildsubmit").className ="bildsubmit";
		document.getElementById("bildsubmit").disabled=false;
	}
	else
	{
		document.getElementById("bildsubmit").className ="bildsubmitno";
		document.getElementById("bildsubmit").disabled=true;
	}
}

/*
function bilderdb(bilder_relations_id,bilder_id)
{
	dateiname=document.getElementById('bild_id'+bilder_relations_id).style.backgroundImage;
	pos1=dateiname.indexOf("/klein/");
	dateiname=dateiname.substr(pos1+7)
	pos1=dateiname.indexOf(")");
	dateiname=dateiname.substr(0,pos1)
*/
/*
alert("1");
	eval("document.bilderdatenbank.bilder_ids.value=document.bilderdatenbank.bilder_ids.value.replace(/#"+bilder_id+"#,/,'');");
alert("2");

	if (dateiname=document.getElementById('bild_id'+bilder_relations_id).className=="bilder")
	{//Bild ist noch nicht markiert
		dateiname=document.getElementById('bild_id'+bilder_relations_id).className="bildersel";
		document.bilderdatenbank.bilder_ids.value=document.bilderdatenbank.bilder_ids.value+"#"+bilder_id+"#,";
	}
	else
	{//Bild ist bereits markiert
		dateiname=document.getElementById('bild_id'+bilder_relations_id).className="bilder";
	}

}*/

function wurde_was_gewaehlt()
{
	//alert()
 if (document.bilderdatenbank.bilder_ids.value=="")
	{
		alert("Sie haben kein Bild ausgewählt!");
		return false;
	} 

	return true;
}
/*******************************************************************************************************************/

/**************************************************** Steckbrief-Admin ************************************************/
function steckbrief_div_insert(wert,feldname)
{
	return;
	if (!document.getElementById('edit'+feldname)) return;


	document.getElementById('edit'+feldname).innerText=wert;
	if (document.getElementById('edit'+feldname).offsetWidth  && feldname=="ueberschrift") ueberschrift_breite  = document.getElementById('edit'+feldname).offsetWidth;
	if (document.getElementById('edit'+feldname).offsetHeight && feldname=="ueberschrift") ueberschrift_hoehe = document.getElementById('edit'+feldname).offsetHeight;

	steckbrief_checkall();
}

function steckbrief_checkall()
{
	error_str="";
	if (ueberschrift_breite>235)	error_str+="Die Überschrift ist zu breit!\n";
	if (ueberschrift_hoehe>150)		error_str+="Die Überschrift ist zu hoch!\n";

	if (error_str!=""){alert(error_str);return false;}
}

function steckbrief_loeschen(id,file)
{
	if (!document.getElementById('files'+id)) return;
	$str='<b style="color:#ff0000">'+file+' wird gelöscht!</b>';
	$str+=' (<a href="javascript:dono();" onclick="steckbrief_nicht_loeschen(\''+id+'\',\''+file+'\')">doch nicht l&ouml;schen</a>)';
	document.getElementById('files'+id).innerHTML=$str;
	eval("document.steckbrief_form.datei"+id+".value='';");
	eval("document.steckbrief_form.dateidel"+id+".value='1';");
}

function steckbrief_nicht_loeschen(id,file)
{
	if (!document.getElementById('files'+id)) return;
	$str='<b>'+file+'</b>';
	$str+=' wurde hochgeladen (<a href="javascript:dono();" onclick="steckbrief_loeschen(\''+id+'\',\''+file+'\')">l&ouml;schen</a>)';
	document.getElementById('files'+id).innerHTML=$str;
	eval("document.steckbrief_form.datei"+id+".value='"+file+"';");
	eval("document.steckbrief_form.dateidel"+id+".value='';");
}
/**********************************************************************************************************************/

/************************ Newsletter-Einzel-Pulldown START *******************************/
function nlauswahlfelderzeugen(auswahl_feld_wert)
{
	auswahl_feld_werte_array=auswahl_feld_wert.split(";");
	werte_array=auswahl_feld_werte_array[0].split('#');
	wert=werte_array[0];
	bez=werte_array[1];

	str="";
	str+='<div id="nlauswahl_oben">\n';
	str+='	<div id="nlauswahl_click" onclick="selectoeffnen(\'nlauswahl\')"></div>\n';
	str+='	<div id="nlauswahl_bezeichnung" onclick="selectoeffnen(\'nlauswahl\')">'+bez+'</div>\n';
	str+='</div>\n';
	str+='<div id="nlauswahl">\n';
	str+='	<ul>\n';

	//die Werte auslesen
	for (i=1;i<auswahl_feld_werte_array.length;i++)
		{
			werte_array=auswahl_feld_werte_array[i].split('#');
			wert=werte_array[0];
			bez=werte_array[1];
			str+='		<li onmouseover="this.className=\'mouseover\'" onmouseout="this.className=\'mouseout\'" onclick="document.location.href=\'/home/page_sta_'+wert+'.html\';">'+bez+'</li>\n';
		}
	str+='	</ul>\n';
	str+='</div>\n';

	//alert(str);

	document.writeln(str);
}
/************************ Newsletter-Einzel-Pulldown ENDE *******************************/


/************************ Impressionen START ******************************/
function impressionen(bild_id,col_id)
{
	width=850;
	height=657;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('bilder=window.open("","bilder","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+'");');    
	bilder.document.location.href="/modules/bilder_2008_gross.php?ClickedMenuNode="+col_id+"&bild_id="+bild_id+"";
	bilder.focus();
}
/************************ Impressionen ENDE *******************************/

/************************ Impressionen2009 START ******************************/
function impressionen2009(bild_id,col_id)
{
	width=850;
	height=657;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('bilder=window.open("","bilder","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+'");');    
	bilder.document.location.href="/modules/bilder_2009_gross.php?ClickedMenuNode="+col_id+"&bild_id="+bild_id+"";
	bilder.focus();
}
/************************ Impressionen2009 ENDE *******************************/

/************************ Impressionen2010 START ******************************/
function impressionen2010(bild_id,col_id)
{
	width=850;
	height=657;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('bilder=window.open("","bilder","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+'");');    
	bilder.document.location.href="/modules/bilder_2010_gross.php?ClickedMenuNode="+col_id+"&bild_id="+bild_id+"";
	bilder.focus();
}
/************************ Impressionen2010 ENDE *******************************/

/************************ Impressionen2011 START ******************************/
function impressionen2011(bild_id,col_id)
{
	width=850;
	height=657;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('bilder=window.open("","bilder","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+'");');    
	bilder.document.location.href="/modules/bilder_2011_gross.php?ClickedMenuNode="+col_id+"&bild_id="+bild_id+"";
	bilder.focus();
}
/************************ Impressionen2011 ENDE *******************************/

/************************** Tagcloud START ********************************/
var tagcloud_article_id_form="";
function tagcloud_article_id(formname)
{
	tagcloud_article_id_form=formname
	new_new33233=window.open("/ghosts/article_search.php?spezial_js=tagcloud_article_id_set",'new_new33233', 'directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0,width=980,height=650,left=10,top=30');
	new_new33233.focus();
}

function tagcloud_article_id_set(id)
{
	id=id.replace("/index.php?Show_this_article=","");
	eval('document.form.article_id'+tagcloud_article_id_form+'.value=id;');
}

function tagcloud_loeschen(formname)
{
	eval('document.form.article_id'+formname+'.value="";');
	eval('document.form.word'+formname+'.value="";');
	eval('document.form.submit();');
}
/************************** Tagcloud ENDE ********************************/

//== BLOG : Erstelleradministration =========================================//
function ersteller_bild(blog_ersteller_id_over)
{
	blog_ersteller_id=blog_ersteller_id_over;
	var props = 'status=yes,scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=800,height=500,top=100,left=100';
	select_doc = window.open('/ghosts/file.php?js_str=ersteller_bild_now', 'select_doc', props);
	select_doc.focus();
}

function ersteller_bild_now(url)
{
	url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");
  url=url.replace(/\/\//gi, "\/");

	eval("document.blog_ersteller.dateiname"+blog_ersteller_id+".value=url;");

}

//== TERMINBOX: terminbox_oeffnen ===========================================//
function terminbox_oeffnen(url_) {a_new.location.href=url_+"&amp;over_col_id="+document.Content_Boxes_Buttons.terminbox_id.value;}
//===========================================================================//

//== TERMINBOX: terminbox_bearbeiten ===========================================//
function terminbox_bearbeiten(url_) {a_new.location.href=url_;}
//===========================================================================//

//== IMAGEFLOW: Öffnen des Adminbreichs im PopUp ============================//
function imageflow_popup(article_id)
{
	width=850;
	height=657;
	width_pos=(screen.width/2)-(width/2);
	height_pos=(screen.height/2)-(height/1.5);
	eval('imageflowwindow=window.open("","imageflowwindow","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+'");');    
	imageflowwindow.document.location.href="/modules/imageflow/imageflow.php?article_id_open="+article_id+"";
	imageflowwindow.focus();
}

//== Investitionsuhr ========================================================//
function investitionsuhr_add()
{
	document.investitionsuhr.uhr.value=document.investitionsuhr.uhr.value*1+10.4642316865;
	document.getElementById('uhrshow').innerHTML=number_format(document.investitionsuhr.uhr.value,2,",",".")+" &euro;";
	investitionsuhr_timer=setTimeout("investitionsuhr_add()", 1000);
}

function investitionsuhr_url()
{
	self.location.href="http://www.hotellerie.de/index.php?Show_this_article=5382";
}

function number_format (number, decimals, dec_point, thousands_sep)
{
  var exponent = "";
  var numberstr = number.toString ();
  var eindex = numberstr.indexOf ("e");
	var i = "";
  if (eindex > -1)
  {
    exponent = numberstr.substring (eindex);
    number = parseFloat (numberstr.substring (0, eindex));
  }
  
  if (decimals != null)
  {
    var temp = Math.pow (10, decimals);
    number = Math.round (number * temp) / temp;
  }
  var sign = number < 0 ? "-" : "";
  var integer = (number > 0 ? 
      Math.floor (number) : Math.abs (Math.ceil (number))).toString ();
  
  var fractional = number.toString ().substring (integer.length + sign.length);
  dec_point = dec_point != null ? dec_point : ".";
  fractional = decimals != null && decimals > 0 || fractional.length > 1 ? 
               (dec_point + fractional.substring (1)) : "";
  if (decimals != null && decimals > 0)
  {
    for (i = fractional.length - 1, z = decimals; i < z; ++i)
      fractional += "0";
  }
  
  thousands_sep = (thousands_sep != dec_point || fractional.length == 0) ? 
                  thousands_sep : null;
  if (thousands_sep != null && thousands_sep != "")
  {
	for (i = integer.length - 3; i > 0; i -= 3)
      integer = integer.substring (0 , i) + thousands_sep + integer.substring (i);
  }
  
  return sign + integer + fractional + exponent;
}
//===========================================================================//


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

