/*
	Opel Hero Loader
	Kenneth Kufluk 05/2k5
	Modem Media
	Version 2.0
	Modificado por Eduardo Sánchez,
*/
var hero = 0;
var hero_arr = [];

window.onload = function() {
	var linkObj = document.getElementById("heroLink");
	var headObj = document.getElementById("heroHead");
	if (hero_arr[0].headline!="") headObj.innerHTML = hero_arr[0].headline;
	headObj.style.color = hero_arr[0].color;
	if (headObj.getElementsByTagName("A")[0]) headObj.getElementsByTagName("A")[0].style.color = hero_arr[0].color;
	if (hero_arr[0].external == "x") {
		linkObj.href = hero_arr[0].href;
		if (hero_arr[0].sophus) {
			linkObj.onclick = function() {
				tc_redirect('hero', hero_arr[0].href, "/" + hero_arr[0].sophus, hero_arr[0].winprop);
				return false;
			}
		} else {
			linkObj.onclick = function() {
				window.open(hero_arr[0].href,'hero',hero_arr[0].winprop);
				return false;
			}
		}
	} else {
		linkObj.href = "/" + hero_arr[0].goaction;
		linkObj.onclick = function() { goactionTo(hero_arr[0].goaction);return false; }
	}

}

function fixPNG(obj) {
	// correctly handle PNG transparency in Win IE 5.5 or higher.
	var img = obj;
	var imgName = img.src.toUpperCase();
	if (imgName.substring(imgName.length-3, imgName.length) == "PNG" && document.all) {
		var imgID = (img.id) ? "id='" + img.id + "' " : "";
		var imgClass = (img.className) ? "class='" + img.className + "' " : "";
		var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
		var imgStyle = "display:inline-block;" + img.style.cssText;
		if (img.align == "left") imgStyle = "float:left;" + imgStyle;
		if (img.align == "right") imgStyle = "float:right;" + imgStyle;
		var strNewHTML = "<span " + imgID + imgClass + imgTitle
		+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
		img.outerHTML = strNewHTML;
	}
}
