
function addSize(WinM_w,WinM_h,WinN_w,WinN_h,MacM_w,MacM_h,MacN_w,MacN_h){

if(os=='Win'){

if(brName=='M'){

if(brVer<4){ addW=WinM_w;addH=WinM_h; }

else if(brVer>=4){ addW=WinM_w;addH=WinM_h; }

}

if(brName=='N'){

if(brVer<4){ addW=WinM_w;addH=WinM_h; }

else if(brVer>=4 && brVer<5){ addW=WinN_w;addH=WinN_h; }

else if(brVer>=5){ addW=WinN_w;addH=WinN_h; }

}

}

else if(os=='Mac'){

if(brName=='M'){

if(brVer<4){ addW=MacM_w;addH=MacM_h; }

else if(brVer>=4){ addW=MacM_w;addH=MacM_h; }

}

if(brName=='N'){

if(brVer<4){ addW=MacN_w;addH=MacN_h; }

else if(brVer>=4 && brVer<5){ addW=MacN_w;addH=MacN_h; }

else if(brVer>=5){ addW=MacN_w;addH=MacN_h; }

}

}

}

paramArray=new Array();

paramArray[0]='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';

paramArray[1]=new Array('toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no','addSize(0,0,0,0,0,20,20,20)');

paramArray[2]=new Array('toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes','addSize(16,0,16,0,0,0,0,0)');



function newWindow(url,winName,width,height,left,top,num) {

if(num==null){ param = "width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + left + ",top=" + top }

else {

addW=0;addH=0;

if(typeof(paramArray[num])=='object') { eval(paramArray[num][1]) }

param = "width=" + (width+addW) + ",height=" + (height+addH) + ","+paramArray[num]+",left=" + left + ",top=" + top

}

newWin = window.open(url,winName,param);

newWin.focus();



}







function openStreamingWindow(artist,num,band){

	var dirArr=new Array('300k','1m');

	var theURL='/live/'+artist+'/'+dirArr[band]+'/'+num+'.html';

	if(band == 1) openBroadBandWindow(theURL);

	else openNarrowBandWindow(theURL);

}





// --- vvv --- Open Narrow Band Window --- vvv ---

function openNarrowBandWindow(url){

	var theWidth=360;

	var theHeight=420;

	if(window.screenLeft){

		var theLeft=0;

		var theTop=0;

	}

	else{

		var theLeft=0;

		var theTop=0;

	}

	var isScroll=0;

	var isFullscreen=0;

	var mainWin=window.open(url,'mainWin','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,titlebar=1,scrollbars='+isScroll+',fullscreen='+isFullscreen+',width='+theWidth+',height='+theHeight+',left='+theLeft+',top='+theTop+',screenX='+theLeft+',screenY='+theTop);

}

// --- ^^^ --- Open Narrow Band Window --- ^^^ ---







// --- vvv --- Open Broad Band Window --- vvv ---

function openBroadBandWindow(url){

	var theWidth=screen.availWidth-10;

	var theHeight=screen.availHeight-35;

	if(!myBrowser.version) theHeight-=30;

	if(!myBrowser.platform){theWidth+=7;theHeight+=7;}

	var isScroll=0;

	var isFullscreen=0;

	

	var toShort=35;

	if(myBrowser.platform && !myBrowser.version) toShort=65;

	

	if(screen.width < 1024 || screen.height < 768) isScroll=1;

	if(screen.availWidth-10 < theWidth) theWidth=screen.availWidth-10;

	if(screen.availHeight-toShort < theHeight) theHeight=screen.availHeight-toShort;

	var mainWin=window.open(url,'mainWin','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,titlebar=1,scrollbars='+isScroll+',fullscreen='+isFullscreen+',width='+theWidth+',height='+theHeight+',left=0,top=0,screenX=0,screenY=0');

}

// --- ^^^ --- Open Broad Band Window --- ^^^ ---







function getBodyHeight(){

	if(window.innerHeight){

		return window.innerHeight;

	}

	else if(document.getElementById){

		return document.body.offsetHeight;

	}

	else if(document.all){

		return document.body.clientHeight;

	}

}





function getBodyWidth(){

	if(window.innerWidth){

		return window.innerWidth;

	}

	else if(document.getElementById){

		return document.body.offsetWidth;

	}

	else if(document.all){

		return document.body.clientWidth;

	}

}





function openLoginWin(page){

	var contWidth=537;

	var contHeight=675;

	var contWin=window.open('/CGI/mem_login/cookie_set.cgi?key=login&page='+page,'LoginWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+contWidth+',height='+contHeight);

}





function openLogoutWin(){

	var contWidth=537;

	var contHeight=610;

	var contWin=window.open('/CGI/mem_login/cookie_set.cgi?key=logout','LogoutWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+contWidth+',height='+contHeight);

}











function openRequirement(){

	var reqWidth=500;

	var reqHeight=440;

	var requirementWin=window.open('/requirement.html','requirementWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+reqWidth+',height='+reqHeight);

}







function openCMWin(num){

        url = new Array(4);

        url[1] = "http://www3.stream.co.jp/web/sapporobeer/yebisu_2006/contents/okurimonofuyukaitei_15s_80k.asx";

        url[2] = "http://www3.stream.co.jp/web/sapporobeer/yebisu_2006/contents/okurimonofuyukaitei_15s_500k.asx";

        url[3] = "http://www3.stream.co.jp/web/sapporobeer/yebisu_2006/contents/okurimonofuyukaitei_30s_80k.asx";

        url[4] = "http://www3.stream.co.jp/web/sapporobeer/yebisu_2006/contents/okurimonofuyukaitei_30s_500k.asx";

       	window.open(url[num],"gallery","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=520,height=615");

}





function openRadioCMWin(num){

        url = new Array(5);

        url[1] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?ybs_radio_winter_cat";

        url[2] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?ybs_radio_winter_nabe";

        url[3] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?ybs_radio_cat";

        url[4] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?ybs_radio_takenoko";

        url[5] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?ybs_radio_bird";

        url[6] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?rcm_fuurin";

        url[7] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?rcm_natsuyasai";

        url[8] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?rcm_nature";

        url[9] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?rcm_matsutake";

        url[10] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?rcm_kaki";

       	window.open(url[num],"gallery","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=520,height=615");

}







function openBylCMWin(num){

        url = new Array(1);

        url[1] = "http://www3.stream.co.jp/web/selector/yebisu_2005/smart.html?kihou_15s";

       	window.open(url[num],"gallery","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=520,height=615");

}









//--Dw RollOver



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}







//--PopUp Window

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}






//--Auto Rollover
function RollImg() {
	if(document.getElementsByTagName) {
		var naviImg = document.getElementsByTagName("img");
		
		for(var i=0; i < naviImg.length; i++) {
			if(naviImg[i].getAttribute("src").match("_off.")){
					naviImg[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
						naviImg[i].onmouseout = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", RollImg, false);

}else if(window.attachEvent) {
	window.attachEvent("onload", RollImg);
}



