﻿<!--
var Code = 0;
var text_enter_url      = "请输入连接网址";
var text_enter_txt      = "请输入连接说明";
var text_enter_image    = "请输入图片网址";
var error_no_url        = "您必须连接网址";
var error_no_txt		= "您必须连接说明";
var error_no_gset       = "必须正确按照各式输入！";
var error_no_gtxt       = "必须输入文字！";
function commentWrite(NewCode) {
	document.getElementById("content").value+=NewCode;
	document.getElementById("content").focus();
	return;
}
function Cbold() 
{
	fontbegin="[B]";
	fontend="[/B]";	
	fontchuli();
}
function doSize()
{
    return true;
}
function Curl() 
{
    var AddTxt;
       txt2=prompt("链接文本显示.\n如果不想使用, 可以为空, 将只显示超级链接地址. ","");
        if (txt2!=null) {
            txt=prompt("超级链接.","http://");
            if (txt!=null) {
                if (txt2=="") {
                    AddTxt="[a]"+txt+"[/a]";
                 } else {
                    AddTxt="[a href='"+txt+"' target='_blank']"+txt2+"[/a]";
                 }
            }
        }
    document.getElementById("content").value+=AddTxt;	
	document.getElementById("content").focus();
}
function specialchar(){
	var ret ;
	window.open("/inc/setWords.htm","win","menubar=no,resizable=yes,scrollbars=no,status=no,width=500,height=500,location=no");
}

function AddText(text) {
		if(document.all){
			insertAtCaret(document.getElementById("content"), text);
		} else{
			document.getElementById("content").value +=	text;
		}
		setfocus();
}

function AddPhoto(text) {
		if(document.all){
			insertAtCaret(document.getElementById("content"), text);
		} else{
			document.getElementById("content").value +=	text;
		}
		setfocus();
}

