var Window_width=screen.width;	//画面の幅
var Window_height=screen.height;//画面の高さ


function DrawMyCustomClickPublicity(){

 str = '<IFRAME SRC="http://ww2.custom-click.com/cgi-bin/bf.cgi?MID=m139125&FL=1&BGCOLOR=FFFFFF" WIDTH="468" HEIGHT="60" SCROLLING="NO" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">';
 str += '<A TARGET="_blank" HREF="http://ww2.custom-click.com/cgi-bin/cn.cgi?MID=m139125&FL=1"><IMG SRC="http://ww2.custom-click.com/cgi-bin/vn.cgi?MID=m139125&FL=1" WIDTH="468" HEIGHT="60" BORDER="0"></A>';
 str += '</IFRAME>';
 //<!-- CustomClick_END -->

 //str = '<!-- CustomClick_START -->';
 //str += '<IFRAME SRC="http://ww2.custom-click.com/cgi-bin/bf.cgi?MID=m139125&FL=1&BGCOLOR=FFFFFF" WIDTH="468" HEIGHT="60" SCROLLING="NO" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">';
 //str += '<A TARGET="_blank" HREF="http://ww2.custom-click.com/cgi-bin/cn.cgi?MID=m139125&FL=1"><IMG SRC="http://ww2.custom-click.com/cgi-bin/vn.cgi?MID=m139125&FL=1" WIDTH="468" HEIGHT="60" BORDER="0"></A></IFRAME>';
 //<!-- CustomClick_END -->
 document.write(str);

}




//flg=trueで<br>つき
//*******StudioKingyoの著作権表示(悪用したものは法的処置もありえます
function MyCopyright(flg){
    f = new Date();
    y = f.getYear();
    n = f.getMonth() + 1;
    d = f.getDate();
    h = f.getHours();
    m = f.getMinutes();
    s = f.getSeconds();
    if (y < 2000) y = 1900 + y;
    if (h < 10)   h = "0" + h;  
    if (m < 10)   m = "0" + m;
    if (s < 10)   s = "0" + s;    
    nen= y+"年"+n+"月"+d+"日　"+h+"時"+m+"分"+s+"秒";
	if(flg==true){
		document.write('<a href="http://studiokingyo.fc2web.com/warning.html">Copyright(C)</a>2000-'+nen+' by <a href="http://www.vector.co.jp/vpack/browse/person/an025709.html">d金魚</a> All rights reserved.<br>');
	}else{
		document.write('<a href="http://studiokingyo.fc2web.com/warning.html">Copyright(C)</a>2000-'+nen+' by <a href="http://www.vector.co.jp/vpack/browse/person/an025709.html">d金魚</a> All rights reserved.');
	}
}
//***********************
//絵を画面中央に持ってくる。（タブブラウザ等はどうなるかわからない
//***********************
function GraphOpen(name,Gwidth,Gheight){
	var h=Window_height/2-Gheight/2,w=Window_width/2-Gwidth/2;

	newWin = window.open(name,'maxwindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width='+Gwidth+',height='+Gheight+',top='+h+',left='+w);
}
//****Now TESTING
function GraphOpen2(name,Gwidth,Gheight){
	var h=Window_height/2-Gheight/2,w=Window_width/2-Gwidth/2;

	Win = window.open('','Gwindow');
	Win.document.open();
	Win.document.write("<html><head><title>Thanks!</title></head>");
	Win.document.write("<body><img src='+name+'></body></html>");
	Win.document.close();
}

//**********************************
//ギャラリーを描画するもの
//********************************
function GalleryDraw(wc,hc,graph,directory,extension,width,height,s,s_directory,s_extension,sw,sh,get_set,exit_set){
  var i,k,j;
  var str,str2,str3,onc,snc;
  var gname,sname;
  var count=get_set;
  for(j=0;j<hc;j++){
    for(i=0;i<wc;i++){
      if(count>exit_set){
        return;
      }
        
        k=count++;
        onc='GraphOpen("'+directory+''+k+''+graph+''+extension+'",'+width+','+height+')';
        snc=''+s_directory+''+k+''+s+''+s_extension+'';
        str='<a name="h'+k+'"></a>';
      str2='<A HREF ="#h'+k+'" TARGET="_top" onClick='+onc+'><IMG SRC="'+snc+'" width="'+sw+'" height="'+sh+'" TARGET="_top" BORDER=0></A>';
      str3='';
      with(document){
        write(str);
        write(str2);
        write(str3);
        
      }
    }
    document.write("<br>");
  }
}



