/* * * Copyright Macromedia * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/****************************************************************
 * JavaScript-Hilfsroutinen für Projekt				*
 * Ecoflac® plus Marketing Platform				*
 * Copyright (c) 2003, 2004 by B. Braun Melsungen AG		*
 *-------------------------------------------------------------	*
 * Development 2003-08, 2004-03					*
 * by B2A Kassel; mailto:devNOSPAM@b2a.de			*
 * *** Jede Verwendung nur mit ausdrücklicher Genehmigung! ****	*
 * Version: 1.0.3						*
 * Autor: tbol, B2A/koe						*
 * Letzte Bearbeitung: 2004-03-31 17:46				*
 * durch: Koe							*
 ****************************************************************/

function leadingZero( num, dig ) {
	if(num == null)
		return;

	if(dig == null || dig < 2)
		dig = 2;

	for( var i = String( num ).length;i < dig;i++ )
		num = '0' + String( num );

	return num;
}

var imgID = 1, lastImgID = 22;

function swapImage( step, imgOffset )
{
	imgID += step;
	if(imgID == 0)
		imgID = lastImgID;
	if(imgID > lastImgID)
		imgID = 1;
	window.document.images[3+imgOffset].src = "_img/Product_"+leadingZero( imgID )+".png";
}


function chgBgCol( id, color ) {
  if( document.getElementById )
    document.getElementById( id ).style.backgroundColor=color;
  else if( document.all )
    document.all[id].style.backgroundColor=color;
  else if( document.layers )
    document.layers[id].bgColor=color;
}

function chgmenu( uri_menu,uri_cont ) {
  parent.frames[suchframe].und = new Array()
  parent.menue.location.replace( uri_menu );
  parent.content.location.href = uri_cont;
}

function updmenu( uri_menu ) {
  if (parent.frames[suchframe].und && parent.frames[suchframe].und.length>0) {
    und = new Array()
    und = parent.frames[suchframe].und
    Aendern()
  }
  parent.menue.location.replace( uri_menu );
}

function back() {
  parent.content.focus();
  parent.content.history.back();
}

function top() {
  window.scrollTo(0,0);
}

window.defaultStatus = "W. Skidmore & Co.,";

suchframe="topFrame"

function Aendern(zwt,y) {
	ie4 = (document.all)? true:false
	ie5 = ((document.getElementById) && (document.all))
	nc4 = (document.layers)? true:false
	nc45 = (nc4 && navigator.appVersion.substr(2).match(/^[1-9]|^0[5-9]/))? true:false
	mz5 = ((document.getElementById) && (!document.all) && (document.documentElement))
	farbe = new Array("#FCE463","#FFA500","#D2B48C","#66CDAA","#8FBC8F")
	ausdr=""
	if (ie4 && !ie5) zwt=document.all.tags("body")[0].innerHTML
	else zwt=document.getElementsByTagName("body")[0].innerHTML

	for (x=0; x<und.length; x++) if (und[x]>"") ausdr+="|"+und[x]
	ausdr="/\\b("+unescape(ausdr.replace(/%3[CE]/g,"").replace(/a/g,"[aáàâ]").replace(/e/g,"[eéèê]").replace(/i/g,"[iíìî]").replace(/o/g,"[oóòô]").replace(/u/g,"[uúùû]").replace(/ß/g,"[ßs]+").substr(1))+")/gi"
	zwt=zwt.replace(eval(ausdr),"<SPAN STYLE=\"background-color:"+farbe[0]+"; color:black\">$1</SPAN>")

	for (y=0; y<2; y++) zwt=zwt.replace(/(<[^>]*)<SPAN STYLE="background-color:[^;]*; color:black">([^<]*)<\/SPAN>/g,"$1$2")
	if (ie4 && !ie5) document.all.tags("body")[0].innerHTML=zwt
	document.getElementsByTagName("body")[0].innerHTML=zwt
	if (mz5) focus()
}


