

// Aktueller Browser
var browserName = navigator.appName;

// Abfrage nach Internet-Explorer
var regMatch = browserName.match(/Microsoft/);


// Anzahl der Tabellen der aktuellen Seite einlesen
var tableNo = document.getElementsByTagName("table").length;

// Schleife durchlaeuft alle Tabellen
for (i = 0; i < tableNo; i++) {

	// Aktuelle Tabelle als Objekt
	var table = document.getElementsByTagName("table")[i];

	// Herstellertabelle
	if (table.className.match(/manufacturer/)) {

		// Anzahl der Tabellen-Zellen der aktuellen Tabelle
		var tableCellNo = table.getElementsByTagName("td").length;

		// Schleife durchlaeuft alle Tabellen-Zellen
		for (j = 0; j < tableCellNo; j++) {

			// Aktuelle Tabellen-Zelle als Objekt
			var tableCell = table.getElementsByTagName("td")[j];

			// Setzen des Rollover-Effekts
			tableCell.onmouseover = function(){mouseOver(this)};

			// Setzen des Rollout-Effekts
			tableCell.onmouseout = function(){mouseOut(this)};

			// Setzen des Click-Effekts
			tableCell.onclick = function(){onClick(this)};


			// Setzen des 'onClick'
			// table.getElementsByTagName("td")[j].setAttribute("onclick","onClick(true);","true");
		}
	}
}


// Funktion fuer den Rollover-Effekt
function mouseOver(tableCell) {

	if (tableCell.getElementsByTagName("a")[0]) {
		// alert ("kein Link");

		if(regMatch){
			tableCell.setAttribute("className","bgManufacturer","false");	// IE
		}
		else{
			tableCell.setAttribute("class","bgManufacturer","false");
		}
	}
}


// Funktion fuer den Rollout-Effekt
function mouseOut(tableCell) {

	if(regMatch){
		tableCell.removeAttribute("className","false");					// IE
	}
	else{
		tableCell.removeAttribute("class","false");
	}
}


// Setzen des Click-Effekts
function onClick (tableCell) {

	if (tableCell.getElementsByTagName("a")[0]) {
		window.open(tableCell.getElementsByTagName("a")[0]);
	}
}

