/*
  Panasonic Panama
  JS FILE [menu_function.js]
  This file contains the definition of "toppage function".
 */

/* 1. set  background of banner image;
--------------------------------------------------------------------------  */
function setTxt1cBg(){
	this.w3c = document.getElementById; if (!this.w3c) return false;
	return this;
}

setTxt1cBg.prototype = {
	init: function(){
		var divs = document.getElementsByTagName("div");
		for(var i=0,f= divs.length ; i < f ; i++){
			STB.setBg(divs[i]);
		}
	},
	setBg: function(i){
		if(getClsName(i).indexOf("btn-bnr") > -1){
			var lis = i.getElementsByTagName("li");
			for(var i=0,f= lis.length ; i < f ; i++){
				(function(i) {
					lis[i].style.borderBottom = "none";
//					lis[i].style.backgroundImage = "url(" + cdir + "img/" + getClsName(lis[i]) + ")";
//					lis[i].style.backgroundImage = "url(/common_pla/bnr/" + getClsName(lis[i]) + ")";
				})(i);
			}
		}
	}
}

function getClsName(d){
	var cls = (ie)? "className" : "class";
	return new String(d.getAttribute(cls)).toLowerCase();
}
function getClsAttr(){
	return (ie)? "className" : "class";
}

var STB = new setTxt1cBg();
window.addOnload(STB.init);
