//----------------------------------------
//
// サイト全般用
//
//----------------------------------------

// ID でオブジェクトを取得する
function SiteGetObjectByID( strID ){

	var Object = null;

	if ( document.getElementById ){
		Object = document.getElementById( strID );
	}
	else if( document.all ){
		Object = document.all( strID );
	}

	return Object;

}

// インナーにテキストを設定する
function SiteSetInnerText( strID, strText ){

	var Object = null;

	Object = SiteGetObjectByID( strID );

	if( Object ){
		Object.innerHTML = "";
		Object.innerHTML = strText;
	}

}


// インナーからテキストを取得する
function SiteGetInnerText( strID ){

	var strText = "";
	var Object = null;

	Object = SiteGetObjectByID( strID );

	if( Object ){
		strText = Object.innerHTML;
	}

	return strText;

}

// 透明度の設定 (0-100)
function SiteSetOpacity( strID, intValue ){

	var Object = null;

	Object = SiteGetObjectByID( strID );

	if( Object ){
		Object.style.opacity = intValue / 100;
		Object.style.filter = "alpha(opacity=" + intValue + ")";
		Object.style.visibility = "visible";
	}

}

// マウスの位置を取得
function GetMousePosition(e){
	if(window.opera){
		intMouseX = e.clientX;
		intMouseY = e.clientY;
	}
	else if(document.all){
		intMouseX = document.body.scrollLeft + event.clientX;
		intMouseY = document.body.scrollTop  + event.clientY;
	}
	else if(document.layers||document.getElementById){
		intMouseX = e.pageX;
		intMouseY = e.pageY;
	}
}
