//Fリーグ共通JS

var dir='/sports_event/fleague';

function play(x){
	var win = window.open('player/popup.html?playList='+x+'.xml',"futsalplay",'width=468,height=540,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	win.focus();
	}

function howtoPlay(){
	var win2 = window.open(dir+'/parts/howtoplay.html',"hwply",'width=500,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	win2.focus();
	}

/*クラス名取得*/
document.getElementsByClassName = function(ClassName,tagName){
	if(!(this.all || this.getElementsByTagName)) return false;
	var elements=new Array();
	var allElements,i,len;

	if(tagName) allElements= this.getElementsByTagName(tagName) || this.all.tags(tagName);
	else allElements=this.all || this.getElementsByTagName("*");
	for(i=0,len=allElements.length; i<len; i++){
		if(allElements[i].className==ClassName) elements[elements.length]=allElements[i];
	}
	return elements;
}

var toggleSwitch=0;
function Toggle(){
	if(toggleSwitch!=0){
		var trArray=document.getElementsByClassName('toggle');
		for(t=0;t<trArray.length;t++){trArray[t].className=t%2==1?'':'toggle2';}
		}
	}

function utilityfunc(){Toggle();}


//BCプレイヤー
function popBC(x){
	var winBC = window.open(dir+'/bc/index.html?'+x,"bcply",'width=880,height=660,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	winBC.focus();
	}
