function changeHeightFrame(id) {
var o=document.getElementById(id);
var mt=getActiveStyle(o.contentWindow.document.body,'margin-top');
var mb=getActiveStyle(o.contentWindow.document.body,'margin-bottom');
o.height=o.contentWindow.document.body.scrollHeight + Number(mt.match(/[0-9]+/g))+Number(mb.match(/[0-9]+/g));
}
String.prototype.camelize=function(){
return this.replace(/-([a-z])/g,function($0,$1){return $1.toUpperCase()});
}
String.prototype.deCamelize=function(){
return this.replace(/[A-Z]/g,function($0){return "-"+$0.toLowerCase()});
}
function getActiveStyle(element,property,pseudo){
if(element.currentStyle){ //IE or Opera
if(property.indexOf("-")!=-1)property=property.camelize();
return element.currentStyle[ property ];
}else if( getComputedStyle ){//Mozilla or Opera
if(property.indexOf("-")==-1)property=property.deCamelize();
return getComputedStyle(element,pseudo).getPropertyValue(property);
}
return "";
}
window.onload=function(){
changeHeightFrame("framedetail");
}
