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];}
}

function MM_openArtistWin(theURL) { //v2.0
  window.open(theURL,'','scrollbars=1,resizable=1,width=535');
}




// ランダム広告１
function randomAdv() {
  m = 0, x = 0, y = 0;
  ad  = new Array();
  adv = new Array();
  hit = new Array();

  // hitには相対確率を入れる
  // 完全にランダムにするなら全部"1"にする
  // advには、広告のタグを入れる。改行はしないようにする
  // 広告を増やしたりする場合は、"[ ]"の数字が0から順になるようにする
  hit[0] = 1; adv[0] = '<a href="http://www.raaange.com/event/100428/index.html" target="_blank"><img src="http://www.world-kyoto.com/ad/100428wo.jpg" alt="THE ROCK N ROLL CARNIVAL" title="THE ROCK N ROLL CARNIVAL" border="0" /></a>';




  for(i=0; i<=hit.length - 1; i++) {
    m += hit[i];
  }
  n = Math.floor(Math.random() * m);
  n++;
  for(i=0; i<=hit.length - 1; i++) {
    x = y;
    y += hit[i];
    if(x<n && n<=y) ad = adv[i];
  }
  document.write(ad);
}

/*
// ランダム広告１
function randomAdv() {
  m = 0, x = 0, y = 0;
  ad  = new Array();
  adv = new Array();
  hit = new Array();

  // hitには相対確率を入れる
  // 完全にランダムにするなら全部"1"にする
  // advには、広告のタグを入れる。改行はしないようにする
  // 広告を増やしたりする場合は、"[ ]"の数字が0から順になるようにする
  hit[0] = 1; adv[0] = '<a href="http://www.kyomag.com" target="_blank"><img src="http://www.world-kyoto.com/ad/kyomag.jpg" alt="kyomag" border="0" /></a>';
  hit[1] = 1; adv[1] = '<a href="http://www.superdry.jp" target="_blank"><img src="http://www.world-kyoto.com/ad/superdry.jpg" alt="superdry" border="0" /></a>';
  hit[2] = 1; adv[2] = '<a href="http://pioneer.jp/cdj/" target="_blank"><img src="http://www.world-kyoto.com/ad/pioneer.jpg" alt="Pioneer CDJ PRO" border="0" /></a>';
  hit[3] = 1; adv[3] = '<a href="mailto:?subject=Shinichi%20Osawa%20official%20mobile%20site%20URL&body=http://shinichi-osawa.com/"><img src="http://www.world-kyoto.com/ad/bnr_osawa21.gif" alt="FEARLESS IN KYOTO" border="0" /></a>';

  for(i=0; i<=hit.length - 1; i++) {
    m += hit[i];
  }
  n = Math.floor(Math.random() * m);
  n++;
  for(i=0; i<=hit.length - 1; i++) {
    x = y;
    y += hit[i];
    if(x<n && n<=y) ad = adv[i];
  }
  document.write(ad);
}
*/

// ランダム広告２
function randomAdv2() {
  m = 0, x = 0, y = 0;
  ad  = new Array();
  adv = new Array();
  hit = new Array();

  // hitには相対確率を入れる
  // 完全にランダムにするなら全部"1"にする
  // advには、広告のタグを入れる。改行はしないようにする
  // 広告を増やしたりする場合は、"[ ]"の数字が0から順になるようにする
  hit[0] = 1; adv[0] = '<a href="mailto:?subject=Shinichi%20Osawa%20official%20mobile%20site%20URL&body=http://shinichi-osawa.com/"><img src="http://www.world-kyoto.com/ad/bnr_1122osawa.gif" alt="FEARLESS" border="0" /></a>';
  hit[1] = 1; adv[1] = '<a href="http://m.m-flo.com"><img src="http://www.world-kyoto.com/ad/bnr_1129taku.gif" alt="Tachytelic Night" border="0" /></a>';

  for(i=0; i<=hit.length - 1; i++) {
    m += hit[i];
  }
  n = Math.floor(Math.random() * m);
  n++;
  for(i=0; i<=hit.length - 1; i++) {
    x = y;
    y += hit[i];
    if(x<n && n<=y) ad = adv[i];
  }
  document.write(ad);
}

// ランダム広告(CD)
function randomAdvCD() {
  m = 0, x = 0, y = 0;
  ad  = new Array();
  adv = new Array();
  hit = new Array();

  // hitには相対確率を入れる
  // 完全にランダムにするなら全部"1"にする
  // advには、広告のタグを入れる。改行はしないようにする
  // 広告を増やしたりする場合は、"[ ]"の数字が0から順になるようにする
  hit[0] = 1; adv[0] = '<a href="http://www.raaange.com/event/100428/index.html" target="_blank"><img src="http://www.world-kyoto.com/ad/100428wo.jpg" alt="THE ROCK N ROLL CARNIVAL" title="THE ROCK N ROLL CARNIVAL" border="0" /></a>';



  for(i=0; i<=hit.length - 1; i++) {
    m += hit[i];
  }
  n = Math.floor(Math.random() * m);
  n++;
  for(i=0; i<=hit.length - 1; i++) {
    x = y;
    y += hit[i];
    if(x<n && n<=y) ad = adv[i];
  }
  document.write(ad);
}


