
//Browser Check
var browserType=new checkBrowserType();
var osType=new checkOsType();
function checkBrowserType(){
	this.IE=(navigator.userAgent.indexOf("MSIE")!=-1);
	this.Gecko=(navigator.userAgent.indexOf("Gecko")!=-1);
	this.IE6=(navigator.userAgent.indexOf("MSIE 6.")!=-1);
	this.IE5=(navigator.userAgent.indexOf("MSIE 5.")!=-1);
	this.NC71=(navigator.userAgent.indexOf("Netscape/7.1")!=-1);
	this.NC70=(navigator.userAgent.indexOf("Netscape/7.0")!=-1);
	this.NC6=(navigator.userAgent.indexOf("Netscape/6.")!=-1);
	this.NC7=(navigator.userAgent.indexOf("Netscape/7.")!=-1);
	this.NC4=(navigator.userAgent.indexOf("Netscape/4.")!=-1);
}
function checkOsType(){
	this.Win=(navigator.appVersion.indexOf("Win")!=-1);
	this.Mac=(navigator.appVersion.indexOf("Mac")!=-1);
	this.Unix=(navigator.appVersion.indexOf("X11")!=-1);
}


//Contents maxwidth minwith

function setContainerWidth() {
	var windowWidth = document.body.clientWidth;
	if(document.getElementById("wrapper")){
		if(document.getElementById){
			if(windowWidth <= 855) {
				document.getElementById("wrapper").style.width = '855px';
				} else if(windowWidth >= 980) {
					document.getElementById("wrapper").style.width = '980px';
			} else {
				document.getElementById("wrapper").style.width = 'auto';
			}
		}

		else if(document.all){
			if(windowWidth <= 855) {
				document.all("wrapper").style.width = '855px';
				} else if(windowWidth >= 980) {
					document.all("wrapper").style.width = '980px';
			} else {
				document.all("wrapper").style.width = 'auto';
			}
		}
	}

}


function chgIMG(){	/* 左メニューランダム表示用 */

doimg = new Array(3);
repimg = new Array(3);

doimg[0] = '/img/img_dosports.gif';
doimg[1] = '/img/img_dosports2.gif';
doimg[2] = '/img/img_dosports3.gif';

repimg[0] = '/img/img_report.gif';
repimg[1] = '/img/img_report2.gif';
repimg[2] = '/img/img_report3.gif';

rnd = Math.floor(Math.random() * doimg.length);
rnd2 = Math.floor(Math.random() * repimg.length);

document.getElementById("rand-do-img").setAttribute("src", doimg[rnd]);
document.getElementById("rand-report-img").setAttribute("src", repimg[rnd2]);

}

function top_chgIMG(){	/* トップランダム表示用 */

topimg = new Array(7);

topimg[0] = '/img/img_athlete.gif';
topimg[1] = '/img/img_athlete2.gif';
topimg[2] = '/img/img_athlete3.gif';
topimg[3] = '/img/img_athlete4.gif';
topimg[4] = '/img/img_athlete5.gif';
topimg[5] = '/img/img_athlete6.gif';
topimg[6] = '/img/img_athlete7.gif';

rnd = Math.floor(Math.random() * topimg.length);

document.getElementById("rand-athlete-img").setAttribute("src", topimg[rnd]);
}

function soccer_chgIMG() { /* サッカーランダム表示用 */

soccerimg = new Array(2);

soccerimg[0] = '/img/img_at_soccer.gif';
soccerimg[1] = '/img/img_at_soccer2.gif';

rnd = Math.floor(Math.random() * soccerimg.length);

document.getElementById("rand-soccer-img").setAttribute("src", soccerimg[rnd]);
}

function baseball_chgIMG() { /* 野球ランダム表示用 */

}


