//画像切り替え
function illust(mySrc,msg) {
document.getElementById('main').src = mySrc;
document.getElementById('day').innerHTML = msg;
document.getElementById('main').style.maxHeight = 650;
document.getElementById('main').style.maxWidth = 650;
}

function bism() {
name = document.getElementById('main').src;
image = new Image();
image.src = name;
hm = image.height;
wm = image.width;
hnow = document.getElementById('main').height;
wnow = document.getElementById('main').width;
if(hnow < hm){
	document.getElementById('main').style.maxHeight = hm;
	document.getElementById('main').style.maxWidth = wm;
}else{
	document.getElementById('main').style.maxHeight = 650;
	document.getElementById('main').style.maxWidth = 650;

}
}

var menub = 100;
//メニューボタン
function menubu(i){
if(menub != i){
	for(c=0;c<11;c++){
		document.getElementsByTagName('span').item(c).id = "off";
	}
	document.getElementsByTagName('span').item(i).id = "on";
}
menub=i;

}


//javascript判定
function jsok(){
document.getElementById('illust_button').innerHTML = '<a href="illust/illust/illust_js.html">イラスト</a>';
}

function jsok2(){
	var ua=navigator.userAgent;
	var nHit=ua.indexOf("MSIE");
	var bIE=(nHit >= 0);
	var bVer6=(bIE && ua.substr(nHit+5,1) == "6");
	var bStd=(document.compatMode && document.conpatMode=="CSS1Conpat");
	var ilbu=document.getElementById('illust_button');
	var ilbua=ilbu.firstChild;
	
	if(bIE){
		ilbua.href = "illust/illust/illust_js_ie.html";
	}else{
		ilbua.href = "illust/illust/illust_js.html";
	}
}

function kou_illust(im){
var ilht="http://www2.wbs.ne.jp/~a5--4/maru/illust/illust/illust_js.html";
location.href=ilht;
Src=im;
}
var myEvent;
if(window.addEventListener){
document.addEventListener('mouseover',function(e){ myEvent = e }, true);
document.addEventListener('mouseout',function(e){ myEvent = e }, true);
myEvent= myEvent || window.event;
}

function img_k(pic,f){
var im=document.getElementById('new_im');
if(myEvent == window.event || myEvent){
var mx=myEvent.clientX;
var my=myEvent.clientY;
}

if(f==1){
var nt=new Image();
nt.src="illust/illust/"+pic;
nt.onload=function(){
im.src=nt.src;
var hh=im.height;
var ww=im.width;
var m=Math.max(hh,ww);
hh=hh*(400/m);
im.style.top=my-(hh-30);
im.style.left=mx+50;
im.style.display="block";
}
}else{
im.style.display="none";
}
}