//Lib objects  ********************
function lib_obj(obj,nest){
  if(!bw.bw) return lib_message('Old browser')
  nest=(!nest) ? "":'document.'+nest+'.';
  this.evnt=bw.dom? document.getElementById(obj):
    bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers[obj]"):0;	
  /*if(!this.evnt) return lib_message('The layer does not exist ('+obj+')' 
    +'- \nIf your using Netscape please check the nesting of your tags!')*/
   if(!this.evnt) return -1;

  this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt; 
  this.ref=bw.dom||bw.ie4?document:this.css.document;
  this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;
  this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0
  this.w=this.evnt.offsetWidth||this.css.clip.width||
    this.ref.width||this.css.pixelWidth||0; 
  this.h=this.evnt.offsetHeight||this.css.clip.height||
    this.ref.height||this.css.pixelHeight||0
  this.c=0 //Clip values
  if((bw.dom || bw.ie4) && this.css.clip) {
  this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1); 
  this.c=this.c.split(' ');
  for(var i=0;i<4;i++){this.c[i]=parseInt(this.c[i])}
  }
  this.ct=this.css.clip.top||this.c[0]||0; 
  this.cr=this.css.clip.right||this.c[1]||this.w||0
  this.cb=this.css.clip.bottom||this.c[2]||this.h||0; 
  this.cl=this.css.clip.left||this.c[3]||0
  this.obj = obj + "Object"; eval(this.obj + "=this")
  return this
}

//Showing object ************
lib_obj.prototype.showIt = function(){
	this.css.visibility="visible"
}

//Hiding object **********
lib_obj.prototype.hideIt = function(){
	this.css.visibility="hidden"
	}

initImages(["home1", "images/nav_home.gif"],
			["home2", "images/nav_home_ro.gif"],
			["produktwelt1", "images/nav_produktwelt.gif"],
			["produktwelt2", "images/nav_produktwelt_ro.gif"],
			["fruehstueckscere1", "images/nav_fruehstueckscere.gif"],
			["fruehstueckscere2", "images/nav_fruehstueckscere_ro.gif"],
			["vielfalt1", "images/nav_vielfalt.gif"],
			["vielfalt2", "images/nav_vielfalt_ro.gif"],
			["besser_frueh1", "images/nav_besser_frueh.gif"],
			["besser_frueh2", "images/nav_besser_frueh_ro.gif"],
			["fruehstuecken1", "images/nav_fruehstuecken.gif"],
			["fruehstuecken2", "images/nav_fruehstuecken_ro.gif"],
			["inhaltsstoffe1", "images/nav_inhaltsstoffe.gif"],
			["inhaltsstoffe2", "images/nav_inhaltsstoffe_ro.gif"],
			["fruehimvergleich1", "images/nav_fruehimvergleich.gif"],
			["fruehimvergleich2", "images/nav_fruehimvergleich_ro.gif"],
			["gewohnheiten1", "images/nav_gewohnheiten.gif"],
			["gewohnheiten2", "images/nav_gewohnheiten_ro.gif"],
			["mythen1", "images/nav_mythen.gif"],
			["mythen2", "images/nav_mythen_ro.gif"],
			["gda1", "images/nav_gda.gif"],
			["gda2", "images/nav_gda_ro.gif"],
			["rda1", "images/nav_rda.gif"],
			["rda2", "images/nav_rda_ro.gif"],
			["bmi1", "images/nav_bmi.gif"],
			["bmi2", "images/nav_bmi_ro.gif"],
			["bewegung1", "images/nav_bewegung.gif"],
			["bewegung2", "images/nav_bewegung_ro.gif"],
			["verbandundm1", "images/nav_verbandundm.gif"],
			["verbandundm2", "images/nav_verbandundm_ro.gif"],
			["verband1", "images/nav_verband.gif"],
			["verband2", "images/nav_verband_ro.gif"],
			["mitglieder1", "images/nav_mitglieder.gif"],
			["mitglieder2", "images/nav_mitglieder_ro.gif"],
			["industrie1", "images/nav_industrie.gif"],
			["industrie2", "images/nav_industrie_ro.gif"],
			["bewusster1", "images/nav_bewusster.gif"],
			["bewusster2", "images/nav_bewusster_ro.gif"]);

//preload
function initImages()
{
	args_images_II = initImages.arguments;

	for (var i = 0; i < args_images_II.length; i++)
	{
		eval (args_images_II[i][0] + '= new Image();')
		eval (args_images_II[i][0] + '.src = "' + args_images_II[i][1] + '";');
	}
}

function showImages()
{
	args_images_SI = showImages.arguments;
	
	eval ('document.images["' + args_images_SI[0] + '"].src = ' + args_images_SI[1] + '.src;');
}

var myForm = 0;
var message = "";

function myFormcheck(){
	(document.bmiform.groesse.value == "")? message=message + "Bitte geben Sie Ihre Koerpergroesse an!\n":myForm++;
	(document.bmiform.gewicht.value == "")? message=message + "Bitte geben Sie Ihr Koerpergewicht an!\n":myForm++;
	
	if (myForm == 2)
		document.bmiform.submit();
		//alert ("alles da!");

	else{
		alert (message);
		myForm = 0;
		message = "";
	}
}
