var SUBWin=null;
var KNO="";

function SubWinOpen(KNO,WinName,W,H){
	SUBWin=window.open(KNO,WinName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+W+',height='+H+'');

	if(navigator.appVersion.charAt(0)==2){
		SUBWin=window.open(KNO,WinName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+W+',height='+H+'');
	}

	if(navigator.appVersion.charAt(0)>=3){SUBWin.focus()
	}
};

function swapImage(imgName,newImg){ 
	if ((navigator.appName == 'Netscape' && parseFloat(navigator.appVersion) >= 3) || (parseFloat(navigator.appVersion) >= 4)){
		eval('document.' + imgName + '.src = "' + newImg + '"');
	}
}

function PLD(){
	Sel=document.PullDown.OP.selectedIndex;
	Url=document.PullDown.OP.options[Sel].value;
	if (Url == "") {
		return false;
	}
	top.location.href=Url;
}

function PLD0(){
	Sel=document.PullDown0.OP0.selectedIndex;
	Url=document.PullDown0.OP0.options[Sel].value;
	if (Url == "") {
		return false;
	}
	top.location.href=Url;
}

function PLD1(){
	Sel=document.PullDown1.OP1.selectedIndex;
	Url=document.PullDown1.OP1.options[Sel].value;
	if (Url == "") {
		return false;
	}
	top.location.href=Url;
}

function PLD2(){
	Sel=document.PullDown2.OP2.selectedIndex;
	Url=document.PullDown2.OP2.options[Sel].value;
	if (Url == "") {
		return false;
	}
	top.location.href=Url;
}

function PLD3(){
	Sel=document.PullDown3.OP3.selectedIndex;
	Url=document.PullDown3.OP3.options[Sel].value;
	if (Url == "") {
		return false;
	}
	top.location.href=Url;
}

function PulldownRank( mode ){
	if( mode=="d" ){
		sel = document.PulldownForm.daily.selectedIndex;
		val = document.PulldownForm.daily.options[sel].value;
	}
	if( mode=="w" ){
		sel = document.PulldownForm.weekly.selectedIndex;
		val = document.PulldownForm.weekly.options[sel].value;
	}
	if( mode=="m" ){
		sel = document.PulldownForm.monthly.selectedIndex;
		val = document.PulldownForm.monthly.options[sel].value;
	}
	top.location.href = './ranking.php?mode='+val;
}

function GoPage( a ){
	location = a.options[a.selectedIndex].value;
}

function GoPage_Shop(sel) {
	if (sel.options[sel.selectedIndex].value){
		SUBWin=window.open(sel.options[sel.selectedIndex].value);
	}
}

function clickChange(imageNum){
   if(document.images)document.myImage.src=src=imageNum;
}


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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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 play_movie(url){
	browser = navigator.appName.toUpperCase();
	os = navigator.userAgent.toUpperCase();
	if ( (os.indexOf("WIN") >= 0) && (browser.indexOf("EXPLORER") >= 0) ) {
		dummywin = window.open(url,"","screenX=0,screenY=0,left=0,top=0,width=0,height=0");
	} else {
		dummywin = window.open(url,"","screenX=0,screenY=0,left=0,top=0,width=0,height=0");
//		dummyframe.location.href = url;
	}
}
function movie_go(kno,mode){
	url = "/soap/movie/movie_j.php?kno=" + kno + "&mode=" + mode;
	play_movie(url);
}

function movie_go1(kno,mode,no){
	url = "/soap/movie/movie_jump.php?kno=" + kno + "&mode=" + mode + "&no=" + no;
	play_movie(url);
}

function movie_go2(kno,mode,no){
	url = "/member/soap/movie/movie_jump.php?kno=" + kno + "&mode=" + mode + "&no=" + no;
	play_movie(url);
}

function gravure_go1(kno,mode){
	url = "/soap/gravure/gravure_jump.php?kno=" + kno + "&mode=" + mode;
	play_movie(url);
}

function gravure_go2(kno,mode){
	url = "/member/soap/gravure/gravure_jump.php?kno=" + kno + "&mode=" + mode;
	play_movie(url);
}

function movie_play(kno,mem,mode,no){
	url = "/soap/movie/play.php?kno=" + kno + "&mem=" + mem + "&mode=" + mode + "&no=" + no;
	play_movie(url);
}


       function newscreen(url){
               var WIN01;
               WIN01 = window.open(url,"win00","width=350,height=380,resizable=1,scrollbars=1,toolbar=0");
               WIN01.focus();
               WIN01.document.close();
       }
       
	//--------------------------------------
	//	name = windowのtarget名 w = 横 h= 縦
	//
	//	呼び出し例１：
	//	<A href="window.html" onClick=newscreen_n('win00',400,400) target="win00">
	//
	//--------------------------------------
	function newscreen_n(name,w,h){
			var WIN01;
			WIN01 = window.open("",name,"width="+w+",height="+h+",resizable=yes,scrollbars=yes,toolbar=no");
			WIN01.focus();
			WIN01.document.close();
	}
