

// --------------------------------------------------
// External Links
// --------------------------------------------------
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
			anchor.target = "_blank";
		}
	}
}

window.onload=externalLinks;

//--------------------------------------------------
// OpacityRollover
//--------------------------------------------------

//透過度設定
var c = 0.8;

//使用要素設定
var el = "input";

//使用クラス名設定
var cl = "over";

function opacityRollover() {
	if(document.getElementsByTagName) {
		var anc = document.getElementsByTagName(el);
		for(var i=0; i < anc.length; i++) {
			if ( (anc[i].getAttribute('class')||anc[i].getAttribute('className') ) == cl )
			{
				anc[i].onmouseover = function() {
					this.style.opacity=c;
					this.style.filter="alpha(opacity="+c*100+")";
				}
				anc[i].onmouseout = function() {
					this.style.opacity="1";
					this.style.filter="alpha(opacity=100)";
				}
			}
		}
	}
}

var addListener = function (target,type, func){
	if (target.addEventListener){
		target.addEventListener(type, func, false);
	}else if (target.attachEvent){
		target.attachEvent('on'+type,func);
	}else{
		return false;
	}
  return true;
};


addListener(window,'load',opacityRollover);



