/**
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 = /