/**********************************************************************
***********************************************************************
***    Copyright by Frank Mühlschlegel, Bonn, Germany               ***
***********************************************************************
**********************************************************************/


/*function LNHelperClass(){


}

LNHelper.prototype.ShowBigPic = function(pic_src) {
	document.getElementById('rechtsmain').style.display = 'none';
        document.getElementById('links').style.display = 'none';
	document.getElementById('bigpic').style.display = 'block';
        document.getElementById('bigpic_img').src = pic_src;
}

LNHelper.prototype.HideBigPic= function() {
	document.getElementById('rechtsmain').style.display = 'block';
        document.getElementById('links').style.display = 'block';                
        document.getElementById('bigpic').style.display = 'none';  
}
var LNHelper = new LNHelperClass();
*/

/**********************************************************************
***    für die PopUp-Bilder verantwortlich                          ***
**********************************************************************/
newWindow = null;
var bild;
function ShowBigPic(pic_src)
{
	//LNHelper.ShowBigPic();
        document.getElementById('rechtsmain').style.display = 'none';
        document.getElementById('links').style.display = 'none';
	document.getElementById('bigpic').style.display = 'block';
        document.getElementById('bigpic_img').src = pic_src;

              

}
function HideBigPic(){
        document.getElementById('rechtsmain').style.display = 'block';
        document.getElementById('links').style.display = 'block';                
        document.getElementById('bigpic').style.display = 'none';  
}

function Pop(pic_src)
{
   bild = new Image;
   bild.src="http://www.lord-nelson.com" + pic_src;
  
   Zu();
   Show();
}
function Show()
{  
   // Copyright by Lord Nelson

   Fenster_Hoehe = bild.height + 30;
   Fenster_Breite = bild.width + 40;
//   newWindow = window.open('','','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left=0,top=0,height='+Fenster_Hoehe+',width='+Fenster_Breite);
  // newWindow = window.open('','',height='+Fenster_Hoehe+',width='+Fenster_Breite);

   with (newWindow)

   {
      document.writeln('<HTML><HEAD><TITLE>Klick zum Schlie&szlig;en</TITLE></HEAD>');
      document.writeln('<BODY BGCOLOR="#FFFFFF" TEXT="#000000" onContextMenu="return false" onDragStart="return false" onSelectStart="return false">');
      document.writeln('<DIV ALIGN=CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 VALIGN="MIDDLE"><TR><TD>');
      document.writeln('<A HREF="Javascript:window.close()">');
      document.writeln('<IMG name="bild" src="#"/></A></TD>');
      document.writeln('</TR></TABLE></DIV></BODY></HTML>');
      document.getElementById("bild").setAttribute("src", bild.src);
   }
}
function Zu()
{
   if (newWindow != null)
     if (!newWindow.closed)
       newWindow.close();
}


/**********************************************************************
***    für Änderung in der linken Details-Ansicht                   ***
**********************************************************************/

function set_details(det_id){
   
    if (document.getElementById("BildDiv")!=null) {
	document.getElementById("BildDiv").innerHTML = document.getElementById("DetailBild" + det_id).innerHTML;
    }
    if (document.getElementById("BildText")!=null) {
        document.getElementById("BildText").innerHTML = document.getElementById("DetailText" + det_id).innerHTML;
    }
       
}

/**********************************************************************
***    für das Aufklappen des Menus verantwortlich                  ***
**********************************************************************/
  
var menu_id_to_hide = new Array(10); // max 10 Menulevel möglich, ggf. erhöhen ;-)
var papatd_id_to_hide = new Array(10); // max 10 Menulevel möglich, ggf. erhöhen ;-)

function show(mid,level){
    
    var menu_id = "menu" + mid;
    var parent_id = "parent" + mid;
    
    var selfobj = document.getElementById(parent_id);
    
    hide(menu_id_to_hide[level]);
    if (document.getElementById(menu_id)!=null) {
        document.getElementById(menu_id).style.display = 'block';
        menu_id_to_hide[level] = menu_id;
                
    }
    
    if (papatd_id_to_hide[level]!=null) {
        papatd_id_to_hide[level].className = "";
    }
    selfobj.className = "menu" + (level-1) + "_td_clicked";
    papatd_id_to_hide[level] = selfobj;
}

function showWithParent(mid,level){
	var parent_id = "parent" + mid;
   	var pobj = document.getElementById(parent_id);
  
    var pid = pobj.parentElement.parentElement.parentElement.parentElement.id
    pid = pid.substring(4);
  
    
	show(pid,level-1);
	show(mid,level);

}

function hide(mid){
  if (mid!=null) document.getElementById(mid).style.display = 'none';
}





/**********************************************************************
***    für das Hovern in Tabellen verantwortlich                    ***
**********************************************************************/


function hover_in(obj){
	setStyleClass(obj,"hover");
}
function hover_out(obj){
        setStyleClass(obj,"nohover");
}
function setStyleClass(obj,styleclass){
        obj.className = styleclass;
}