/*
 * Compressed by JSA(www.xidea.org)
 */
var isClient=false;try{isClient=external.ClientData==true?true:false}catch(e){isClient=false}try{if(typeof(parent.popuAlert)!="undefined")popuAlert=parent.popuAlert;if(typeof(parent.popuConfirm)!="undefined")popuConfirm=parent.popuConfirm;if(typeof(parent.popupopuWindowAlert)!="undefined")popuWindow=parent.popuWindow}catch(e){}var sitUrl="http://www.591up.com/sns/script/iframe/",clientUrl="ndstudy:@store::",TemporaryType={Pick:0,Change:1,Delete:2};function arraySelect(C,A){var B=[];if(C==null)return B;for(var $=0,_=C.length;$<_;$++)B[B.length]=A(C[$],$);return B}arrayWhere=function(C,A){var B=[];if(C==null)return B;for(var $=0,_=C.length;$<_;$++)if(A(C[$],$))B[B.length]=C[$];return B};function IsNullOrEmpty($){return(typeof($)=="undefined"||$==null||$.length==0)}function getQueryString(A){var _=new RegExp("(^|&)"+A+"=([^&]*)(&|$)","i"),$=window.location.search.substr(1).match(_);if($!=null)return unescape($[2]);return null}function checkchar(B,A){var _=$(B).text()?$(B).text():$(B).val();if(_.length>=A)if($(B).text())$(B).text(_.substring(0,A));else $(B).val(_.substring(0,A))}function clipboard($){clipboardData.setData("text",clipboardData.getData("text").substring(0,$))}function cutstring(D,A){if(undefined==D||undefined==D.length)return"";var C=0,$,B=D.length,_="";for($=0;$<B;$++)if(C<A)C+=D.charCodeAt($)>127?2:1;else{_="...";break}return D.substr(0,$)+_}function objClone(_){result={};for(var $ in _)result[$]=_[$];return result}var PosU={getOffsetX:function(_,A){var B=this,D=$(_);_=D[0];var C=B.offsetX(_);return C+A},getOffsetY:function(_,A){var D=this,C=$(_);_=C[0];var B=D.offsetY(_);return B+A},getScrollTop:function(){var $=0;if(document.documentElement&&document.documentElement.scrollTop)$=document.documentElement.scrollTop;else if(document.body)$=document.body.scrollTop;return $},getInnerW:function(){return(window.innerWidth)?window.innerWidth:(document.documentElement&&document.documentElement.clientWidth)?document.documentElement.clientWidth:document.body.offsetWidth},getInnerH:function(){return(window.innerHeight)?window.innerHeight:(document.documentElement&&document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.offsetHeight},offsetY:function($){if(!$)return 0;var _=0;if($.offsetTop)_+=$.offsetTop;while($=$.offsetParent)if($.offsetTop)_+=$.offsetTop;return _},offsetX:function($){if(!$)return 0;var _=0;if($.offsetLeft)_+=$.offsetLeft;while($=$.offsetParent)if($.offsetLeft)_+=$.offsetLeft;return _},getHeight:function(_){var B=$(_),A=B.height();try{if(A.toString().indexOf("px",0)>-1)A=parseInt(A.replace(/px/,""));else A=A.parseInt(A)}catch(D){A=0}try{var C=0;C=parseInt(B.css("padding-top").replace("px",""));if(C!=NaN&&C>0)A+=C;C=parseInt(B.css("padding-bottom").replace("px",""));if(C!=NaN&&C>0)A+=C;C=parseInt(B.css("border-width").replace("px",""));if(C!=NaN&&C>0)A+=C*2}catch(D){alert(A);return A}return A}};if(typeof(Type)!="undefined"&&Type){Type.registerNamespace("ND.Client.Common");ND.Client.Common.Hashtable=function(){this._hash=new Object();this.add=function($,_){if(typeof($)!="undefined"){if(this.contains($)==false){this._hash[$]=typeof(_)=="undefined"?null:_;return true}else return false}else return false};this.remove=function($){delete this._hash[$]};this.count=function(){var $=0;for(var _ in this._hash)$++;return $};this.items=function($){return this._hash[$]};this.contains=function($){return typeof(this._hash[$])!="undefined"};this.clear=function(){for(var $ in this._hash)delete this._hash[$]}};ND.Client.Common.Hashtable.registerClass("ND.Client.Common.Hashtable",Sys.Component);ND.Client.Common.Cookie=function(){this.add=function($,A,D){var C=$+"="+escape(A);if(D>0){var B=new Date(),_=D*3600*1000;B.setTime(B.getTime()+_);C+="; expires="+B.toGMTString()}document.cookie=C};this.remove=function($){var _=new Date();_.setTime(_.getTime()-10000);document.cookie=$+"=a; expires="+_.toGMTString()};this.items=function($){var B=document.cookie.split("; ");for(var _=0;_<B.length;_++){var A=B[_].split("=");if(A[0]==$)return unescape(A[1])}};this.contains=function($){if(this.items($))return true;else return false}};ND.Client.Common.Cookie.registerClass("ND.Client.Common.Cookie",Sys.Component)}function onFailed(C){var A=C.get_stackTrace(),B=C.get_message(),E=C.get_statusCode(),D=C.get_exceptionType(),_=C.get_timedOut(),$="<strong>Stack Trace: </strong>"+A+"<br/>"+"<strong>Service Error: </strong>"+B+"<br/>"+"<strong>Status Code: </strong>"+E+"<br/>"+"<strong>Exception Type: </strong>"+D+"<br/>"+"<strong>Is Timeout: </strong>"+_;if(_)popuAlert({contents:"\u8bf7\u6c42\u5df2\u7ecf\u8d85\u65f6,\u8bf7\u91cd\u8bd5!",title:"\u8bf7\u6c42\u8d85\u65f6",showYesBtn:true,w:400});else switch(D){case"ND.Framework.InputException":popuAlert({contents:B,title:"\u63d0\u793a",showYesBtn:true,w:400});break;case"ND.Framework.PowerException":popuAlert({contents:B,title:"\u63d0\u793a",showYesBtn:true,w:400});break;case"ND.Framework.AlertException":popuAlert({contents:B});break;case"ND.Framework.QuestionCollectException":if(questionCollectException)questionCollectException(C.CategoryId);popuAlert({contents:B+C.CategoryId});break;default:popuWindow({title:"\u63d0\u793a",showYesBtn:true,w:500,onOverlay:1,contents:"<div class=\"PopPage\"><img class=\"ErrorImg\" src=\""+staticSiteUrl+"/App_Themes/Edu2/Images/ErrorImg.gif\" />\u55ef\uff0c\u51fa\u9519\u4e86\u3002\u5f88\u62b1\u6b49\uff0c\u60a8\u8bbf\u95ee\u7684\u9875\u9762\u53ef\u80fd\u51fa\u4e86\u4e00\u4e9b\u5c0f\u6545\u969c\uff0c\u8bf7\u5c1d\u8bd5\u5237\u65b0\uff0c\u6216\u8bb8\u53ef\u4ee5\u89e3\u51b3\u95ee\u9898\u3002<a href=\"javascript:showFailedInfo()\">&nbsp;</a><br /><span id=\"ErrorInfo\" style=\"display:none;\">"+$+"</span></div>"});break}}function showFailedInfo(){$("#ErrorInfo").toggle()}function HeadPicError($){$.src=staticSiteUrl+"/App_Themes/Edu/tmp/men.gif"}function bindImageUrl(A,_,$,C,B){if(B)return A.replace(/<img[^\/>]+src=['"]((?!http:\/\/)[^'""]+)['"]([^\/>]+)\/>/gi,"<img style=\"vertical-align:middle\" src=\""+clientUrl+"/question/"+_+"/"+$+"/"+C+"/picture/"+"$1\" "+"/>").replace(/(http:\/\/.*?\.html)/ig,"<a href=\""+"$1"+"\" target=\"_blank\">"+"$1"+"</a>");else return A.replace(/<img[^\/>]+src=['"]((?!http:\/\/)[^'""]+)['"]([^\/>]+)\/>/gi,"<img style=\"vertical-align:middle\" src=\""+ftpSiteUrl+uploadFtpPath+"question/"+_+"/"+$+"/"+C+"/picture/"+"$1\" "+"/>").replace(/(http:\/\/.*?\.html)/img,"<a href=\""+"$1"+"\" target=\"_blank\">"+"$1"+"</a>")}function fillQuestionExplanation($){return bindImageUrl($.QuestionExplanation,$.Segment,$.Key,$.Version,$.IsClient)}function fillQuestionContent($){return fillQuestionNo($.QuestionContent,$.Segment,$.Key,$.Version,$.IsClient)}function fillQuestionAnswer($){return fillQuestionNo($.QuestionAnswerList.join(","),$.Segment,$.Key,$.Version,$.IsClient)}function fillQuestionNo(B,A,$,G,E){var D=/({题号})/img,F=B.match(D);if(F!=null)if(F.length>1){for(var _=0,C=F.length;_<C;_++)B=B.replace("{\u9898\u53f7}",(_+1)+") ")}else B=B.replace("{\u9898\u53f7}","");return bindImageUrl(B,A,$,G,E)}function resetIframeHeight(_){$("#ifrList").css("height",_)}function SetCwinHeight($){try{top.document.getElementById("ifrList").height=$}catch(_){}}function AmendModel(B,C){if(C=="questionInfo")for(var A in B){if(A.indexOf("List")>0){var _=[];$.each(B[A],function(A,$){_.push($)});B[A]=_}if(B[A].__type)B[A].__type=null;if(B[A]instanceof Array)for(var D in B[A])if(B[A][D].__type)B[A][D].__type=null}}function numberToSubPaperNo($){switch($){case 0:return"\u2160";case 1:return"\u2161";case 2:return"\u2162";case 3:return"\u2163";case 4:return"\u2164";case 5:return"\u2165";case 6:return"\u2166";case 7:return"\u2167";case 8:return"\u2168";default:return""}}function numberToPaperPartNo($){switch($){case 0:return"\u4e00";case 1:return"\u4e8c";case 2:return"\u4e09";case 3:return"\u56db";case 4:return"\u4e94";case 5:return"\u516d";case 6:return"\u4e03";case 7:return"\u516b";case 8:return"\u4e5d";case 9:return"\u5341";default:return""}}function numberToChinese($){switch($){case 1:return"\u4e00";case 2:return"\u4e8c";case 3:return"\u4e09";case 4:return"\u56db";case 5:return"\u4e94";case 6:return"\u516d";case 7:return"\u4e03";case 8:return"\u516b";case 9:return"\u4e5d";case 10:return"\u5341";default:return""}}function numberToQuestionNo($){return String.format("{0}\uff0e",($+1))}function numberToSubQuestionNo($){return String.format("\uff08{0}\uff09",($+1))}function numberToLetter($){$+=65;return String.fromCharCode($)}function numbersToLetters(_){var A="";for(var $ in _)A+=String.fromCharCode(Number(_[$])+65);return A}function isUndefinedOrNull($){return(typeof $=="undefined"||$==null)}function ShowAnswerPopU(_){AnswerPopU.initPop({type:"string",title:"Null",contents:"Null",closeIsHide:true,w:900,h:520,showOverlay:true,overlayParam:50,canEsc:false});var $=AnswerPopU.pubWindow.find(".popU_Main").empty();AnswerPopU.showPop();$.html("<iframe name='popuIframe' style='width: 100%; height:500px;' scrolling='auto' frameborder='0' src=''></iframe>");setTimeout(function(){AnswerPopU.pubWindow.find("iframe").attr("src",_)},500);startAnswerMonitor()}function closeAnswerPopU(){AnswerPopU.close();clearAnswerMonitor();if(typeof showQuestionRoute!="undefined")showQuestionRoute();else if(typeof onNetworkPaging!="undefined")onNetworkPaging();else if(typeof onPaging!="undefined")onPaging();else window.location.reload()}function closeAnswerPopU2(){AnswerPopU.close();clearAnswerMonitor()}function startAnswerMonitor(){window.onbeforeunload=function(){if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)return"\u4f60\u6b63\u5728\u4f5c\u7b54\uff0c\u9000\u51fa\u540e\u5c06\u4e0d\u80fd\u4fdd\u5b58\u60a8\u7684\u7b54\u6848"}}function clearAnswerMonitor(){window.onbeforeunload=null}