// 日本語UTF-8 あいうえお
function AddTargetBlankWithLink(){
		var links = document.getElementsByTagName('a');
		var linksLen = links.length;
		for (var i=0;i<linksLen;i++){
				if (links[i].className == 'OpenNewWindow'){
						if (document.all){
								links[i].setAttribute('onclick', new Function('OpenNewWindow(this.href); return false;'));
						} else {
								links[i].setAttribute('onclick', 'OpenNewWindow(this.href); return false;');
						}
				}
		}
}

function OpenNewWindow(href){
		window.open(href, '_blank');
}

function menuSlide(){
		try{
				var ul = document.getElementById('nav').getElementsByTagName('li');
				var ulLen = ul.length;
				var li;
				for(var i=1;i<=ulLen;i++){
						li = document.getElementById('l' + String(i));
						if (document.all){
								li.setAttribute('onmouseover', new Function('slideImage(this.firstChild.firstChild.src, this); return false;'));
								li.setAttribute('onfocus', new Function('slideImage(this.firstChild.firstChild.src, this); return false;'));
								li.setAttribute('onmouseout', new Function('slideImage(this.firstChild.firstChild.src, this); return false;'));
								li.setAttribute('onblur', new Function('slideImage(this.firstChild.firstChild.src, this); return false;'));
						} else {
								li.setAttribute('onmouseover', 'slideImage(this.firstChild.firstChild.src, this); return false;');
								li.setAttribute('onfocus', 'slideImage(this.firstChild.firstChild.src, this); return false;');
								li.setAttribute('onmouseout', 'slideImage(this.firstChild.firstChild.src, this); return false;');
								li.setAttribute('onblur', 'slideImage(this.firstChild.firstChild.src, this); return false;');
						}
				}
		} catch(e){
		}
}

function slideImage(src, ele){
		if (src.indexOf('-2.png') > 0){
				src = src.replace('-2.png', '.png');
		} else {
				src = src.replace('.png', '-2.png');
		}
		ele.firstChild.firstChild.src = src;
}

