window.onload=function(){
//ページカウンター処理
	comSetCounterPage(comGetFileName());

	iframeResize();	
	
}
function iframeResize(){
var oFrame = document.getElementById('ifm_keijiban');
var PageHight = oFrame.contentWindow.document.body.scrollHeight; // ページの高さを取得
var sMTop = getStyle( oFrame.contentWindow.document.body, 'margin-bottom');
var sMBottom = getStyle( oFrame.contentWindow.document.body, 'margin-bottom');

	PageHight += Number(sMTop.match(/[0-9]+/g));
	PageHight += Number(sMBottom.match(/[0-9]+/g));

	PageHight += 61;

	oFrame.style.height = PageHight + 'px'; // iframeの高さを変更

}

  
//キャメライズ（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 '';   
}  