function UpMusicMove(host)
{
    window.open("http://post.music.hexun.com/UploadSpaceCover.aspx?type=2&host="+host,"插入音乐视频", "height=500, width=640, top=150, left=150, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
}

function insertAtCaret (area,	text){
		if (area.createTextRange && area.caretPos){
				var	caretPos = area.caretPos;
				caretPos.text += caretPos.text.charAt(caretPos.text.length - 2)	== ' ' ? text +	' '	: text;
		} else if(area) {
				area.value +=	text;
		} else {
			area.value = text;
		}
}

function setfocus()	{
	document.getElementById("content").focus();
}

function storeCaret	(area){
		if(area.createTextRange){
				area.caretPos	= document.selection.createRange().duplicate();
		}
}
function popwSingleUpload(host)
{
	var a;
	target=window.location.hostname.substring(0,window.location.hostname.indexOf('.hexun.com'));
	a = window.open("http://post.photo.hexun.com/upload/tiebaupload.aspx?url="+target+"&host="+host,"uploadphoto","scrollbars=no,left=100,top=100,height=356,width=600");
}
function FileUpload(host)
{
    var a;
	a = window.open("http://hexun.com/UpLoadExpertFile.aspx?host="+host,"fileupload","scrollbars=no,left=100,top=100,height=356,width=600");
}
function fontchuli()
{
	if ((document.selection)&&(document.selection.type == "Text")) 
	{
		var range = document.selection.createRange();
		var ch_text=range.text;
		range.text = fontbegin + ch_text + fontend;
	} 
	else 
	{
	document.getElementById("content").value=fontbegin+document.getElementById("content").value+fontend;
	document.getElementById("content").focus();
	}
}
function fontchuliurl()
{
	if ((document.selection)&&(document.selection.type == "Text")) 
	{
		var range = document.selection.createRange();
		var ch_text=range.text;
		range.text = fontbegin + ch_text + fontend;
	} 
	else 
	{
	var FoundErrors = '';
	var enterTxT   = prompt(text_enter_txt, "");
	if(!enterTxT)
	   	FoundErrors += error_no_txt;
	if(FoundErrors)
		return;
	var ToAdd = "[URL]"+enterTxT+"[/URL]";
	document.getElementById("content").value+=ToAdd;	
	document.getElementById("content").focus();
	}
}
function funSearch()
{
    if(document.getElementById("sw").value =="")
	{
		alert("必须输入搜索条件！");
		return false;
	}
}
function funCheck()
{
	if(document.getElementById("content").value =="")
	{
		alert("内容必添！");
		return false;
	}
	
	if(document.getElementById("reason").value =="")
	{
		alert("修改原因必添！");
		return false;
	}
	return true;
}
function getValue(){
    //alert(document.getElementById("content").value);//..form1.getElementsByTagName("content"));
    document.pre.pretitle.value = document.getElementById("title").value;  
	document.pre.prelemma.value = document.getElementById("content").value;
	document.pre.pretag.value = document.getElementById("tags").value;
	document.pre.preref.value = document.getElementById("reference").value;
	gotoPreview();
}
function gotoPreview(){
	document.pre.submit();
}
function inFace (emotcode) {
	var current=document.getElementById('content');
	var emot = '[f:'+emotcode+']';
	if (current) {

		if (current.value!='' && current.value!=null) {
			document.getElementById("content").value+=emot;
		}
		else {
			document.getElementById("content").value=emot;
		}
	}
}
//文章引用
function Quote(aID)
{
    //aID文章ID
    document.getElementById('AQuote').value=aID;
    document.getElementById("commenttag").innerHTML = '【引用评论】<span onclick=cancelquote(); style="cursor:hand; color:ff0000;">【取消引用】</span>'; 
}
//评论引用
function CommentQuote(cID)
{
    //评论ID
    document.getElementById('CQuote').value=cID;
    document.getElementById("commenttag").innerHTML = '【引用评论】<span onclick=cancelquote(); style="cursor:hand; color:ff0000;">【取消引用】</span>'; 
}
//股吧文章引用
function StockQuote(aID)
{
    document.getElementById("AQuote").value=aID;
    document.getElementById("commenttag").innerHTML = '【引用评论】<span onclick=cancelquote(); style="cursor:hand; color:ff0000;">【取消引用】</span>'; 
}
//股吧评论引用
function StockCommentQuote(cID)
{
    document.getElementById("CQuote").value=cID;
    document.getElementById("commenttag").innerHTML = '【引用评论】<span onclick=cancelquote(); style="cursor:hand; color:ff0000;">【取消引用】</span>'; 
}
//取消引用
function cancelquote()
{
    document.getElementById('AQuote').value='0';
	document.getElementById('CQuote').value='0';
	document.getElementById("commenttag").innerHTML = '';
}
//快速回复
function RComment()
{
    document.getElementById("content").focus();
}
//股吧快速回复
function StockRComment()
{
    if(document.all)
    {
    }
    else
    {
        document.getElementById("a1").contentWindow.document.getElementById("content").focus();
    }
}
function popwUnionTopic()
{
	var a;
	var target=window.location.hostname.substring(0,window.location.hostname.indexOf('.hexun.com'));
	//a = window.open("http://post.photo.hexun.com/upload/WikiUpload.aspx?url="+target,"uploadphoto","scrollbars=no,left=100,top=100,height=356,width=600");
	a = window.open("http://bar.hexun.com/TopicUnionList.aspx?TopicID=1234","uploadphoto","scrollbars=no,left=100,top=100,height=180,width=380");
}

function CheckOthers(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
	}
}

function CheckAll(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			e.checked = true
	}
}

function UnCheckIN()
{
    alert("必须登陆才能添加联盟吧");
}

//关闭子窗口并刷新父窗口
function UpdataReloadWindow()
{
    window.opener.location.reload();
    window.close();
}
//收藏到网摘
function bookmarkThis()
{
	t=document.title;
	u=location.href;
	e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');
	void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&amp;url='+escape(u)+'&amp;excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));	
}

function copytitle(ArticleID,Title,Url) 
{		
	//var copyText="http://bar.hexun.com/d/"+ArticleID+".html";
	window.clipboardData.setData("Text",Url);
	alert("文章"+ Title + "已经拷贝到剪贴板！\n\n您可以使用（Ctrl+V或鼠标右键）粘贴功能");

}

