/*******************************发送私信弹出层*******************************************/
function popupLayer(backgroundPopup,showContent,layerClose){
var popupStatus = 0;   
function loadPopup() {   
    if(popupStatus==0){  
        $(backgroundPopup).css({ 
			width: $(document).width(),
			height: $(document).height(),
            "opacity": "0.6" ,
			"filter":"alpha(opacity:60)",
			"z-index":"900" ,
			"background":"#000000" 
			
        });  
        $(backgroundPopup).fadeIn("slow");  
        $(showContent).fadeIn("slow");  
        popupStatus = 1;  
    }  
}  

function disablePopup() {  
    
    if(popupStatus==1){  
        $(backgroundPopup).fadeOut("slow");  
        $(showContent).fadeOut("slow");  
        popupStatus = 0;  
    }  
}  

function centerPopup(){  
    var sWidth;var sHeight;  
    sWidth=window.screen.availWidth;  
    sHeight = document.body.scrollHeight;    
    var popupHeight = $(showContent).height();  
    var popupWidth = $(showContent).width();  
      
    $(showContent).css({  
		"z-index": "1000", 
        "top": "200px",
        "left": sWidth/2-popupWidth/2  
    });  
     
      
    $(backgroundPopup).css({  
        "height": window.screen.availHeight,  
        "width":window.screen.availWidth  
    });  
      
}  
 
$(function(){  
                   
    $(layerClose).click(function(){  
        disablePopup();  
});  
 
    $(document).keypress(function(e){  
        if(e.keyCode==27 && popupStatus==1){  
            disablePopup();  
        }  
    });  
 
});
centerPopup();  
loadPopup();
/*
$(function(){
	$(touchOffBtn).click(function(){
		centerPopup();  
		loadPopup();
	});
});
*/
};
/*******************************发送私信弹出层********end***********************************/