function iframeAutoFit() {
  try {
    if(window != parent) {
      var a = parent.document.getElementsByTagName("IFRAME");
      for(var i = 0; i < a.length; i++) {
        if(a[i].contentWindow == window) {
          var h1 = 0, h2 = 0, d = document, dd = d.documentElement;
          a[i].parentNode.style.height = a[i].offsetHeight +"px";
          a[i].style.height = "10px";
          if(dd && dd.scrollHeight) {
            h1=dd.scrollHeight;
          }
          if(d.body) {
            h2 = d.body.scrollHeight;
          }
          var h = Math.max(h1, h2);
          if(document.all) {
            h += 4;
          }
          if(window.opera) {
            h += 1;
          }
          a[i].style.height = a[i].parentNode.style.height = h +"px";
        }
      }
    }
  } catch(ex) {}
}

if(window.attachEvent) {
  window.attachEvent("onload", iframeAutoFit);
} else if(window.addEventListener) {
  window.addEventListener("load", iframeAutoFit, false);
}
/****弹出窗*****/
function showDiv(tcid){
var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
document.getElementById('popDiv'+tcid).style.display='block';
document.getElementById('popIframe'+tcid).style.display='block';
document.getElementById('bg'+tcid).style.display='block';
if(version!=6){
document.getElementById('popDiv'+tcid).style.marginTop="-"+document.getElementById('popDiv'+tcid).clientHeight/2+"px";
}
}

/**关闭弹窗*/
function guanbitc(tcid){
document.getElementById('popDiv'+tcid).style.display='none';
document.getElementById('bg'+tcid).style.display='none';
document.getElementById('popIframe'+tcid).style.display='none';
}
/****弹出窗在父框架*****/
function showDivf(fid){
var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
window.parent.document.getElementById('popDiv'+fid).style.display='block';
window.parent.document.getElementById('popIframe'+fid).style.display='block';
window.parent.document.getElementById('bg'+fid).style.display='block';
if(version!=6){
window.parent.document.getElementById('popDiv'+fid).style.marginTop="-"+window.parent.document.getElementById('popDiv'+fid).clientHeight/2+"px";
}
}
/************数字键盘输入*************/
function szjpsr(jieshou,zhi){
	if(zhi<=9){
	document.getElementById(jieshou).value=document.getElementById(jieshou).value+zhi
	}
	else if(zhi==10){
		document.getElementById(jieshou).value=""
	}
	else if(zhi==11){
		document.getElementById(jieshou).value=document.getElementById(jieshou).value+0
	}
	else if(zhi==12){
		var ss=document.getElementById(jieshou).value
		document.getElementById(jieshou).value=ss.substring(0,ss.length-1)
	}
	
}
function szjpsr_d(jieshou,zhi){
	if(zhi<=9){
	document.getElementById(jieshou).value=document.getElementById(jieshou).value+zhi
	}
	else if(zhi==10){
		document.getElementById(jieshou).value=document.getElementById(jieshou).value+"."
	}
	else if(zhi==11){
		document.getElementById(jieshou).value=document.getElementById(jieshou).value+0
	}
	else if(zhi==12){
		var ss=document.getElementById(jieshou).value
		document.getElementById(jieshou).value=ss.substring(0,ss.length-1)
	}
	
}