/**
obtain news content components of the vote
*/
var _newscontent_errcode = "";
var _newscontent_errorcode = "";
var _newscontent_votebgcolor = "";
var _newscontent_votetitlestyle = "";
var _newscontent_votefgcolor = "";
var _newscontent_qdimg = "";
var _newscontent_votestyle = "";
var _newscontent_welcomevote = "";
var _newscontent_padding = "";
var _newscontent_toupiao = "";
var _newscontent_chakan = "";
var _newscontent_myform = "";
var _newscontent_writevote = "";
var _newscontent_owner = "";
var _newscontent_ip = "";
var _newscontent_newsid = "";
var _newscontent_againvote = "";
var _newscontent_errvote = "";
var _newscontent_thinksvote = "";
var _newscontent_voteresult = "";
function showvote(pnewsid,powner,pvotebgcolor,pvotetitlestyle,pvotefgcolor,pqdimg,pvotestyle,pwelcomevote,ppadding,ptoupiao,pchakan,pformname,pwritevote,pip,pagainvote,perrvote,pthinksvote,pvoteresult)
{
_newscontent_votebgcolor = pvotebgcolor;
_newscontent_votetitlestyle = pvotetitlestyle;
_newscontent_votefgcolor = pvotefgcolor;
_newscontent_qdimg = pqdimg;
_newscontent_votestyle = pvotestyle;
_newscontent_welcomevote = pwelcomevote;
_newscontent_padding = ppadding;
_newscontent_toupiao = ptoupiao;
_newscontent_chakan = pchakan;
_newscontent_myform = pformname;
_newscontent_writevote = pwritevote;
_newscontent_owner = powner;
_newscontent_ip = pip;
_newscontent_newsid = pnewsid;
_newscontent_againvote = pagainvote;
_newscontent_errvote = perrvote;
_newscontent_thinksvote = pthinksvote;
_newscontent_voteresult = pvoteresult;
newsvotedwr.getvotetitle(pnewsid,powner,_newscontent_puttitle);
}
function _newscontent_puttitle(title)
{
if(title.result == "true")
{
var vote = "
"
document.getelementbyid("div_vote_id").innerhtml = vote;
}
else
{
}
}
function _newscontent_getresult(_newscontent_newsid,_newscontent_owner)
{
var hascheck =false;
var ischeck = false;
for(var i = 0; i < _newscontent_myform.elements.length; i++)
{
var item = _newscontent_myform.elements[i];
if(item.tagname == "input" )
{
if(item.type.tolowercase()=="checkbox")
{
hascheck = true;
var checkboxvalues = document.getelementsbyname(item.name);
for(var j=0;j";
vote += "" + _newscontent_qdimg + " " + _newscontent_voteresult + "
"
for(i=0; i";
vote += "";
vote += title.titlelist[i];
vote += " | ";
vote += "";
for(j = 0;j< title.option[i].optitlelist.length;j++)
{
vote += "";
vote += "";
vote += title.option[i].optitlelist[j];
vote += " | ";
vote += "
";
vote += ""
vote += ""
vote += ""
vote += title.option[i].opchecklist[j]+"("+ title.option[i].opnumlist[j] +")";
vote += " | "
vote += "
";
}
}
vote += "";
vote += ""
document.getelementbyid("div_vote_id").innerhtml = vote;
}
else
{
alert(_newscontent_errvote);
}
}
function _newscontnent_checkradiovalue(keystr)
{
var keyname = keystr;
var obj = document.getelementsbyname(keyname);
var flag = false;
var i = 0;
if(obj == null)
{
return "";
}
if(obj.length == null)
{
if(obj.checked)
{
return obj.value;
}
}
for(i = 0; i < obj.length; i++)
{
if(obj[i].checked)
{
return obj[i].value;
break;
}
}
return "";
}
function shareto(a,u,t,s,key)
{
var ec = encodeuricomponent,
a = '/system/resource/news/weiboshare.htm';
var c = '?type=' + a + '&url=' + ec(u || document.location) + '&title=' + ec(t) + (s ? '&summary=' + s : '')+(key ? '&appkey=' + key : '');
if(a=='tsohu')
c = '?type=' + a + '&url=' + ec(u || document.location) + '&title=' + t + (s ? '&summary=' + s : '')+(key ? '&appkey=' + key : '');
try
{
window.open(a + c, '');
} catch (e)
{
}
return false;
}
function download_news(contentid,treeid,owner,newsid)
{
if(checkobj_content(contentid))
{
if(confirm('文章含有word中无法显示内容,下载后可能无法正常显示。是否继续下载?'))
{
location.href='/system/resource/news/newstoword.jsp?treeid='+treeid+'&owner='+owner+'&wbnewsid='+newsid;
}
}else{
location.href='/system/resource/news/newstoword.jsp?treeid='+treeid+'&owner='+owner+'&wbnewsid='+newsid;
}
}
function checkobj_content(contentid)
{
if(getcontenttags(contentid))
{
return true;
}
return false;
}
function getcontenttags(contentid)
{
var current;
var contentnode = document.getelementbyid(contentid).innerhtml;
var regex = /