function copytopic(TopicID,TopicName) 
{		
	var copyText="http://bar.hexun.com/t/"+TopicID+".html";
	window.clipboardData.setData("Text",copyText);
	alert(TopicName + "吧已经拷贝到剪贴板！\n\n您可以使用（Ctrl+V或鼠标右键）粘贴功能");

}

function checksubmit()
{
    a_title = document.form1.title.value;
    a_content = document.form1.content.value;
    form1.title.value=f_trim(a_title);
    form1.content.value=f_trim(a_content);

    if(document.form1.title.value=="")
	{
		alert("标题不能为空");
		document.form1.title.focus();
		return false;
	}
	if(document.form1.content.value=="")
	{
		alert("内容不能为空!");
		//document.form1.content.focus();
		return false;
	}
	if(document.form1.checkimg)
    {
        if(document.form1.checkimg.value == "")
        {
            alert("验证码不能为空!");
            return false;
        }
    }
    document.getElementById("ArticleSubmit").disabled = "disabled";
    return true;
}
//验证评论信息
function checkcomment()
{
    bbb = document.getElementById("pageCount").value;
    document.getElementById("CC").value = bbb;
    a_content = form2.content.value;
    form2.content.value=f_trim(a_content);
	if(form2.content.value=="")
	{
		alert("评论内容不能为空!");
		document.form2.content.focus();
		return false;
	}
}
//验证评论信息
function stockcheckcomment()
{
    bbb = document.getElementById("pageCount").value;
    if(document.all)
    {
        document.getElementById("CC").value = bbb;
        a_content = document.form2.content.value;
        a_content=f_trim(a_content);
        if(a_content=="")
	    {
		    alert("评论内容不能为空!");
		    document.getElementById('content').focus();
		    return false;
	    }
	    var CheckL = strlength(a_content);
	    if(CheckL>4000)
	    {
		    alert("超过2000的字数上限了，请重新编辑。");
		    return false;
	    }
	    if(document.form2.checkimg)
	    {
	        if(document.form2.checkimg.value == "")
	        {
	            alert("验证码不能为空!");
	            return false;
	        }
	    }
        document.getElementById("CommentSubmit").disabled = "disabled";
    }
    else
    {
        document.getElementById("CC").value = bbb;
        a_content = document.getElementById("content").value;
        a_content = f_trim(a_content);
        if(a_content=="")
	    {
		    alert("评论内容不能为空!");
		    document.getElementById("content").focus();
		    return false;
	    }
    }
}
function checktopic()
{
	if(document.Form1.GetAllCategory.value=="0")
	{
		alert("请选择分类");
		document.Form1.GetAllCategory.focus();
		return false;
	}
	if(document.Form1.james.value=="")
	{
		alert("请填写验证码");
		document.Form1.james.focus();
		return false;
	}
	return true;
}
function checapply()
{
    if(document.postComment.Co.value=="")
	{
		alert("请填写申请理由");
		document.postComment.Co.focus();
		return false;
	}    
}
function AddText(text) {
		if(document.all){
			insertAtCaret(document.getElementById("content"), text);
		} else{
			document.getElementById("content").value +=	text;
		}
		setfocus();
}

function insertAtCaret (area,	text){
		if (area.createTextRange && area.caretPos){
				var	caretPos = area.caretPos;
				caretPos.text += caretPos.text.charAt(caretPos.text.length - 2)	== ' ' ? text +	' '	: text;
		} else if(area) {
				area.value +=	text;
		} else {
			area.value = text;
		}
}

