// JScript 文件
function init(){
var sHTML = "";
var sTemp = "";
var arrTemp = new Array();
var arrMulti = new Array();
var intTemp = 0;
arrTemp[0] = "";
for(i=0;i<arrOption.length;i++){
arrTemp[arrOption[i][0]] = arrOption[i][1];
}
for(i=0; i<arrItem.length; i++){
arrItem[i][5] = "";
}
for(i=0; i<arrItem.length; i++){
for(j=0; j<arrItem.length; j++){
if(arrItem[j][3]==arrItem[i][0]){
if((arrItem[i][2]==5)||(arrItem[i][2]==9)){
arrItem[i][5] = "F"+arrItem[i][0]+"_input"
}
}
}
}
var intSN = 0;
for(i=0; i<arrItem.length; i++){
switch(arrItem[i][2]){
case 1:
case 2:
case 3:
if(arrItem[i][3]==0){
intSN++;
sHTML += "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>"+document.getElementById("F"+arrItem[i][0]).innerText+"</td></tr>";
}
break;
case 4:
case 5:
case 6:
if(arrItem[i][3]==0){
intSN++;
sHTML += "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>"+arrTemp[document.getElementById("F"+arrItem[i][0]).innerText];
if((arrItem[i][2]==5)&&(arrItem[i][5]!="")){
sHTML += "<BR>输入项:"+document.getElementById(arrItem[i][5]).innerText+"</td></tr>";
}
else{
sHTML +="</td></tr>";
}
}
break;
case 11:
intSN++;
sHTML += "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>"+document.getElementById("F"+arrItem[i][0]).innerText+"</td></tr>";
break;
case 12:
intSN++;
sHTML += "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>";
sTemp = document.getElementById("F"+arrItem[i][0]).innerText;
arrMulti = sTemp.split(";");
intTemp = 0;
for(m=0;m<arrOption.length;m++){
if(arrOption[m][2]==arrItem[i][0]){
sHTML += arrOption[m][1]+":排第<strong> "+arrMulti[intTemp].substring(arrMulti[intTemp].indexOf(":")+1)+" </strong>位<BR>"
intTemp++;
}
}
sHTML+= "</td></tr>";
break;
case 7:
intSN++;
sHTML += "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>";
for(m=0;m<arrItem.length;m++){
if(arrItem[m][3]==arrItem[i][0]){
sHTML+= arrItem[m][1]+":"+arrTemp[document.getElementById("F"+arrItem[m][0]).innerText]+"<BR>";
}
}
sHTML += "</td></tr>";
break;
case 8:
case 9:
case 10:
intSN++;
sTemp = document.getElementById("F"+arrItem[i][0]).innerText;
arrMulti = sTemp.split(",");
sHTML+= "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>";
for(j=0; j<arrMulti.length; j++){
sHTML += arrTemp[arrMulti[j]]+"<BR>";
}
if((arrItem[i][2]==9)&&(arrItem[i][5]!="")){
sHTML += "<BR>输入项:"+document.getElementById(arrItem[i][5]).innerText+"</td>";
}
else{
sHTML +="</td>";
}
sHTML += "</tr>";
break;
case 13:
intSN++;
sHTML+= "<tr bgcolor='#FFFFFF'><td>"+intSN+"</td><td>"+arrItem[i][1]+"</td><td>"+document.getElementById("F"+arrItem[i][0]).innerText.replace(/\{\$\$\}/g,"<BR>")+"</td></tr>";
break;
default :
break;
}
}
sHTML = '<table border="0" cellpadding="5" cellspacing="1" bordercolor="#666666" bgcolor="#333333" class="BlackFont">'+sHTML+"</table>";
document.getElementById("Result").innerHTML = sHTML;
document.getElementById("IP1").innerHTML = document.getElementById("IP").innerHTML;
document.getElementById("SubmitDate1").innerHTML = document.getElementById("SUBMITTIME").innerHTML;
document.getElementById("AnswerAmount1").innerHTML = intAnswerAmount;
document.getElementById("AnswerTime1").innerHTML = document.getElementById("AnswerTime").innerHTML+"秒";
document.getElementById("GUID1").innerHTML = document.getElementById("GUID").innerHTML;
document.getElementById("Point1").innerHTML = document.getElementById("POINT").innerHTML;
document.getElementById("ID1").innerHTML = document.getElementById("ID").innerHTML;
if(intCurrID==intMinID){
try{
document.getElementById("BT_P").className = "grayBT";
}
catch(e){
}
}
if(intCurrID==intMaxID){
try{
document.getElementById("BT_N").className = "grayBT";
}
catch(e){
}
}
}
function overPage(d){
if(d==0){
if(intCurrID==intMinID){
return;
}
self.location.href = "AnswerCardView.aspx?SID="+SID+"&d=P"+"&ID="+intCurrID;
}
else{
if(intCurrID==intMaxID){
return
}
//alert("AnswerCardView.aspx?SID="+SID+"&d=N"+"&ID="+intCurrID)
self.location.href = "AnswerCardView.aspx?SID="+SID+"&d=N"+"&ID="+intCurrID;
}
}