﻿function bar_xy(Site)
{
	var msg		=	"<table border='0' width='92%' cellspacing='0' cellpadding='5' align='center'><tr><td align='left'>"
				+	"<br>欢迎您加入【"+Site+"】参加交流和讨论，【"+Site+"】为公共讨论区，为维护网上公共秩序和社会稳定，请您自觉遵守以下条款：<br><br>"
				+	"一、不得利用本站危害国家安全、泄露国家秘密，不得侵犯国家社会集体的和公民的合法权益，不得利用本站制作、复制和传播下列信息：<br>"
				+	"（一）煽动抗拒、破坏宪法和法律、行政法规实施的；<br>"
				+	"（二）煽动颠覆国家政权，推翻社会主义制度的；<br>"
				+	"（三）煽动分裂国家、破坏国家统一的；<br>"
				+	"（四）煽动民族仇恨、民族歧视，破坏民族团结的；<br>"
				+	"（五）捏造或者歪曲事实，散布谣言，扰乱社会秩序的；<br>"
				+	"（六）宣扬封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖、教唆犯罪的；<br>"
				+	"（七）公然侮辱他人或者捏造事实诽谤他人的，或者进行其他恶意攻击的；<br>"
				+	"（八）损害国家机关信誉的；<br>"
				+	"（九）其他违反宪法和法律行政法规的。<br><br>"
				+	"二、互相尊重，对自己的言论和行为负责。"
				+	"</td></tr></table>";

	Dialog.alert(msg,{windowParameters:{width:580,height:380},okLabel:"关闭",buttonClass:"sbbarset"});
}

function sAlert(txt){
	var eSrc=(document.all)?window.event.srcElement:arguments[1];
	var shield = document.createElement("DIV");
	shield.id = "shield";
	shield.style.position = "absolute";
	shield.style.left = "0px";
	shield.style.top = "0px";
	shield.style.width = "100%";
	shield.style.height = document.body.scrollHeight+"px";
	shield.style.background = "#fff";
	shield.style.textAlign = "center";
	shield.style.zIndex = "10000";
	shield.style.filter = "alpha(opacity=0)";
	shield.style.opacity = 0;
	var alertFram = document.createElement("DIV");
	alertFram.id="alertFram";
	alertFram.style.position = "absolute";
	alertFram.style.left = "50%";
	alertFram.style.top = "45%";
	alertFram.style.marginLeft = "-225px" ;
	alertFram.style.marginTop = -75+document.documentElement.scrollTop+"px";
	alertFram.style.width = "398px";
	alertFram.style.height = "150px";
	alertFram.style.background = "#ccc";
	alertFram.style.textAlign = "center";
	alertFram.style.lineHeight = "150px";
	alertFram.style.zIndex = "10001";

	strHtml  = "<ul style=\"list-style:none;margin:0px;padding:0px;width:100%;border:1px solid #498AC2;background:url(../../images/alter_bg.gif) #fff;\">\n";
	strHtml += "	<li style=\"background:url(../../images/alter_bar.gif) no-repeat #45A0EE;text-align:left;padding-left:20px;font-size:12px;color:#fff;font-weight:bold;height:25px;line-height:25px;\">珠海商城zhuhaimall提示</li>\n";
	strHtml += "	<li style=\"text-align:center;font-size:12px;color:#327FC6;height:100px;line-height:120px;\">"+txt+"</li>\n";
	strHtml += "	<li style=\"text-align:center;height:35px;line-height:25px;\"><input type=\"button\" class=\"input_Alter\" value=\"确 定\" id=\"do_OK\" onclick=\"doOk()\" /></li>\n";
	strHtml += "</ul>\n";
	alertFram.innerHTML = strHtml;
	document.body.appendChild(alertFram);
	document.body.appendChild(shield);
	this.setOpacity = function(obj,opacity){
		if(opacity>=1)opacity=opacity/100;
		try{ obj.style.opacity=opacity; }catch(e){}
		try{ 
			if(obj.filters.length>0&&obj.filters("alpha")){
				obj.filters("alpha").opacity=opacity*100;
			}else{
				obj.style.filter="alpha(opacity=\""+(opacity*100)+"\")";
			}
		}catch(e){}
	}
	var c = 0;
	this.doAlpha = function(){
		if (++c > 20){clearInterval(ad);return 0;}
		setOpacity(shield,c);
	}
	var ad = setInterval("doAlpha()",1);
	this.doOk = function(){
		document.body.removeChild(alertFram);
		document.body.removeChild(shield);
		eSrc.focus();
		document.body.onselectstart = function(){return true;}
		document.body.oncontextmenu = function(){return true;}
	}
	document.getElementById("do_OK").focus();
	eSrc.blur();
	document.body.onselectstart = function(){return false;}
	document.body.oncontextmenu = function(){return false;}
}

function myAlert(str){
   var msgw,msgh,bordercolor;
   msgw=400;//提示窗口的宽度
   msgh=100;//提示窗口的高度
   titleheight=25 //提示窗口标题高度
   bordercolor="#498AC2";//提示窗口的边框颜色
   titlecolor="#99CCFF";//提示窗口的标题颜色
   
   var sWidth,sHeight;
   sWidth=document.body.offsetWidth;
   sHeight=document.body.offsetHeight;

   var bgObj=document.createElement("div");
   bgObj.setAttribute('id','bgDiv');
   bgObj.style.position="absolute";
   bgObj.style.top="0";
   bgObj.style.background="#fff";
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
   bgObj.style.opacity="0.6";
   bgObj.style.left="0";
   bgObj.style.width=sWidth + "px";
   bgObj.style.height=sHeight + "px";
   bgObj.style.zIndex = "10000";
   document.body.appendChild(bgObj);
   
   var msgObj=document.createElement("div")
   msgObj.setAttribute("id","msgDiv");
   msgObj.setAttribute("align","center");
   msgObj.style.background="white";
   msgObj.style.border="1px solid " + bordercolor;
      msgObj.style.position = "absolute";
            msgObj.style.left = "50%";
            msgObj.style.top = "50%";
            msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
            msgObj.style.marginLeft = "-225px" ;
            msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
            msgObj.style.width = msgw + "px";
            msgObj.style.height =msgh + "px";
            msgObj.style.textAlign = "center";
            msgObj.style.lineHeight = (msgh-titleheight) + "px";
            msgObj.style.zIndex = "10001";
   
     var title=document.createElement("h4");
     title.setAttribute("id","msgTitle");
     title.setAttribute("align","right");
     title.style.margin="0";
     title.style.padding="3px";
     title.style.background=bordercolor;
     title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
     title.style.opacity="0.75";
     title.style.border="1px solid " + bordercolor;
     title.style.height="18px";
     title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";
     title.style.color="white";
     title.style.cursor="pointer";
     title.innerHTML="关闭";
     title.onclick=function(){
							  document.body.removeChild(bgObj);
							  document.getElementById("msgDiv").removeChild(title);
							  document.body.removeChild(msgObj);
							}
     document.body.appendChild(msgObj);
     document.getElementById("msgDiv").appendChild(title);
     var txt=document.createElement("p");
     txt.style.margin="0em 0"
     txt.setAttribute("id","msgTxt");
     txt.innerHTML=str;
	 document.getElementById("msgDiv").appendChild(txt);
}
