
//キャメライズ（z-indexなどをzIndexなどに）
String.prototype.camelize = function() {
	return this.replace( /-([a-z])/g,
	function( $0, $1 ) { return $1.toUpperCase() } );
}

//デキャメライズ（zIndexなどをz-indexなどに）
String.prototype.deCamelize = function( ) {
	return this.replace( /[A-Z]/g,
	function( $0 ) { return "-" + $0.toLowerCase( ) } );
}

function getStyle( ele, property, pseudo ) {
	if( ele.currentStyle ) { //IE or Opera
		if( property.indexOf( '-' ) != -1 ) property = property.camelize();
			return ele.currentStyle[ property ];
	} else if ( getComputedStyle ) { //Mozilla or Opera
		if( property.indexOf( '-' ) == -1 ) property = property.deCamelize();
		return document.defaultView.getComputedStyle( ele, pseudo ).getPropertyValue( property );
	}

	return '';
}