//---------------------------------------------------------------------------
// HTMLオブジェクト取得

function getObj( id )
{
	return document.all && document.all(id) || document.getElementById && document.getElementById(id);
}


function shBlock(id){
    var disp = document.getElementById(id).style.display;

    if (disp == "block") {
        document.getElementById(id).style.display= "none";
    } else {
        document.getElementById(id).style.display= "block";
    }
}

// マウスイベント
function funcMouse(d,f){
	if (f == 0){
		d.src = d.src.replace(/.gif/i,"_b.gif").replace(/.jpg/i,"_b.jpg");
	}else{
		d.src = d.src.replace(/_b.gif/i,".gif").replace(/_b.jpg/i,".jpg");
	}
}
//ウインドウオープン
function funcWinOpen(file,w,h,tool,menu,lo,bar,s,resize){
	
	str = 'left="+l+",top="+r+",toolbar='+tool+',menubar='+menu+',location='+lo+',status='+bar+',scrollbars='+s+',resizable='+resize+',width='+w+',height='+h;
	sub = window.open(file,"sub",str);
	sub.window.focus();
}
//ウインドウオープン（ちくわ）
function funcWinOpen_c(file,w,h){
	
	str = 'left="+l+",top="+r+",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h;
	sub = window.open(file,"sub",str);
	sub.window.focus();
}

//ウインドウオープン（画面サイズをオートに）
function funcWinOpenAuto(file){
	
	w=(GetWindowInnnerWidth()-10);
	h=(GetWindowInnnerHeight()-10);

	str = 'left="+l+",top="+r+",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h;
	sub = window.open(file,"_blank",str);
	sub.window.focus();
}

//著作権表示
function writeCopy(ny,co){
	var strYear = "";
	myD = new Date();
	myYear = myD.getYear();
	myYears = (myYear < 2000) ? myYear+1900 : myYear;//古いブラウザ用
	
	//次の年
	if(ny != myYears){
		strYear = "-"+myYears;
	}

	document.write("COPYRIGHT&copy; 2004"+strYear+" "+co+" ALLRIGHT RESERVED.");

}
function writeBlogger(){

	t="<ul>";
	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://blog.livedoor.jp/macha928/',800,600,'no','no','no','no','yes','yes');>とりあえず</a>";
	t+="<div>M2的weblog。←この人ワタシと同じ香りがするらしい。</div>";
	t+="</li>";
/*
	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://www.ioudou.co.jp/pudding/',800,600,'no','no','no','no','yes','yes');>プリン航空☆Purin air</a>";
	t+="<div>脱臼ネタ！</div>";
	t+="</li>";
*/
	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://hankypunky.ameblo.jp/?bid=hankypunky',800,600,'no','no','no','no','yes','yes');>NO DOUBT!</a>";
	t+="<div>ロックあふれるブログ。車に音楽にサッカーと、共通点多し！</div>";
	t+="</li>";
/*
	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://www.atopi.jp/',800,600,'no','no','no','no','yes','yes');>アトピーからの脱出</a>";
	t+="<div>アトピーに関する真面目なブログ</div>";
	t+="</li>";
*/
	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://blogs.yahoo.co.jp/djtorizou',800,600,'no','no','no','no','yes','yes');>とっとこ とりぞう</a>";
	t+="<div>Dj torizou ブログ</div>";1
	t+="</li>";

	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://www.tanaweb.co.jp/blog/',800,600,'no','no','no','no','yes','yes');>GOぶろぐ</a>";
	t+="<div>薬剤師ごう先生のひとり言</div>";
	t+="</li>";
	t+="<li>";
	t+="<a href=javascript:funcWinOpen('http://blog.hiji.jp/',800,600,'no','no','no','no','yes','yes');>坊'sコラム２</a>";
	t+="<div>先輩のブログ。PC関連から焼酎・ワインレビュー‥</div>";
	t+="</li>";
	t+="</ul>";

	document.write(t);

}

function GetWindowInnnerHeight(){
	var pHeight=null;
	//NN用
	if(document.layers || document.getElementById) pHeight=window.innerHeight;
	//IE用
	if(document.all) pHeight=document.body.clientHeight;

	return pHeight;
}

function GetWindowInnnerWidth(){
	var pWidth=null;
	//NN用
	if(document.layers || document.getElementById) pWidth=window.innerWidth;
	//IE用
	if(document.all) pWidth=document.body.clientWidth;

	return pWidth;

}