function MyContentsOut(c_name,b_name,ifbr){
 URL = new Array();
 URL[0]='<a href="http://NihongoURL.nu/止水/">Home</a>';
 URL[1]='<a href="http://ojiji.net/lovehina/load.html">入り口</a>';
 URL[2]='<a href="http://ojiji.net/lovehina/">I Love CG NetWork</a>';
 URL[3]='<a href="http://studiokingyo.fc2web.com/panzer-dragoon/index.html">I Love Panzer Dragoon ORTA</a>';
 URL[4]='<a href="http://www.m-n-j.com/town/internet_computer/dbkcreate/">Infomation</a>';
 URL[5]='<a href="http://www.m-n-j.com/town/internet_computer/dbkcreate/index.html#tyuui">注意事項</a>';
 URL[6]='<a href="http://www33.tok2.com/home/dca/">ゲーム製作愛好会</a>';
 URL[7]='<a href="http://studiokingyo.fc2web.com/download.html">ダウンロード</a>';
 URL[8]='<a href="http://hp.vector.co.jp/authors/VA025709/">明鏡止水</a>';
 URL[9]='<a href="http://isweb35.infoseek.co.jp/school/shinpuu/">風来人極め</a>';
 URL[10]='<a href="http://hp.vector.co.jp/authors/VA025709/dxlib.html">DxLib Fan</a>';
 var URL_NUM=11;

 BBS = new Array();
 BBS[0]='<a href="http://bbs7.otd.co.jp/712235/bbs_tree">Main掲示板</a>';
 BBS[1]='<a href="http://cg.iclub.to/bbs/debukin.html">リンク申し込み雑談掲示板</a>';
 BBS[2]='<a href="http://r-troops.com/cgibin/bbs/bbs.cgi?town_id=hc0">風来のシレン掲示板</a>';
 BBS[3]='<a href="http://ardor.iui.co.jp/bbs/?0001/DirectX">DxLib Fan 兼 携帯電話用掲示板</a>';
 BBS[4]='<a href="http://r-troops.com/cgibin/bbs/bbs.cgi?town_id=hc1">StudioKingyoの作品の感想を書いて欲しい掲示板</a>';
 BBS[5]='<a href="http://www6.airnet.ne.jp/keita/main/picture_BBS/picture_BBS_rule.htm">共同お絵描き掲示板</a>';
 BBS[6]='<a href="http://members3.tsukaeru.net/tukurpg/">共同ツクール質問掲示板</a>';
 
 var BBS_NUM=7;
 
 var str="<br>";
 
 str+=""+c_name+"";
 
 for(i=0;i<URL_NUM;i++){
  if(ifbr==true){
    str+=""+URL[i]+"<br>";
  }else{
    str+=""+URL[i]+"";
  }
 }
 str+=""+b_name+"";
 
 for(i=0;i<BBS_NUM;i++){
  if(ifbr==true){
    str+=""+BBS[i]+"<br>";
  }else{
    str+=""+BBS[i]+"";
  }
 }

 document.write(str);
 


}

//******************
//風来人極め　専用
//***************
function SHIREN_GD(wc,hc,graph,directory,extension,width,height,s,s_directory,s_extension,sw,sh,get_set,exit_set){
  var i,k,j;
  var str,str2,str3,onc,snc;
  var gname,sname;
  var count=get_set;
  for(j=0;j<hc;j++){
    for(i=0;i<wc;i++){
      if(count>exit_set){
        return;
      }
        
	
        k=count++;
	if(k<10){
		k='00'+k;
	}else{
		if(k<100){
			k='0'+k;
		}
	}
        onc='GraphOpen("'+directory+''+graph+''+k+''+extension+'",'+width+','+height+')';
        snc=''+s_directory+''+s+''+k+''+s_extension+'';
        str='<a name="h'+k+'"></a>';
      str2='<A HREF ="#h'+k+'" TARGET="_top" onClick='+onc+'><IMG SRC="'+snc+'" width="'+sw+'" height="'+sh+'" TARGET="_top" BORDER=0></A>';
      str3='';
      with(document){
        write(str);
        write(str2);
        write(str3);
        
      }
    }
    document.write("<br>");
  }
}