function setfocus()	{
	document.getElementById("content").focus();
}
function f_trim(inputString) {
    if (typeof inputString != 'string') { return inputString; }
    var retValue = inputString;
    var ch = retValue.substring(0, 1);
    while (ch == ' ' || ch == '\r' || ch == '\n') {
   retValue = retValue.substring(1, retValue.length);
   ch = retValue.substring(0, 1);
    }
    ch = retValue.substring(retValue.length-1, retValue.length);
    while (ch == ' ' || ch == '\r' || ch == '\n') {
   retValue = retValue.substring(0, retValue.length-1);
   ch = retValue.substring(retValue.length-1, retValue.length);
    }
    while (retValue.indexOf('  ') != -1) {
   retValue = retValue.substring(0, retValue.indexOf('  ')) + 
      retValue.substring(retValue.indexOf('  ')+1, retValue.length); 
    }
    return retValue; 
} 
function HttpRequest(str,id,comt,uid)
{
	var sURL = "";
	var sVars = "";
	//文章置顶
	if(str == "1")
	{
	    sURL = "/Article_OnTop.aspx";
	    sVars = "ArticleID="+id+"&CommType="+comt;
	}
	//锁定文章
	if(str == "2")
	{
	    sURL = "/Article_AcceptComment.aspx";
	    sVars = "ArticleID="+id+"&CommType="+comt;
	}
	//文章加精
	if(str == "3")
	{
	    sURL = "/Article_Essential.aspx";
	    sVars = "ArticleID="+id+"&CommType="+comt;
	}
	//删除文章
	if(str == "4")
	{
	    sURL = "/Article_Delete.aspx";
	    sVars = "ArticleID="+id+"&uid="+uid;
	}
	//删除所有文章 同后台封功能
	if(str == "5")
	{
	    sURL = "/Article_DeleteByUser.aspx";
	    sVars = "ArticleID="+id+"&uid="+uid;
	}
	//网友删除所有文章
	if(str == "6")
	{
	    sURL = "/Article_DeleteNum.aspx";
	    sVars = "ArticleID="+id;
	}
	//推荐文章
	if(str == "7")
	{
	    sURL = "/Article_Recommend.aspx";
	    sVars = "ArticleID="+id;	
	}
	try
	{
	    var myConn = new XHConn();
        if (!myConn) alert("XMLHTTP not available. Try a newer/better browser.");
        var fnWhenDone = function (oXML) 
        { 
            var resText = oXML.responseText;
            if(resText == "UnOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "取消置顶成功";
                document.all.span1.innerHTML = "<a href=\"#\" onclick=\"HttpRequest(1,"+id+",'On')\" class='bule2'>置顶</a>";
            }
            else if(resText == "OnOk")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "置顶成功";
                document.all.span1.innerHTML = "<a  href='#' onclick=\"HttpRequest(1,"+id+",'Un')\" class='bule2'>取消</a>";
            }
            else if(resText == "UAOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "解锁成功";
                document.all.span2.innerHTML = "<a href='#' onclick=\"HttpRequest(2,"+id+",'On')\" class='bule2'>加锁</a>";
            }
            else if(resText == "OAOk")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "加锁成功";
                document.all.span2.innerHTML = "<a href='#' onclick=\"HttpRequest(2,"+id+",'Un')\" class='bule2'>解锁</a>";
            }
            else if(resText == "EUOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "取消精华成功";
                document.all.span3.innerHTML = "<a href='#' onclick=\"HttpRequest(3,"+id+",'On')\" class='bule2'>加精</a>";
            }
            else if(resText == "EOOk")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "设为精华成功";
                document.all.span3.innerHTML = "<a href='#' onclick=\"HttpRequest(3,"+id+",'Un')\" class='bule2'>取消</a>";
            }
            else if(resText == "ADOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "文章已删除";
            }
            else if(resText == "AFOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "该类文章已封";
            }
            else if(resText == "AEOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "文章已全部删除";
            }
            else if(resText == "AJOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "您已经投诉此贴为广告贴，管理员将尽快处理，谢谢！";
            }
            else if(resText == "REOK")
            {
                document.getElementById("MessageDiv").style.display = "block";
                document.getElementById("MessageDiv_Message").innerHTML = "文章推荐成功";
            }
            else
            {
                document.getElementById("adminmanage").style.display = "none";
                document.getElementById("loginDiv").style.display = "block";
            }
        };
        myConn.connect(sURL, "GET", sVars, fnWhenDone);
    }
    catch(e)
    {
        alert(e);
    }
    return;
}
function XMLHttpRequestComm(str,id,aid,uid)
{
    mesComm = "MesComment"+id;
    span = "span"+id;
    spanall = "spanall"+id;
    document.getElementById(mesComm).innerHTML = "信息正在提交";
	document.getElementById(mesComm).style.color = "#808080";
	
	var sURL = "";
	var sVars = "";
	//删除评论
	if(str == "1")
	{
	    sURL = "/CommentDelete.aspx";
	    sVars = "id="+id+"&aid="+aid+"&uid="+uid;
	}
	//删除全部评论
	if(str == "2")
	{
	    sURL = "/CommentAllDelete.aspx";
	    sVars = "id="+id+"&aid="+aid+"&uid="+uid;
	}
	var myConn = new XHConn();
    if (!myConn) alert("XMLHTTP not available. Try a newer/better browser.");
    var fnWhenDone = function (oXML) 
    { 
        var resText = oXML.responseText;
        if(resText == "CDOK")
        {
            document.getElementById(mesComm).innerHTML = "评论已删除&nbsp;";
            document.getElementById(span).innerHTML = "";
            document.getElementById(spanall).innerHTML = "";
        }
        else
        {
            document.getElementById(mesComm).innerHTML = resText+"&nbsp;";
        }
        
        document.getElementById(mesComm).style.color = "#808080";
    };
    myConn.connect(sURL, "GET", sVars, fnWhenDone);
    return;
}

