var shared = getPath ("shared");
var browser = getBrowser();
if (document.images)
        {
       
        var m_0 = new Image(); m_0.src="images/m_0.gif";
        var mo_0 = new Image(); mo_0.src="images/mo_0.gif";
        var m_1 = new Image(); m_1.src="images/m_1.gif";
        var mo_1 = new Image(); mo_1.src="images/mo_1.gif";
        var m_2 = new Image(); m_2.src="images/m_2.gif";
        var mo_2 = new Image(); mo_2.src="images/mo_2.gif";
        var m_3 = new Image(); m_3.src="images/m_3.gif";
        var mo_3 = new Image(); mo_3.src="images/mo_3.gif";
        var m_4 = new Image(); m_4.src="images/m_4.gif";
        var mo_4 = new Image(); mo_4.src="images/mo_4.gif";
        var m_5 = new Image(); m_5.src="images/m_5.gif";
        var mo_5 = new Image(); mo_5.src="images/mo_5.gif";
        var m_6 = new Image(); m_6.src="images/m_6.gif";
        var mo_6 = new Image(); mo_6.src="images/mo_6.gif";
        var m_7 = new Image(); m_7.src="images/m_7_neu.gif";
        var mo_7 = new Image(); mo_7.src="images/mo_7_neu.gif";
	}

function wechsel(bname,bild){
  for (i=0;i<=7;i++){
    imgNr=i;
    if (i<10) imgNr="0"+i;
    imgNameHi="m" + imgNr;
    imgNameLo="m_"+i+".src";
    document.images[imgNameHi].src=eval(imgNameLo);
  }
	document.images[bname].src=bild.src;
}


function hideObj(obj,action){
	var visible = (document.layers) ? 'show' : 'visible';		
	var hidden = (document.layers) ? 'hide' : 'hidden';		
	if (!(document.layers || document.getElementById)){ var layer = eval('document.all.' + obj + '.style');	}
	else{ var layer = (document.layers) ? document.layers[obj] : eval('document.getElementById(obj).style');	}
	if(hideObj.arguments.length >= 2){layer.visibility = visible;	}
	else{layer.visibility = hidden;	}
}



function fillLayer (ref) {

var c = "unknown content";
	if (fillLayer.arguments[0] == "BValue") {
	// Bosch Werte: Layer "BValue": Textformatierung und Tabellenlayout:
		layName = "BValue";
		ref = getLayerRef (layName);
		var num = fillLayer.arguments[1];
		var prinz = new Array();
		prinz[0] = "<strong>Our values: Encompassing change and continuity</strong><br>Bosch has always been a value-driven company. Many of our values can be traced back to our founder Robert Bosch, other values have changed or have arisen over the decades. Now we have put our guiding values in writing. Our values reflect the manner in which we run our business: Our professional ethics in dealing with our business partners, investors, employees and society.";
		prinz[1] = "<strong>Future and Result Focus</strong><br>In order to ensure dynamic development of our company and to guarantee longterm corporate success, we participate in shaping the changes in markets and technologies. By doing so, we provide our customers with innovative solutions and our associates with attractive jobs. We act result focused in order to secure growth and financial independence. With the dividends generated, the Robert Bosch Foundation supports charitable activities.";
		prinz[2] = "<strong>Responsibility</strong><br>We accept that our actions must accord with the interests of society. Above all else, we place our products and services in the interests of the safety of people, the economic use of resources, and environmental sustainability.";
		prinz[3] = "<strong>Initiative and Determination</strong><br>We act on our own initiative, with an entrepreneurial but accountable spirit, and demonstrate determination in pursuing our goals.";
		prinz[4] = "<strong>Openness and Trust</strong><br>We inform our associates, business partners, and investors in a timely and open fashion of important developments within our company. This is the best basis for a trustful relationship.";
		prinz[5] = "<strong>Fairness</strong><br>We view mutual fairness as a condition of our corporate success when dealing with each other and with our business partners.";
		prinz[6] = "<strong>Reliability, Credibility, and Legality</strong><br>We promise only what we can deliver, accept agreements as binding, and respect and observe the law in all our business transactions.";
		prinz[7] = "<strong>Cultural Diversity</strong><br>We are aware of our company's regional and cultural origins and at the same time regard diversity as an asset, as well as a precondition of our global success.";
		
		if(document.images){var numbild = "<img src=\"images/m_"+(num)+".gif\" vspace=2 width=16 height=9 border=0>";}else{var numbild = "<b>"+(num)+"</b>";}
		var c = "<table border='0' cellspacing='0' cellpadding='0'>\n<tr>\n";
		c +=	"<td><img src=\"../../shared/transparent.gif\" width='18' height='1'></td>\n";
		c +=	"<td><img src=\"../../shared/transparent.gif\" width='331' height='1'></td>\n";
		c +=	"<td><img src=\"../../shared/transparent.gif\" width='6' height='1'></td>\n";
		c +=	"</tr><tr>\n";
		
		c +=	"<td class=\"f12bluedark\" valign=\"top\" width=18 align=\"center\">"+numbild+"</td>\n";
		c +=	"<td class=\"f12bluedark\" valign=\"top\" width=331>"+prinz[num]+"</td>\n";
		c +=	"<td><img src=\"../../shared/transparent.gif\" width=1 height=90></td>\n";

		c +=	"</tr><tr>\n";
		c +=	"<td colspan=\"3\"><img src=\"../../shared/transparent.gif\" width=1 height=4></td>\n";
		c +=	"</tr>\n</table>\n";
	}
	
	layerWrite (ref, c);
	hideObj(layName,'show');
}

