// ia.js
// Version 1.00
// Copyright (c)2007 econosy system http://www.econosys.jp/system/

//==================================================== ：onload
$(function(){
	// デフォルトのALTをセット
	mo();

	// 全ての .icon_topproject を持つ <a>タグの中の<img>タグにイベントを登録
	$("a[@class=icon_topproject]/img").each(function(i) {
		$(this).hover(
	      function() { ia_topproject(this); },
	      function() { mo_topproject(); }
		);
	});

});


//==================================================== ：マウスオーバー時の動作
function ia_topproject(dom_obj) {
	// alert(dom_obj);
	text=dom_obj.alt;
	document.getElementById('imagename_text_topproject').innerHTML=text;
}


//==================================================== ：デフォルトのALTテキストセット（マウスアウト時の動作）
function mo_topproject() {

	document.getElementById('imagename_text_topproject').innerHTML='';

/*
	var $target = $("#images_menu_box2");
	dom_obj=$("a[@class=icon_on]/img", $target).get(0);		// getメソッドでDOMオブジェクトを返す。
//alert(dom_obj.alt);
	document.getElementById('imagename_text_topproject').innerHTML=dom_obj.alt;
*/
}





//==================================================== ：ダンプ
function jquery_dump($obj) {
	var dumphtml = [];
	if($.browser.msie) {
		for(var i = 0; i < $obj.length; i++) {
			dumphtml.push('[' + i + '] ');
			dumphtml.push($obj[i].outerHTML.replace(/^[\r\n\t]+/, ''));
			dumphtml.push("\n");
		}
	} else {
		for(var i = 0; i < $obj.length; i++) {
			dumphtml.push('[' + i + '] '
				+ '<' + $obj[i].nodeName.toLowerCase());
			for(var j = 0; j < $obj[i].attributes.length; j++) {
				dumphtml.push(' ' + $obj[i].attributes[j].nodeName + '="' 
					+ $obj[i].attributes[j].nodeValue + '"');
			}
			dumphtml.push('>' + $obj[i].innerHTML);
			dumphtml.push('<\/' + $obj[i].nodeName.toLowerCase() + '>');
			dumphtml.push("\n");
		}
	}
	alert(dumphtml.join(''));
}