function XHConn()
{
  var xmlhttp, bComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(sURL, sMethod, sVars, fnDone)
  {
    if (!xmlhttp) return false;
    bComplete = false;
    sMethod = sMethod.toUpperCase();

    try {
      if (sMethod == "GET")
      {
        xmlhttp.open(sMethod, sURL+"?"+sVars, true);
        sVars = "";
      }
      else
      {
        sMethod(sURL);
        xmlhttp.open(sMethod, sURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !bComplete)
        {
          bComplete = true;
          fnDone(xmlhttp);
        }};
        
      xmlhttp.send(sVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}
function addfavorite(URL,title)
{
   switch(getOs())
   {
       case 1:window.external.addFavorite(URL,title);break;
       case 2:window.sidebar.addPanel(title, URL, "");break;
       case 0:alert("您的浏览器出现了问题,请将浏览器安全设置还原为默认");break;
   }
}
function getOs()
{
   if(navigator.userAgent.indexOf("MSIE")>0)return 1;
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0)return 2;
   if(isSafari=navigator.userAgent.indexOf("Safari")>0)return 3;   
   if(isCamino=navigator.userAgent.indexOf("Camino")>0)return 4;
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0)return 5;
   return 0;
}
function InMsg(InMsg)
{
    if(InMsg == "1")
        document.getElementById('sw').value="股票代码/名称/拼音";
    else if(InMsg == "2")
        document.getElementById('sw').value="请输入用户名称";
    else if(InMsg == "3")
        document.getElementById('sw').value="输入股票/基金的代码或简称";
    else if(InMsg == "0")
        document.getElementById('sw').value="";
}
function SearchType(v){
    document.getElementById('radiobutton').value=v;
}
function Tab(obj){
	var parentObj=obj.parentNode;  
	var liArr= parentObj.getElementsByTagName("li");	
	if(liArr.length<=0)return; 
			for(var i=0;i<liArr.length;i++)
			{
				if(liArr[i]==obj)
				{	liArr[i].className="btnOver";
					 
				}
				else	
				{
					 
					liArr[i].className="btnOut"; 	
				}
			}
}
function GotoPage1(gotopage)
{
    var subProc = true;
	var sub = false;
	if(gotopage.current_page.value == "") {
		window.alert("请输入页数！");
		document.gotopage.current_page.focus();
		subProc = false;
		return false;
	}
	if(subProc == true)
	{
	    if(gotopage.current_page.value>1 || gotopage.current_page.value<1)
	    {
	        window.alert("请输入页数范围内的数字！");
	        document.gotopage.current_page.focus();
		    return false;
	    }
	    else
	    {
	        if(gotopage.current_page.value == 1)
    	    window.location.href="/d/2167331_p"+gotopage.current_page.value+".html";
	    }
	    return false;
	}
	
}
function GotoPage(p,t){
    var regs = /\d/;
    if(!regs.test(p))
    {
        alert("请输入正确数字");
        return false;
    }
	var s = self.location.href;	
	var u = s.replace(/,p(\d+).html+/,"");
	if(u == s)
	{
	    s = s.replace(/.html+/,"");
	}
	else
	{
	    s = u;
	}
	if(p>t)p=t;
	if(p>1){
	    s = s+",p"+p+".html";
	} else {
	    s = s+".html";
	}
	self.location.href = s;
}
function strlength(str)
{
	var l=str.length;
	var n=l;
	for (var i=0;i<l;i++)
	{
		if (str.charCodeAt(i)<0||str.charCodeAt(i)>255)
		{
			n++;
		}
	}
	return n;
}
function ArticleDigg(ArticleID,diggtype)
{
    var xmlhttp = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
	var pURL = "http://guba.hexun.com/digg.aspx?aid="+ArticleID+"&diggtype="+diggtype+"&randnum=" + Math.random();
	xmlhttp.open("GET",pURL,false);
	xmlhttp.send();
	if(diggtype == "digg")
	{
	    sAlert("支持成功,请刷新页面查看最新内容",this);	    
	}
	else if(diggtype == "bury")
	{
	    sAlert("反对成功,请刷新页面查看最新内容",this);	
	}
	else
	{
	    sAlert("提交失败",this);
	}	
}

function CommentDigg(CommentID,diggtype)
{
    var xmlhttp = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
	var pURL = "http://guba.hexun.com/digg.aspx?cid="+CommentID+"&diggtype="+diggtype+"&randnum=" + Math.random();
	xmlhttp.open("GET",pURL,false);
	xmlhttp.send();
	if(diggtype == "digg")
	{
	    sAlert("支持成功,请刷新页面查看最新内容",this);	    
	}
	else if(diggtype == "bury")
	{
	    sAlert("反对成功,请刷新页面查看最新内容",this);	
	}
	else
	{
	    sAlert("提交失败",this);
	}
}
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.documentElement.clientHeight>document.documentElement.scrollHeight)?document.documentElement.clientHeight:document.documentElement.scrollHeight)+"px";
 shield.style.background = "#333";
 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 = "50%";
 alertFram.style.marginLeft = "-225px" ;
 alertFram.style.marginTop = -75+document.documentElement.scrollTop+"px";
 alertFram.style.width = "450px";
 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%\">\n";
 strHtml += " <li style=\"background:#B0D3EE;text-align:left;padding-left:20px;font-size:14px;font-weight:bold;height:25px;line-height:25px;border:1px solid #5A83A1;\">[和讯股吧提示]</li>\n";
 strHtml += " <li style=\"background:#f1faff;text-align:center;font-size:12px;height:120px;line-height:120px;border-left:1px solid #5A83A1;border-right:1px solid #5A83A1;\">"+txt+"</li>\n";
 strHtml += " <li style=\"background:#FFFFFF;text-align:center;font-weight:bold;height:25px;line-height:25px; border:1px solid #5A83A1;\"><input type=\"button\" 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(){
  //alertFram.style.display = "none";
  //shield.style.display = "none";
  document.body.removeChild(alertFram);
  document.body.removeChild(shield);
  eSrc.focus();
  document.body.onselectstart = function(){return true;}
  document.body.oncontextmenu = function(){return true;}
  location.reload();
 }
 document.getElementById("do_OK").focus();
 eSrc.blur();
 document.body.onselectstart = function(){return false;}
 document.body.oncontextmenu = function(){return false;}
 setTimeout("doOk()",3000);
 
}
function copyToClipBoard(){
	var clipBoardContent="";
	clipBoardContent+=window.location.href;
	window.clipboardData.setData("Text",clipBoardContent);
	alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友");
}
// -->