// infolayer definition
var infoTimer = 0;

function setLayerPosition(){
	if (!v4) return;
	var w = getDocumentProperty ("clientWidth");
	refo = getLayerStyleRef (layName);
	if(w >= 720) {
		if(browser == "ns6"){var korr = 1;}else{korr = 0;}
		if((browser == "ns4") && ((navigator.platform).toLowerCase().indexOf("mac")>=0)){ korr = 2; }	// Korrektur fuer NS4 & 6 auf Mac.
		refo.left = parseInt((w-720)/2)+180+korr;	
	} else {
		refo.left = 180;
	}
	infoTimer=setTimeout("setLayerPosition()", 200);
}

function setBValue(){
	var layer=getLayerStyleRef ('BValue');
	if (!v4) return;
	if(browser == "ns6"){var korr = 14;}
	else if(browser == "ns4"){var korr = 5;layer.top = 535;}
	else{var korr = 6;}
	var w = getDocumentProperty ("clientWidth");
	if(w >= 720) {
		//layer.left = parseInt((w-720)/2)+180+korr;	
	} else {
		//layer.left = 180;
	}
	infoTimer=setTimeout("setBValue()", 200);
}

function layPos () {


	var lay = new Array ("prinz1",379,"prinz2",451,"prinz3",451,"prinz4",451,"prinz5",451,"prinz6",451,"prinz7",451,"prinz8",451,"prinz9",451,"prinz10",379,"prinz11",379,"prinz12",451);
	var leftset = 0;

	for(i=0;i<lay.length;++i)
		if(lay[i] == laynum)
			leftset = lay[i+1];

	var syn = getLayerStyleRef (laynr);
	var w = getDocumentProperty ("clientWidth");

	if (browser.indexOf("ie") >= 0 || browser == "ns6") {
		//syn.left = ((w-720)/2) + leftset;
		syn.top = 370;
		//if (syn.left < leftset) syn.style.left = leftset;
	}
	else if (browser == "ns4"){
		//syn.left = ((w-720)/2) + leftset;
		syn.top = 369;
		//if (syn.left < leftset) syn.left = leftset;
	}
	else return;

	infoTimer=setTimeout("layPos()", 200);
}


function getDocumentProperty (property)
{
	var b = getBrowser();

	if (property == "clientWidth")
	{
		if (b.indexOf ("ns") >= 0) return (window.innerWidth-16);
		if (b.indexOf ("ie") >= 0) return (document.body.clientWidth);
	}

	if (property == "clientHeight")
	{
		if (b.indexOf ("ns") >= 0) return (window.innerHeight);
		if (b.indexOf ("ie") >= 0) return (document.body.clientHeight);
	}

	if (property == "scrollTop")
	{
		if (b.indexOf ("ns") >= 0) return (window.pageYOffset);
		if (b.indexOf ("ie") >= 0) return (document.body.scrollTop);
	}

	return (-1);
}