//d金魚の 簡易 環境チェッカーらしきもの
function getInfo(){
	var theAgent    = navigator.userAgent;
	    theAgent    = theAgent.toUpperCase();
	var ver = ""+navigator.appVersion;
	this.name   = "Unknown";
	this.typeNo = -1;
	this.version= -1;	
//-------------- Macine Check --------------
	if ( theAgent.indexOf("WIN") >= 0){
		this.name = "Windows";
		if (theAgent.indexOf("3.1")  >= 0){
 			this.name = "Windows 3.1";  this.typeNo = 0;
		}
		if (theAgent.indexOf("95")   >= 0) {
 			this.name = "Windows 95";   this.typeNo = 1;
		}
		if (theAgent.indexOf("98")   >= 0){
			this.name = "Windows 98";   this.typeNo = 2;
		}
		if (theAgent.indexOf("NT")   >= 0) {
			 this.name = "Windows NT";   this.typeNo = 3;
		}
		if (theAgent.indexOf("2000") >= 0) {
			this.name = "Windows 2000"; this.typeNo = 4;
		}
	}
	if ( theAgent.indexOf("MAC")   >= 0){
		this.name   = "MacOS";
		if (theAgent.indexOf("68K")   >= 0) {
 			this.name = "MacOS"; this.typeNo = 10;
		}
		if (theAgent.indexOf("PPC")   >= 0) {
 			this.name = "MacOS"; this.typeNo = 11;
		}
		if (theAgent.indexOf("POWER") >= 0) {
 			this.name = "MacOS"; this.typeNo = 11;
		}
	}
	if ( theAgent.indexOf("FREEBSD") >= 0) {
 		this.name = "FreeBSD"; this.typeNo = 20;
	}
	if ( theAgent.indexOf("NETBSD")  >= 0) {
 		this.name = "NetBSD";  this.typeNo = 21;
	}
	if ( theAgent.indexOf("OPENBSD") >= 0) {
 		this.name = "OpenBSD"; this.typeNo = 22;
	}
	if ( theAgent.indexOf("BSDI")    >= 0) { 
		this.name = "BSDi";
		this.typeNo = 23;
	}
	if ( theAgent.indexOf("FRINBSD") >= 0) {
		 this.name = "FrinBSD"; this.typeNo = 24;
	}
	if ( theAgent.indexOf("LINUX")   >= 0) {
	 this.name = "Linux";   this.typeNo = 30;
	}
	if ( theAgent.indexOf("SUN")     >= 0)	{
		var v = theAgent.indexOf("SUNOS");
		v = eval(theAgent.substring(v+6,v+8));
		if (v <= 4.1) {this.name = "SunOS";   this.typeNo = 40;
	}else{
		       this.name = "Solaris"; this.typeNo = 41;
	}
}
//-------------- Browser Check --------------
this.browser= navigator.appName;	
//-------------- Version Check --------------	
if (theAgent.indexOf("MSIE") >=0 ){
	var fno = ver.indexOf("MSIE") + 5;
		ver = ver.substring(fno,99);
		var fno = ver.indexOf(";");
		var bno = ver.indexOf("b");
		if ((bno != -1) && (bno < fno)) fno = bno;
		this.version = eval(ver.substring(0,fno));
	}else{
		var fno = ver.indexOf(" ");
		ver = ver.substring(0,fno);
		this.version = eval(ver);
	}
}

function NowTestingFunction(){
	//$B%V%i%&%6$rH=JL(B
	var IE = navigator.appName.indexOf('Microsoft',0) != -1;
	var NN = navigator.appName.indexOf('Netscape',0) != -1;
	//$B%G%#%9%W%l%$$N;HMQ2DG=NN0h$rF@$k(B
	var scWidth = screen.availWidth;
	var scHeight = screen.availHeight;

	if(IE) {
		setw = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=' + (scWidth-12) + ',height=' + (scHeight-31) + ',top=0,left=0';
		max_window = window.open('flash.html','maxwindow',setw);
	}
	else if(NN){
		setw = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,outerwidth=' + scWidth + ',outerheight=' + scHeight + ',top=0,left=0';

		max_window = window.open('flash.html','maxwindow',setw);
	}
	else{
		alert('Netscape$B!"(BIE$B0J30$N%V%i%&%6$OBP>]30$G$9!#(B')
	}
}
