// ------------[+]-- DynamicHTML Common Codes 
// ------------[+]-- Copyright (C) 2002- HP-DESIGN.NET. 
// ------------[+]-- Takeru [ http://hp-design.net/ ] 
// No reproduction , no republication without written permission of HP-DESIGN.NET 
// Must not delete this copyright in order to use this script 


// ブラウザチェック関数
function getBrowserInfo(){ 
	this.majorver = parseInt(navigator.appVersion) ;
	this.agent = navigator.userAgent.toLowerCase() ;
	this.platform = navigator.platform.toLowerCase() ;
	this.mac = ( this.platform.indexOf('mac') != -1 ) ? 1 : 0 ;
	this.win = ( this.platform.indexOf('win') != -1 ) ? 1 : 0 ;

	this.dom1 = ( document.getElementById ) ? 1 : 0 ;
	this.dom2event = ( document.addEventListener && document.removeEventListener ) ? 1 : 0 ;

	this.opera = ( ( this.agent.indexOf('opera') != -1 ) || window.opera ) ? 1 : 0 ; ;
	if ( this.opera ) {
		this.opera5 = this.agent.indexOf('opera 5') ? 1 : 0 ;
		this.opera6 = this.agent.indexOf('opera 6') ? 1 : 0 ;
		return this ;
	}
	this.ie = ( ( this.agent.indexOf('msie') != -1 ) && !this.opera ) ? 1 : 0 ;;
	if ( this.ie ) {
		this.ie4 = ( ( this.agent.indexOf('msie 4') != -1 ) && !this.dom1 ) ? 1 :0 ;
		this.ie5 = ( ( this.agent.indexOf('msie 5') != -1 ) && this.dom1 ) ? 1 : 0 ;
		this.ie55 = ( this.ie5 && window.createPopup ) ? 1 : 0 ;
		this.ie6 = ( ( this.agent.indexOf('msie 6') != -1 ) && this.dom1 ) ? 1 : 0 ;
		this.ie6s = ( this.ie6 && ( document.compatMode == "CSS1Compat" ) ) ? 1 : 0 ;
		this.ie4up = ( this.majorver >= 4 ) ? 1 : 0 ;
		this.ie5up = ( ( this.majorver >= 4 ) && !this.ie4 ) ? 1 : 0 ;
		this.ie55up = ( ( this.majorver >= 4 ) && !this.ie4 && !this.ie5 ) ? 1 : 0 ;
		this.ie6up = ( ( this.majorver >= 4 ) && !this.ie4 && !this.ie55 ) ? 1 : 0 ;
		return this ;
	}
	this.net = 	( ( ( this.agent.indexOf('netscape') != -1 ) || 
		( this.agent.indexOf('mozilla') != -1 ) ) && !this.opera ) ? 1 : 0 ;
	if ( this.net ) {
		this.net4 = ( document.layers && !this.dom1 ) ? 1 : 0 ;
		this.net6 = ( ( this.majorver >= 5 ) && this.dom2event ) ? 1 : 0 ;
		this.net4up = ( this.majorver >= 4 ) ? 1 : 0 ;
		this.net6up = ( ( this.majorver >= 5 ) && !this.net4 ) ? 1 : 0 ;
		return this ;
	}
	return this ;
}	// Call getBrowserInfo function and set prop in _bw 
	var _bw = new getBrowserInfo ;

// HTMLオブジェクトを取得
function getObjectById(id) {
	if( _bw.net4 ) { var net4s = '' ;
		for ( var i = 1 ; i < arguments.length ; i++ ) 
			{ net4s += 'document.' + arguments[i] + '.' }
		net4s += 'document.' + id ; return eval( net4s ) ;
	}
	if( _bw.ie6up || _bw.net6up || _bw.opera6 ) 
		{ return document.getElementById(id) }
	if( _bw.ie4up || _bw.opera ) { return document.all(id) }
}



