
function getPosition() {
      var top    = document.documentElement.scrollTop;
      var left   = document.documentElement.scrollLeft;
      var height = document.documentElement.clientHeight;
      var width  = document.documentElement.clientWidth;
      return {top:top,left:left,height:height,width:width};
}

function showPop(){
	var width  = 250;  //弹出框的宽度
	var height = 100;  //弹出框的高度
	var obj    = document.getElementById("pop");
	
	obj.style.display  = "block";
	obj.style.position = "absolute";
	obj.style.zindex   = "999";
	obj.style.width    = width + "px";
	obj.style.height   = height + "px";
	
	var Position = getPosition();
	leftadd = (Position.width-width)/2;
	topadd  = (Position.height-height)/2;
	//obj.style.top  = (Position.top  + topadd)  + "px";
	//obj.style.left = (Position.left + leftadd) + "px";
	obj.style.top  = "420px";
	obj.style.left = "320px";
	
	
}

function hidePop(){
	document.getElementById("pop").style.display = "none";
}

function setCopy(_sTxt){
    if(navigator.userAgent.toLowerCase().indexOf('ie') > -1){
        clipboardData.setData('Text',_sTxt);
        alert ("网址“"+_sTxt+"” 已经复制到您的剪贴板中\n您可以将其推荐给好友");
    } else {
        prompt("请复制网站地址:",_sTxt); 
    }
}

function setCopy1(_sTxt){
    if(navigator.userAgent.toLowerCase().indexOf('ie') > -1){
        clipboardData.setData('Text',_sTxt);
        alert ( _sTxt+"，已复制到您的剪贴板中");
    } else {
        prompt(_sTxt); 
    }
}
