///////*BS-i 共通JS*///////

/*COPYRIGHT*/
var bsiCopyrightYear='2009';  //今年

function setBsiCopyright(){
	document.getElementById('COPYRIGHT').innerHTML='Copyright&copy; 2000-'+bsiCopyrightYear+' BS-TBS, INCORPORATED All rights reserved.';
	}




/*画像コピー防止*/
var protectImgPath='/images/app/cover.gif';  //透過gif

document.getElementsByClassName = function(ClassName,tagName){
	if(!(this.all || this.getElementsByTagName)) return false;
	var elements=new Array();var a,i,l;

	if(tagName) a=this.getElementsByTagName(tagName) || this.all.tags(tagName);
	else a=this.all || this.getElementsByTagName("*");
	for(i=0,l=a.length; i<l; i++){
		if(a[i].className==ClassName) elements[elements.length]=a[i];
		}
	return elements;
	}

function protectImgCopy(){
	var protectTarget=document.getElementsByClassName("imgProtection","div");
	for(i=0;i<protectTarget.length;i++){
		var coverDIV=document.createElement('div');
		var coverIMG=document.createElement('img');
		coverIMG.src=protectImgPath;
		var alt = protectTarget[i].firstChild.alt;
		height = protectTarget[i].firstChild.height + 6;
		protectTarget[i].appendChild(coverDIV);
		protectTarget[i].lastChild.appendChild(coverIMG);
		protectTarget[i].lastChild.style.position='relative';
		protectTarget[i].lastChild.lastChild.style.position='absolute';
		protectTarget[i].lastChild.lastChild.style.width=protectTarget[i].firstChild.width+'px';
		protectTarget[i].lastChild.lastChild.style.height=height+'px';
		protectTarget[i].lastChild.lastChild.style.top='-'+ height +'px';
		protectTarget[i].lastChild.lastChild.alt=alt;
		}
	//setBsiCopyright();
	}
	
function protectImgCopyFloatLeft(){
	var protectTarget=document.getElementsByClassName("imgProtectionFloatLeft","div");
	for (i = 0; i < protectTarget.length; i++) {
		var coverDIV = document.createElement('div');
		var coverIMG = document.createElement('img');
		coverIMG.src = protectImgPath;
		var alt = protectTarget[i].firstChild.alt;
		FF = /a/[-1] == 'a';
		height = protectTarget[i].firstChild.height + 6;
		protectTarget[i].appendChild(coverDIV);
		protectTarget[i].lastChild.appendChild(coverIMG);
		protectTarget[i].lastChild.style.position = 'relative';
		protectTarget[i].lastChild.lastChild.style.margin = '0 10px 0 0';
		protectTarget[i].lastChild.lastChild.style.position = 'absolute';
		protectTarget[i].lastChild.lastChild.style.width = protectTarget[i].firstChild.width + 'px';
		protectTarget[i].lastChild.lastChild.style.height = height + 'px';
		protectTarget[i].lastChild.lastChild.alt=alt;
		if (FF) {
			protectTarget[i].lastChild.lastChild.style.left = '0px';
		}
		else {
			protectTarget[i].lastChild.lastChild.style.top = '-' + height + 'px';
		}
	//setBsiCopyright();
		}
	}



/*フォントサイズ指定*/
var vNum = navigator.appVersion.charAt(0);
var bName = navigator.appName.charAt(0);
document.writeln('<STYLE TYPE="text/css"><!--');
if(navigator.appVersion.indexOf('Mac') > -1){basefontsize = '12px';}
else{basefontsize = bName == "M" ? 'x-small' : '12px' ;}
if(navigator.appVersion.indexOf('MSIE 7')>-1)basefontsize='small';
document.writeln('body,table{font-size:'+basefontsize+';}');
document.writeln('--></STYLE>');