/* FULL SCREEN FUNCTION */
function gfFullScreen(strURI){
	var strAppVer = navigator.appVersion;
	var strAppNM  = navigator.appName;
	var intPos    = strAppVer.indexOf("MSIE",0);

	if(strAppVer.indexOf("Win")>=0){ //OS--Windows
		if(strAppNM.indexOf("Microsoft")>=0){ //Browser--InternetExplorer
			if (strAppNM == "Microsoft Internet Explorer" && parseInt(strAppVer)>=4){ //IEversion more 4
				if(parseInt(strAppVer.slice(intPos+5,intPos+6))>=6){
					if(parseInt(strAppVer.indexOf("Windows NT 5.1",0)) > 0){ //WindowsXP
						fullWindow = window.open(strURI ,"full","width=" + (screen.availWidth) + ",height=" + (screen.availHeight+1) + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
						fullWindow.moveTo(-5,-32);
						//window.close();
						fullWindow.focus();
					}else{ //Not WindowsXP
						fullWindow = window.open(strURI ,"full","width=" + (screen.availWidth) + ",height=" + (screen.availHeight+1) + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
						fullWindow.moveTo(-5,-24);
						//window.close();
						fullWindow.focus();
					}
				}else{
					fullWindow = window.open("" ,"full","fullscreen=1,width=" + (screen.availWidth+3) + ",height=" + (screen.availHeight+1) + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
					//fullWindow.resizeTo(Math.ceil(screen.availWidth+3),Math.ceil(screen.availHeight+1));
					fullWindow.resizeTo(Math.ceil(screen.availWidth+3),Math.ceil(screen.availHeight+1));
					fullWindow.moveTo  (0,0);
					fullWindow.document.open("text/html", "replace");
					fullWindow.document.write("<html><style type='text/css'>\n");
					fullWindow.document.write("body{ border: 1px solid #000000; overflow: hidden; margin: 0pt;}");
					fullWindow.document.write("#stillloadingDiv{ position: absolute; left: 0px; top: 0px; width: 100%px; height: 19px; z-index: 1; background-color: #C0C0C0; layer-background-color: #C0C0C0; clip:rect(0,100%,19,0);}");
					fullWindow.document.write("</style>\n");
					fullWindow.document.write("<body onload=\"top.document.location.replace('"+strURI+"')\" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 scroll='no'>");
					fullWindow.document.write("<div ID='stillloadingDiv'></div>");
					fullWindow.document.write("</body></html>");
					fullWindow.document.close();
					//window.close();
					fullWindow.focus();
				}
			}else{ //IEversion under 4
				fullWindow = window.open(strURI,"full","width=" + (screen.availWidth+1) + ",height=" + (screen.availHeight-21) + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,left=0,top=0,screenX=0,screenY=0",true);
				//window.close();
			}
		}else if(strAppNM.indexOf("Netscape")>=0){ //Browser--NetscapeNavigator
			//fullWindow = window.open("","full","scrollbars=0,resizable=0,width=" + (screen.availWidth-12) +",height=" + (screen.availHeight-30));
			fullWindow = window.open("","full","scrollbars=0,resizable=0,outerWidth=" + screen.availWidth +",outerheight=" + screen.availHeight +",top=0,left=0");
			fullWindow.moveBy(0,-10);
			fullWindow.location.href = strURI;
			//window.close();
		}else if(strAppNM.indexOf("Opera")>=0){ //Browser--Opera
			fullWindow = window.open("","full","scrollbars=0,resizable=0,outerWidth=" + screen.availWidth +",outerheight=" + screen.availHeight +",top=0,left=0");
			fullWindow.moveBy(0,-10);
			fullWindow.location.href = strURI;
			//window.close();
		}else{ //Browser-- 3rdParty
			location.replace("index.html");
			//window.close();
		}
	}else if(strAppVer.indexOf("Mac")>=0){ //OS-Machintosh
		if(strAppVer.indexOf("Safari")>=0){ //Brower--Safari
			fullWindow=window.open("","full","scrollbars=0,resizable=0,width=" + (screen.availWidth) +",height=" + (screen.availHeight-20));
			fullWindow.moveTo(0,0);
			fullWindow.location.href=strURI;
			//window.close();
		}else{
			if(strAppNM.indexOf("Microsoft")>=0){ //Browser--InternetExplorer
				fullWindow = window.open(strURI,"full","alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=1,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0");
				fullWindow.resizeTo(screen.availWidth,screen.availHeight);
				//window.close();
			}else if(strAppNM.indexOf("Netscape")>=0){ //Browser--NetscapeNavigator
				fullWindow=window.open("","full","scrollbars=0,resizable=0,width=" + (screen.availWidth-12) +",height=" + (screen.availHeight-30));
				fullWindow.moveTo(0,0);
				fullWindow.location.href=strURI;
				//window.close();
			}else if(strAppNM.indexOf("Opera")>=0){ //Browser--Opera
				fullWindow=window.open("","full","scrollbars=0,resizable=0,width=" + (screen.availWidth-12) +",height=" + (screen.availHeight-30));
				fullWindow.moveTo(0,0);
				fullWindow.location.href=strURI;
				//window.close();
			}else{ //Browser-- 3rdParty
				location.replace("index.html");
				//window.close();
			}
		}
	}else{
		location.replace("index.html");
		//window.close();
	}
}


//内容の表示、非表示
function exMenu(tName){
        tMenu = document.getElementById(tName).style;
        if (tMenu.display == 'none') tMenu.display = "block";
		else tMenu.display = "none";
}
		
//ボタンのon,off時の画像切り替え
function swapImg(imgObj){
	if (imgObj.src.indexOf("arrow1.gif") > -1 ){
	imgObj.src = "../common/img/arrow2.gif";
	}else{
	imgObj.src = "../common/img/arrow1.gif";
	}
}