﻿function toggle(targetid,targetid2){
    if (document.getElementById){
        target=document.getElementById(targetid);
		target2=document.getElementById(targetid2);
            if (target2.style.display == "none")
			{
				target.className = "titleopenbg";
				target2.style.display = "block";
				
            } else {
				target.className = "titleclosebg";
                target2.style.display = "none";
            }
    }
}

function towrite() {
    document.write("<form name=t id=t action='http://www.mktgservice.com/msnhelp/QandA.ashx' method='post'>");
    document.write("<div id='questionsDiv'>");
    document.write("<div class='questiontext'><h5>请提供关于这篇文章的反馈</h5></div>");
    document.write("<table cellspacing='2' cellpadding='0' border='0'>");
    document.write("<tr><td valign='top'><div class='questiontext2'>这篇文章帮助解决问题了吗？</div></td></tr>");
    document.write("<tr><td valign='top' colspan='2'><input type='radio' name='QUESTION_1' id='q11' value='是'>是    <input type='radio' name='QUESTION_1' id='q12' value='否'>否    <input type='radio' name='QUESTION_1' id='q13' value='我不知道'> 我不知道</td>");
    document.write("</tr>");
    document.write("</table>");
    document.write("<table cellspacing='2' cellpadding='0' border='0'  style='	margin-bottom: 10px;'>");
    document.write("<tr><td valign='top'><div class='questiontext2'>这篇文章和问题是相关的吗？</div></td></tr>");
    document.write("<tr><td valign='top'><input type='radio' name='QUESTION_2' id='q21' value='是'>是    <input type='radio' name='QUESTION_2' id='q22' value='否'>否</td></tr>");
    document.write("</table>");
    document.write("<table cellspacing='2' cellpadding='0' border='0'  style='	margin-bottom: 10px;'>");
    document.write("<tr><td valign='top'><div class='questiontext2'>您认为我们怎样才能提高这篇文章的质量呢？</div></td></tr>");
    document.write("<tr><td valign='top'><textarea name='QUESTION_3' style='width:450px;height:100px;'></textarea></td></tr>");
    document.write("<tr><td valign='top'><div class='questiontext2'>为了保护您的隐私，请不要在您的反馈中提及联系信息。</div></td></tr>");
    document.write("</table>");
    document.write("<input id='Button1' type='button' value='提交' onclick='javascript:SubInfo()' />");
    document.write("<br /><br />");
    document.write("</div>");
    document.write("</FORM>");

    var currHref = location.href;
    var index = currHref.lastIndexOf("?");
    var param = "";
    if (index != "-1") { param = currHref.substr(index + 1); }

    if (param.indexOf("a=1") >= 0) {
        document.getElementById('questionsDiv').innerHTML = '非常感谢！您的反馈将被用来改进我们的支持内容。更多的帮助选项，请访问<a href="../index.html" target=_blank>Windows Live帮助和支持主页</a>.';
    } else if (param.indexOf("a=0") >= 0) {
        document.getElementById('questionsDiv').innerHTML = '提交失败， <a href=' + location.href.replace("?a=0", "") + '>请重试</a>!，请访问<a href="../index.html" target=_blank>Windows Live帮助和支持主页</a>.';
    } else if (param.indexOf("a=3") >= 0) {
        document.getElementById('questionsDiv').innerHTML = '提交失败， <a href=' + location.href.replace("?a=3", "") + '>请重试</a>!，请访问<a href="../index.html" target=_blank>Windows Live帮助和支持主页</a>.';
    }

}

function SubInfo(obj) {
    t.submit();
}