function isMacintoshBrowser()
{ 
	return(navigator.appVersion.lastIndexOf('Mac') != -1 );
}

function hlAp() {
if (isMacintoshBrowser()) {
	var newWindow = window.open("headline.html","headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=450") ;
	var newWindow = window.open("headline.html","headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=450")
	}
else {
	var newWindow = window.open("headline.html","headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=500") ;
	var newWindow = window.open("headline.html","headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=500")
}
}

function hlApEx(loc) {
if (isMacintoshBrowser()) {
	var newWindow = window.open(loc,"headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=450") 
	var newWindow = window.open(loc,"headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=450") 
	}
else {
	var newWindow = window.open(loc,"headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=500") 
	var newWindow = window.open(loc,"headline","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=yes,HEIGHT=300,WIDTH=500") 

}
}

function usingFrame(){
	doc = open("../index.html","_top");
}

function mlifeWindow(loc, height, width, title, comment) {
	var wnd = "imagewnd";
	var heightWnd = height + 50;
	var widthWnd = width + 50;
	lifeWindow = window.open("", wnd, "menubar=yes,resizable=yes,scrollbars=yes,status=yes,width=" + widthWnd + ",height=" + heightWnd);
	lifeWindow.document.write("<HTML><HEAD>");
	lifeWindow.document.write("<TITLE>" + title + "</TITLE></HEAD>");
	lifeWindow.document.write("<BODY BGCOLOR=#FFFFFF><DIV ALIGN=Center><TABLE WIDTH=" + width + "><TR><TD><FONT FACE=\"Osaka, ＭＳ Ｐゴシック\" SIZE=\"-1\">");
	lifeWindow.document.write("<DIV ALIGN=Center><IMG SRC=\"" + loc + "\" WIDTH=" + width + " HEIGHT=" + height + "></DIV><BR>");
	if (comment != "") {
		lifeWindow.document.write(comment);
	}
	lifeWindow.document.write("</FONT></TD></TR></TABLE></DIV></BODY></HTML>");
	lifeWindow.document.close();
	lifeWindow.focus();
}

function fkWindow(loc, height, width, title, comment) {
	var wnd = "imagewnd";
	var heightWnd = height + 50;
	var widthWnd = width + 50;
	fukuWindow = window.open("", wnd, "menubar=yes,resizable=yes,scrollbars=yes,status=yes,width=" + widthWnd + ",height=" + heightWnd);
	fukuWindow.document.write("<HTML><HEAD>");
	fukuWindow.document.write("<TITLE>" + title + "</TITLE></HEAD>");
	fukuWindow.document.write("<BODY BGCOLOR=#000000 TEXT=#FFFFFF><DIV ALIGN=Center><TABLE WIDTH=" + width + "><TR><TD><FONT FACE=\"Osaka, ＭＳ Ｐゴシック\" SIZE=\"-1\">");
	fukuWindow.document.write("<DIV ALIGN=Center><IMG SRC=\"" + loc + "\" WIDTH=" + width + " HEIGHT=" + height + "></DIV><BR>");
	if (comment != "") {
		fukuWindow.document.write(comment);
	}
	fukuWindow.document.write("</FONT></TD></TR></TABLE></DIV></BODY></HTML>");
	fukuWindow.document.close();
	fukuWindow.focus();
}

function bunnerWindow() {
	var newWindow = window.open("bunner_info.html","bunner_info","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=no,HEIGHT=240,WIDTH=380") 
	var newWindow = window.open("bunner_info.html","bunner_info","TOOLBAR=0,scrollbars=yes,resizable=yes,status=yes,menubar=no,HEIGHT=240,WIDTH=380") 
}

function URLList ()
{
	var argv = URLList.arguments;
	var argc = argv.length;
	this.list = new Object();
	for (var i = 0; i < argc; i++)
	this.list[i] = argv[i];
	this.count = argc;
	return this;
}

function NextRandomNumber()
{
	var hi   = this.seed / this.Q;
	var lo   = this.seed % this.Q;
	var test = this.A * lo - this.R * hi;
	if (test > 0)
		this.seed = test;
	else
		this.seed = test + this.M;
	return (this.seed * this.oneOverM);
}

function RandomNumberGenerator() 
{
	var d = new Date();
	this.seed = 2345678901 +
	(d.getSeconds() * 0xFFFFFF) +
	(d.getMinutes() * 0xFFFF);
	this.A = 48271;
	this.M = 2147483647;
	this.Q = this.M / this.A;
	this.R = this.M % this.A;
	this.oneOverM = 1.0 / this.M;
	this.next = NextRandomNumber;
	return this;
}

var rand = new RandomNumberGenerator();

function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}


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_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 tegamiWindow()
{
	var title = "MAIL TO ME"
	var tgm = "Macoteau&nbsp;T（このサイトの管理者）にメールを出すには下記リンクをクリックして下さい。"
	var width="320", height="160";
	var left = (screen.width/2) - width/2;
	var top = (screen.height/2) - height/2;
	var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;  
	var mot1 = '&#108&#116&#111';
	var mot2 = '&#109&#97&#105';
	var mot3 = '&#104&#101&#100';
	var mot4 = '&#97&#108&#98';
	var mot5 = '&#111&#116&#101&#97';
	var mot6 = '&#109&#97&#99';
	var mot7 = '&#117&#46&#99&#111&#109';
	var mota = '</P><P Align="center" style="font-family: Impact; font-size: midium;"><a href="' + mot2 + mot1 + '&#58' + mot4 + mot3 + '&#64' + mot6 + mot5 + mot7 + '" lang="en">mail to Macoteau T</A>';
	var tgmWindow = window.open("","tgmWindow", styleStr);
	var head = '<head><title>'+title+'</title></head>';
	var body = '<BODY><P style="float:none; margin:2em; text-align: left; width:260; font-size: 12px; font-family: ヒラギノ丸ゴ Pro W4, Osaka;">'+ tgm + mota + '</P><center><form><input type="button" value="   close   " onClick="self.close()"></form></P>';
	tgmWindow.document.write(head + body);
}
