﻿
//窗体滚动
window.onscroll=sc1; 
var ShowId='div_ad_tishi';

//异常浮层
function EXPFCShow(msg)
{
    document.getElementById('div_ad').style.display = '';
    document.getElementById('titleclose').innerHTML='<span class="title">'+msg+'</span><a href="tuan.aspx" class="close"><span>X</span></a>'
    document.getElementById('content1').innerHTML='<div style="text-align:center;">'+msg+'</div>';
    document.getElementById('btnpane').innerHTML='<div style="text-align:center;"><a href="tuan.aspx" style="width:72px;height:22px;background:url(/img/FuCeng/popup_btn.png) no-repeat;display:block;cursor:pointer; margin:0 auto"> </a></div>';
    ShowId="div_ad";
    sc1();
   ShowParentFC();


}
function getParam(name) {	var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)( \\s|&|$)", "i");	    if (reg.test(location.href)) 	    return unescape(RegExp.$2.replace(/\+/g, " ")); 	return ""; }; 

//显示浮层
function FCShow(ID)
{
   ShowId=ID;
   document.getElementById(ID).style.display = '';
   ShowParentFC();
    sc1();
}

//显示下一浮层，关闭当前浮层
function FCNShow(ID,NID)
{

   document.getElementById(ID).style.display = 'none';
   document.getElementById(NID).style.display = '';
   ShowId=NID;
   sc1();
   ShowParentFC();
}



//取消
function rm(ID)
{
    document.getElementById(ID).style.display = 'none';
    document.getElementById('parent_div').style.display = 'none';

}
//滚动
function sc1(){    
document.getElementById(ShowId).style.top=(document.documentElement.scrollTop+document.body.scrollTop+(document.documentElement.clientHeight-document.getElementById(ShowId).offsetHeight)/2)+"px";    
document.getElementById(ShowId).style.left=(document.documentElement.scrollLeft+(document.documentElement.clientWidth-document.getElementById(ShowId).offsetWidth)/2)+"px";    
} 
  
//弹出笼罩层
function ShowParentFC()
{  
     var bodyheight = document.getElementById('ad_body').clientHeight;
     var a = document.getElementById("parent_div");
	 var t = parseInt(bodyheight)+100;
	 if(t > 4000) t = 4000;
	 t += "px";
     a.style.display = '';
	 a.style.height = t;

}


