var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var NS6 = (document.getElementById && !document.all) ? true : false;
/////////////
  browserName = navigator.appName;
  browserVer = parseInt(navigator.appVersion);
  if ((browserName == "Netscape" && browserVer >= 3) || 
      (browserName == "Microsoft Internet Explorer" && browserVer >= 4))
    version = "n3";
  else 
    version = "n2";

 if (version == "n3")
 {
 //beginn_topnav
   cycon0on = new Image();
   cycon0on.src = "images/top/start_h.gif";
   cycon0off = new Image();
   cycon0off.src = "images/top/start_n.gif";

   cycon1on = new Image();
   cycon1on.src = "images/top/history_h.gif";
   cycon1off = new Image();
   cycon1off.src = "images/top/history_n.gif";

   cycon2on = new Image();
   cycon2on.src = "images/top/kontakt_h.gif";
   cycon2off = new Image();
   cycon2off.src = "images/top/kontakt_n.gif";

   cycon3on = new Image();
   cycon3on.src = "images/top/imp_h.gif";
   cycon3off = new Image();
   cycon3off.src = "images/top/imp_n.gif";
	 //end_topnav
	 
	 //beginn_mainnav
   cycon5on = new Image();
   cycon5on.src = "images/left/hofladen_h.gif";
   cycon5off = new Image();
   cycon5off.src = "images/left/hofladen_n.gif";
   
   cycon6on = new Image();
   cycon6on.src = "images/left/eier_h.gif";
   cycon6off = new Image();
   cycon6off.src = "images/left/eier_n.gif";
   
   cycon7on = new Image();
   cycon7on.src = "images/left/schweine_h.gif";
   cycon7off = new Image();
   cycon7off.src = "images/left/schweine_n.gif";
   
   cycon8on = new Image();
   cycon8on.src = "images/left/holz_h.gif";
   cycon8off = new Image();
   cycon8off.src = "images/left/holz_n.gif";
   
   cycon9on = new Image();
   cycon9on.src = "images/left/automat_h.gif";
   cycon9off = new Image();
   cycon9off.src = "images/left/automat_n.gif";

   cycon10on = new Image();
   cycon10on.src = "images/left/zeting_h.gif";
   cycon10off = new Image();
   cycon10off.src = "images/left/zeting_n.gif";
	 
	 cycon11on = new Image();
   cycon11on.src = "images/left/rezepte_h.gif";
   cycon11off = new Image();
   cycon11off.src = "images/left/rezepte_n.gif";
	
	 //end_mainnav	
	 
	 //beginn_subobjekte
	cycon14on = new Image();
   cycon14on.src = "nav/sub_obj/einfam_l.gif";
   cycon14off = new Image();
   cycon14off.src = "nav/sub_obj/einfam.gif";
	 
	 cycon15on = new Image();
   cycon15on.src = "nav/sub_obj/doppel_l.gif";
   cycon15off = new Image();
   cycon15off.src = "nav/sub_obj/doppel.gif";
	 
	 cycon16on = new Image();
   cycon16on.src = "nav/sub_obj/mehrfam_l.gif";
   cycon16off = new Image();
   cycon16off.src = "nav/sub_obj/mehrfam.gif";
	 
	 cycon17on = new Image();
   cycon17on.src = "nav/sub_obj/gewerb_l.gif";
   cycon17off = new Image();
   cycon17off.src = "nav/sub_obj/gewerb.gif";
	 
	 cycon18on = new Image();
   cycon18on.src = "nav/sub_obj/besondere_l.gif";
   cycon18off = new Image();
   cycon18off.src = "nav/sub_obj/besondere.gif";
	 //end_subobjekte
	
   }

function img_act(imgName) 
{
  if (version == "n3") 
  {
    imgOn = eval(imgName + "on.src");
    document[imgName].src = imgOn;
  }
}

function img_inact(imgName) 
{
  if (version == "n3") 
  {
    imgOff = eval(imgName + "off.src");
    document[imgName].src = imgOff;
  }
}

//popups
function popup(url)

{
if ( IE4 || IE5 == true )
        {
                window.open(url, '_new' ,"width=540,height=400,location=no,resizable=no,scrollbars=no");
        }

else if ( NS4 || NS6 || NS7 == true )
        {
                window.open(url, '_new' ,"width=510,height=395,location=no,resizable=no,scrollbars=no");
        }

}

function popup2(url)

{
if ( IE4 || IE5 == true )
        {
                window.open(url, '_new' ,"width=755,height=685,location=no,resizable=yes,scrollbars=no");
        }

else if ( NS4 || NS6 || NS7 == true )
        {
                window.open(url, '_new' ,"width=755,height=685,location=no,resizable=yes,scrollbars=no");
        }

}

function popup3(url)

{
if ( IE4 || IE5 == true )
        {
                window.open(url, '_new' ,"width=750,height=600,location=no,resizable=yes,scrollbars=no");
        }

else if ( NS4 || NS6 || NS7 == true )
        {
                window.open(url, '_new' ,"width=750,height=600,location=no,resizable=yes,scrollbars=no");
        }

}

function popup4(url)

{
if ( IE4 || IE5 == true )
        {
                window.open(url, '_new' ,"width=601,height=600,location=no,resizable=yes,scrollbars=no");
        }

else if ( NS4 || NS6 || NS7 == true )
        {
                window.open(url, '_new' ,"width=601,height=600,location=no,resizable=yes,scrollbars=no");
        }

}

