/*!
 * jQuery JavaScript Library v1.7
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu Nov 3 16:18:21 2011 -0400
 */
(function(bd,M){var av=bd.document,bx=bd.navigator,bo=bd.location;var b=(function(){var bI=function(b4,b5){return new bI.fn.init(b4,b5,bG)},bY=bd.jQuery,bK=bd.$,bG,b2=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bQ=/\S/,bM=/^\s+/,bH=/\s+$/,bL=/\d/,bD=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bR=/^[\],:{}\s]*$/,b0=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bT=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bN=/(?:^|:|,)(?:\s*\[)+/g,bB=/(webkit)[ \/]([\w.]+)/,bV=/(opera)(?:.*version)?[ \/]([\w.]+)/,bU=/(msie) ([\w.]+)/,bW=/(mozilla)(?:.*? rv:([\w.]+))?/,bE=/-([a-z]|[0-9])/ig,b3=/^-ms-/,bX=function(b4,b5){return(b5+"").toUpperCase()},b1=bx.userAgent,bZ,bF,e,bP=Object.prototype.toString,bJ=Object.prototype.hasOwnProperty,bC=Array.prototype.push,bO=Array.prototype.slice,bS=String.prototype.trim,by=Array.prototype.indexOf,bA={};bI.fn=bI.prototype={constructor:bI,init:function(b4,b8,b7){var b6,b9,b5,ca;if(!b4){return this}if(b4.nodeType){this.context=this[0]=b4;this.length=1;return this}if(b4==="body"&&!b8&&av.body){this.context=av;this[0]=av.body;this.selector=b4;this.length=1;return this}if(typeof b4==="string"){if(b4.charAt(0)==="<"&&b4.charAt(b4.length-1)===">"&&b4.length>=3){b6=[null,b4,null]}else{b6=b2.exec(b4)}if(b6&&(b6[1]||!b8)){if(b6[1]){b8=b8 instanceof bI?b8[0]:b8;ca=(b8?b8.ownerDocument||b8:av);b5=bD.exec(b4);if(b5){if(bI.isPlainObject(b8)){b4=[av.createElement(b5[1])];bI.fn.attr.call(b4,b8,true)}else{b4=[ca.createElement(b5[1])]}}else{b5=bI.buildFragment([b6[1]],[ca]);b4=(b5.cacheable?bI.clone(b5.fragment):b5.fragment).childNodes}return bI.merge(this,b4)}else{b9=av.getElementById(b6[2]);if(b9&&b9.parentNode){if(b9.id!==b6[2]){return b7.find(b4)}this.length=1;this[0]=b9}this.context=av;this.selector=b4;return this}}else{if(!b8||b8.jquery){return(b8||b7).find(b4)}else{return this.constructor(b8).find(b4)}}}else{if(bI.isFunction(b4)){return b7.ready(b4)}}if(b4.selector!==M){this.selector=b4.selector;this.context=b4.context}return bI.makeArray(b4,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return bO.call(this,0)},get:function(b4){return b4==null?this.toArray():(b4<0?this[this.length+b4]:this[b4])},pushStack:function(b5,b7,b4){var b6=this.constructor();if(bI.isArray(b5)){bC.apply(b6,b5)}else{bI.merge(b6,b5)}b6.prevObject=this;b6.context=this.context;if(b7==="find"){b6.selector=this.selector+(this.selector?" ":"")+b4}else{if(b7){b6.selector=this.selector+"."+b7+"("+b4+")"}}return b6},each:function(b5,b4){return bI.each(this,b5,b4)},ready:function(b4){bI.bindReady();bF.add(b4);return this},eq:function(b4){return b4===-1?this.slice(b4):this.slice(b4,+b4+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bO.apply(this,arguments),"slice",bO.call(arguments).join(","))},map:function(b4){return this.pushStack(bI.map(this,function(b6,b5){return b4.call(b6,b5,b6)}))},end:function(){return this.prevObject||this.constructor(null)},push:bC,sort:[].sort,splice:[].splice};bI.fn.init.prototype=bI.fn;bI.extend=bI.fn.extend=function(){var cd,b6,b4,b5,ca,cb,b9=arguments[0]||{},b8=1,b7=arguments.length,cc=false;if(typeof b9==="boolean"){cc=b9;b9=arguments[1]||{};b8=2}if(typeof b9!=="object"&&!bI.isFunction(b9)){b9={}}if(b7===b8){b9=this;--b8}for(;b8<b7;b8++){if((cd=arguments[b8])!=null){for(b6 in cd){b4=b9[b6];b5=cd[b6];if(b9===b5){continue}if(cc&&b5&&(bI.isPlainObject(b5)||(ca=bI.isArray(b5)))){if(ca){ca=false;cb=b4&&bI.isArray(b4)?b4:[]}else{cb=b4&&bI.isPlainObject(b4)?b4:{}}b9[b6]=bI.extend(cc,cb,b5)}else{if(b5!==M){b9[b6]=b5}}}}}return b9};bI.extend({noConflict:function(b4){if(bd.$===bI){bd.$=bK}if(b4&&bd.jQuery===bI){bd.jQuery=bY}return bI},isReady:false,readyWait:1,holdReady:function(b4){if(b4){bI.readyWait++}else{bI.ready(true)}},ready:function(b4){if((b4===true&&!--bI.readyWait)||(b4!==true&&!bI.isReady)){if(!av.body){return setTimeout(bI.ready,1)}bI.isReady=true;if(b4!==true&&--bI.readyWait>0){return}bF.fireWith(av,[bI]);if(bI.fn.trigger){bI(av).trigger("ready").unbind("ready")}}},bindReady:function(){if(bF){return}bF=bI.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bI.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bd.addEventListener("load",bI.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bd.attachEvent("onload",bI.ready);var b4=false;try{b4=bd.frameElement==null}catch(b5){}if(av.documentElement.doScroll&&b4){bz()}}}},isFunction:function(b4){return bI.type(b4)==="function"},isArray:Array.isArray||function(b4){return bI.type(b4)==="array"},isWindow:function(b4){return b4&&typeof b4==="object"&&"setInterval" in b4},isNumeric:function(b4){return b4!=null&&bL.test(b4)&&!isNaN(b4)},type:function(b4){return b4==null?String(b4):bA[bP.call(b4)]||"object"},isPlainObject:function(b6){if(!b6||bI.type(b6)!=="object"||b6.nodeType||bI.isWindow(b6)){return false}try{if(b6.constructor&&!bJ.call(b6,"constructor")&&!bJ.call(b6.constructor.prototype,"isPrototypeOf")){return false}}catch(b5){return false}var b4;for(b4 in b6){}return b4===M||bJ.call(b6,b4)},isEmptyObject:function(b5){for(var b4 in b5){return false}return true},error:function(b4){throw b4},parseJSON:function(b4){if(typeof b4!=="string"||!b4){return null}b4=bI.trim(b4);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(b4)}if(bR.test(b4.replace(b0,"@").replace(bT,"]").replace(bN,""))){return(new Function("return "+b4))()}bI.error("Invalid JSON: "+b4)},parseXML:function(b6){var b4,b5;try{if(bd.DOMParser){b5=new DOMParser();b4=b5.parseFromString(b6,"text/xml")}else{b4=new ActiveXObject("Microsoft.XMLDOM");b4.async="false";b4.loadXML(b6)}}catch(b7){b4=M}if(!b4||!b4.documentElement||b4.getElementsByTagName("parsererror").length){bI.error("Invalid XML: "+b6)}return b4},noop:function(){},globalEval:function(b4){if(b4&&bQ.test(b4)){(bd.execScript||function(b5){bd["eval"].call(bd,b5)})(b4)}},camelCase:function(b4){return b4.replace(b3,"ms-").replace(bE,bX)},nodeName:function(b5,b4){return b5.nodeName&&b5.nodeName.toUpperCase()===b4.toUpperCase()},each:function(b7,ca,b6){var b5,b8=0,b9=b7.length,b4=b9===M||bI.isFunction(b7);if(b6){if(b4){for(b5 in b7){if(ca.apply(b7[b5],b6)===false){break}}}else{for(;b8<b9;){if(ca.apply(b7[b8++],b6)===false){break}}}}else{if(b4){for(b5 in b7){if(ca.call(b7[b5],b5,b7[b5])===false){break}}}else{for(;b8<b9;){if(ca.call(b7[b8],b8,b7[b8++])===false){break}}}}return b7},trim:bS?function(b4){return b4==null?"":bS.call(b4)}:function(b4){return b4==null?"":b4.toString().replace(bM,"").replace(bH,"")},makeArray:function(b7,b5){var b4=b5||[];if(b7!=null){var b6=bI.type(b7);if(b7.length==null||b6==="string"||b6==="function"||b6==="regexp"||bI.isWindow(b7)){bC.call(b4,b7)}else{bI.merge(b4,b7)}}return b4},inArray:function(b6,b7,b5){var b4;if(b7){if(by){return by.call(b7,b6,b5)}b4=b7.length;b5=b5?b5<0?Math.max(0,b4+b5):b5:0;for(;b5<b4;b5++){if(b5 in b7&&b7[b5]===b6){return b5}}}return -1},merge:function(b8,b6){var b7=b8.length,b5=0;if(typeof b6.length==="number"){for(var b4=b6.length;b5<b4;b5++){b8[b7++]=b6[b5]}}else{while(b6[b5]!==M){b8[b7++]=b6[b5++]}}b8.length=b7;return b8},grep:function(b5,ca,b4){var b6=[],b9;b4=!!b4;for(var b7=0,b8=b5.length;b7<b8;b7++){b9=!!ca(b5[b7],b7);if(b4!==b9){b6.push(b5[b7])}}return b6},map:function(b4,cb,cc){var b9,ca,b8=[],b6=0,b5=b4.length,b7=b4 instanceof bI||b5!==M&&typeof b5==="number"&&((b5>0&&b4[0]&&b4[b5-1])||b5===0||bI.isArray(b4));if(b7){for(;b6<b5;b6++){b9=cb(b4[b6],b6,cc);if(b9!=null){b8[b8.length]=b9}}}else{for(ca in b4){b9=cb(b4[ca],ca,cc);if(b9!=null){b8[b8.length]=b9}}}return b8.concat.apply([],b8)},guid:1,proxy:function(b8,b7){if(typeof b7==="string"){var b6=b8[b7];b7=b8;b8=b6}if(!bI.isFunction(b8)){return M}var b4=bO.call(arguments,2),b5=function(){return b8.apply(b7,b4.concat(bO.call(arguments)))};b5.guid=b8.guid=b8.guid||b5.guid||bI.guid++;return b5},access:function(b4,cc,ca,b6,b9,cb){var b5=b4.length;if(typeof cc==="object"){for(var b7 in cc){bI.access(b4,b7,cc[b7],b6,b9,ca)}return b4}if(ca!==M){b6=!cb&&b6&&bI.isFunction(ca);for(var b8=0;b8<b5;b8++){b9(b4[b8],cc,b6?ca.call(b4[b8],b8,b9(b4[b8],cc)):ca,cb)}return b4}return b5?b9(b4[0],cc):M},now:function(){return(new Date()).getTime()},uaMatch:function(b5){b5=b5.toLowerCase();var b4=bB.exec(b5)||bV.exec(b5)||bU.exec(b5)||b5.indexOf("compatible")<0&&bW.exec(b5)||[];return{browser:b4[1]||"",version:b4[2]||"0"}},sub:function(){function b4(b7,b8){return new b4.fn.init(b7,b8)}bI.extend(true,b4,this);b4.superclass=this;b4.fn=b4.prototype=this();b4.fn.constructor=b4;b4.sub=this.sub;b4.fn.init=function b6(b7,b8){if(b8&&b8 instanceof bI&&!(b8 instanceof b4)){b8=b4(b8)}return bI.fn.init.call(this,b7,b8,b5)};b4.fn.init.prototype=b4.fn;var b5=b4(av);return b4},browser:{}});bI.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b5,b4){bA["[object "+b4+"]"]=b4.toLowerCase()});bZ=bI.uaMatch(b1);if(bZ.browser){bI.browser[bZ.browser]=true;bI.browser.version=bZ.version}if(bI.browser.webkit){bI.browser.safari=true}if(bQ.test("\xA0")){bM=/^[\s\xA0]+/;bH=/[\s\xA0]+$/}bG=bI(av);if(av.addEventListener){e=function(){av.removeEventListener("DOMContentLoaded",e,false);bI.ready()}}else{if(av.attachEvent){e=function(){if(av.readyState==="complete"){av.detachEvent("onreadystatechange",e);bI.ready()}}}}function bz(){if(bI.isReady){return}try{av.documentElement.doScroll("left")}catch(b4){setTimeout(bz,1);return}bI.ready()}if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return bI})}return bI})();var a4={};function Y(e){var by=a4[e]={},bz,bA;e=e.split(/\s+/);for(bz=0,bA=e.length;bz<bA;bz++){by[e[bz]]=true}return by}b.Callbacks=function(bz){bz=bz?(a4[bz]||Y(bz)):{};var bE=[],bF=[],bA,bB,by,bC,bD,bH=function(bI){var bJ,bM,bL,bK,bN;for(bJ=0,bM=bI.length;bJ<bM;bJ++){bL=bI[bJ];bK=b.type(bL);if(bK==="array"){bH(bL)}else{if(bK==="function"){if(!bz.unique||!bG.has(bL)){bE.push(bL)}}}}},e=function(bJ,bI){bI=bI||[];bA=!bz.memory||[bJ,bI];bB=true;bD=by||0;by=0;bC=bE.length;for(;bE&&bD<bC;bD++){if(bE[bD].apply(bJ,bI)===false&&bz.stopOnFalse){bA=true;break}}bB=false;if(bE){if(!bz.once){if(bF&&bF.length){bA=bF.shift();bG.fireWith(bA[0],bA[1])}}else{if(bA===true){bG.disable()}else{bE=[]}}}},bG={add:function(){if(bE){var bI=bE.length;bH(arguments);if(bB){bC=bE.length}else{if(bA&&bA!==true){by=bI;e(bA[0],bA[1])}}}return this},remove:function(){if(bE){var bI=arguments,bK=0,bL=bI.length;for(;bK<bL;bK++){for(var bJ=0;bJ<bE.length;bJ++){if(bI[bK]===bE[bJ]){if(bB){if(bJ<=bC){bC--;if(bJ<=bD){bD--}}}bE.splice(bJ--,1);if(bz.unique){break}}}}}return this},has:function(bJ){if(bE){var bI=0,bK=bE.length;for(;bI<bK;bI++){if(bJ===bE[bI]){return true}}}return false},empty:function(){bE=[];return this},disable:function(){bE=bF=bA=M;return this},disabled:function(){return !bE},lock:function(){bF=M;if(!bA||bA===true){bG.disable()}return this},locked:function(){return !bF},fireWith:function(bJ,bI){if(bF){if(bB){if(!bz.once){bF.push([bJ,bI])}}else{if(!(bz.once&&bA)){e(bJ,bI)}}}return this},fire:function(){bG.fireWith(this,arguments);return this},fired:function(){return !!bA}};return bG};var aK=[].slice;b.extend({Deferred:function(bB){var bA=b.Callbacks("once memory"),bz=b.Callbacks("once memory"),by=b.Callbacks("memory"),e="pending",bD={resolve:bA,reject:bz,notify:by},bF={done:bA.add,fail:bz.add,progress:by.add,state:function(){return e},isResolved:bA.fired,isRejected:bz.fired,then:function(bH,bG,bI){bE.done(bH).fail(bG).progress(bI);return this},always:function(){return bE.done.apply(bE,arguments).fail.apply(bE,arguments)},pipe:function(bI,bH,bG){return b.Deferred(function(bJ){b.each({done:[bI,"resolve"],fail:[bH,"reject"],progress:[bG,"notify"]},function(bL,bO){var bK=bO[0],bN=bO[1],bM;if(b.isFunction(bK)){bE[bL](function(){bM=bK.apply(this,arguments);if(bM&&b.isFunction(bM.promise)){bM.promise().then(bJ.resolve,bJ.reject,bJ.notify)}else{bJ[bN+"With"](this===bE?bJ:this,[bM])}})}else{bE[bL](bJ[bN])}})}).promise()},promise:function(bH){if(bH==null){bH=bF}else{for(var bG in bF){bH[bG]=bF[bG]}}return bH}},bE=bF.promise({}),bC;for(bC in bD){bE[bC]=bD[bC].fire;bE[bC+"With"]=bD[bC].fireWith}bE.done(function(){e="resolved"},bz.disable,by.lock).fail(function(){e="rejected"},bA.disable,by.lock);if(bB){bB.call(bE,bE)}return bE},when:function(bD){var bA=aK.call(arguments,0),by=0,e=bA.length,bE=new Array(e),bz=e,bB=e,bF=e<=1&&bD&&b.isFunction(bD.promise)?bD:b.Deferred(),bH=bF.promise();function bG(bI){return function(bJ){bA[bI]=arguments.length>1?aK.call(arguments,0):bJ;if(!(--bz)){bF.resolveWith(bF,bA)}}}function bC(bI){return function(bJ){bE[bI]=arguments.length>1?aK.call(arguments,0):bJ;bF.notifyWith(bH,bE)}}if(e>1){for(;by<e;by++){if(bA[by]&&bA[by].promise&&b.isFunction(bA[by].promise)){bA[by].promise().then(bG(by),bF.reject,bC(by))}else{--bz}}if(!bz){bF.resolveWith(bF,bA)}}else{if(bF!==bD){bF.resolveWith(bF,e?[bD]:[])}}return bH}});b.support=(function(){var bI=av.createElement("div"),bP=av.documentElement,bB,bQ,bJ,bz,bH,bC,bF,by,bG,bK,bE,bO,bM,bA,bD,bL,bR;bI.setAttribute("className","t");bI.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";bB=bI.getElementsByTagName("*");bQ=bI.getElementsByTagName("a")[0];if(!bB||!bB.length||!bQ){return{}}bJ=av.createElement("select");bz=bJ.appendChild(av.createElement("option"));bH=bI.getElementsByTagName("input")[0];bF={leadingWhitespace:(bI.firstChild.nodeType===3),tbody:!bI.getElementsByTagName("tbody").length,htmlSerialize:!!bI.getElementsByTagName("link").length,style:/top/.test(bQ.getAttribute("style")),hrefNormalized:(bQ.getAttribute("href")==="/a"),opacity:/^0.55/.test(bQ.style.opacity),cssFloat:!!bQ.style.cssFloat,unknownElems:!!bI.getElementsByTagName("nav").length,checkOn:(bH.value==="on"),optSelected:bz.selected,getSetAttribute:bI.className!=="t",enctype:!!av.createElement("form").enctype,submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bH.checked=true;bF.noCloneChecked=bH.cloneNode(true).checked;bJ.disabled=true;bF.optDisabled=!bz.disabled;try{delete bI.test}catch(bN){bF.deleteExpando=false}if(!bI.addEventListener&&bI.attachEvent&&bI.fireEvent){bI.attachEvent("onclick",function(){bF.noCloneEvent=false});bI.cloneNode(true).fireEvent("onclick")}bH=av.createElement("input");bH.value="t";bH.setAttribute("type","radio");bF.radioValue=bH.value==="t";bH.setAttribute("checked","checked");bI.appendChild(bH);by=av.createDocumentFragment();by.appendChild(bI.lastChild);bF.checkClone=by.cloneNode(true).cloneNode(true).lastChild.checked;bI.innerHTML="";bI.style.width=bI.style.paddingLeft="1px";bG=av.getElementsByTagName("body")[0];bE=av.createElement(bG?"div":"body");bO={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(bG){b.extend(bO,{position:"absolute",left:"-999px",top:"-999px"})}for(bL in bO){bE.style[bL]=bO[bL]}bE.appendChild(bI);bK=bG||bP;bK.insertBefore(bE,bK.firstChild);bF.appendChecked=bH.checked;bF.boxModel=bI.offsetWidth===2;if("zoom" in bI.style){bI.style.display="inline";bI.style.zoom=1;bF.inlineBlockNeedsLayout=(bI.offsetWidth===2);bI.style.display="";bI.innerHTML="<div style='width:4px;'></div>";bF.shrinkWrapBlocks=(bI.offsetWidth!==2)}bI.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bM=bI.getElementsByTagName("td");bR=(bM[0].offsetHeight===0);bM[0].style.display="";bM[1].style.display="none";bF.reliableHiddenOffsets=bR&&(bM[0].offsetHeight===0);bI.innerHTML="";if(av.defaultView&&av.defaultView.getComputedStyle){bC=av.createElement("div");bC.style.width="0";bC.style.marginRight="0";bI.appendChild(bC);bF.reliableMarginRight=(parseInt((av.defaultView.getComputedStyle(bC,null)||{marginRight:0}).marginRight,10)||0)===0}if(bI.attachEvent){for(bL in {submit:1,change:1,focusin:1}){bD="on"+bL;bR=(bD in bI);if(!bR){bI.setAttribute(bD,"return;");bR=(typeof bI[bD]==="function")}bF[bL+"Bubbles"]=bR}}b(function(){var bT,b0,b1,bZ,bU,bV,bS=1,bY="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",bX="visibility:hidden;border:0;",e="style='"+bY+"border:5px solid #000;padding:0;'",bW="<div "+e+"><div></div></div><table "+e+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";bG=av.getElementsByTagName("body")[0];if(!bG){return}bT=av.createElement("div");bT.style.cssText=bX+"width:0;height:0;position:static;top:0;margin-top:"+bS+"px";bG.insertBefore(bT,bG.firstChild);bE=av.createElement("div");bE.style.cssText=bY+bX;bE.innerHTML=bW;bT.appendChild(bE);b0=bE.firstChild;b1=b0.firstChild;bU=b0.nextSibling.firstChild.firstChild;bV={doesNotAddBorder:(b1.offsetTop!==5),doesAddBorderForTableAndCells:(bU.offsetTop===5)};b1.style.position="fixed";b1.style.top="20px";bV.fixedPosition=(b1.offsetTop===20||b1.offsetTop===15);b1.style.position=b1.style.top="";b0.style.overflow="hidden";b0.style.position="relative";bV.subtractsBorderForOverflowNotVisible=(b1.offsetTop===-5);bV.doesNotIncludeMarginInBodyOffset=(bG.offsetTop!==bS);bG.removeChild(bT);bE=bT=null;b.extend(bF,bV)});bE.innerHTML="";bK.removeChild(bE);bE=by=bJ=bz=bG=bC=bI=bH=null;return bF})();b.boxModel=b.support.boxModel;var aT=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!U(e)},data:function(bA,by,bC,bB){if(!b.acceptData(bA)){return}var bJ,bD,bG,bH=b.expando,bF=typeof by==="string",bI=bA.nodeType,e=bI?b.cache:bA,bz=bI?bA[b.expando]:bA[b.expando]&&b.expando,bE=by==="events";if((!bz||!e[bz]||(!bE&&!bB&&!e[bz].data))&&bF&&bC===M){return}if(!bz){if(bI){bA[b.expando]=bz=++b.uuid}else{bz=b.expando}}if(!e[bz]){e[bz]={};if(!bI){e[bz].toJSON=b.noop}}if(typeof by==="object"||typeof by==="function"){if(bB){e[bz]=b.extend(e[bz],by)}else{e[bz].data=b.extend(e[bz].data,by)}}bJ=bD=e[bz];if(!bB){if(!bD.data){bD.data={}}bD=bD.data}if(bC!==M){bD[b.camelCase(by)]=bC}if(bE&&!bD[by]){return bJ.events}if(bF){bG=bD[by];if(bG==null){bG=bD[b.camelCase(by)]}}else{bG=bD}return bG},removeData:function(bA,by,bB){if(!b.acceptData(bA)){return}var bE,bD,bC,bF=b.expando,bG=bA.nodeType,e=bG?b.cache:bA,bz=bG?bA[b.expando]:b.expando;if(!e[bz]){return}if(by){bE=bB?e[bz]:e[bz].data;if(bE){if(b.isArray(by)){by=by}else{if(by in bE){by=[by]}else{by=b.camelCase(by);if(by in bE){by=[by]}else{by=by.split(" ")}}}for(bD=0,bC=by.length;bD<bC;bD++){delete bE[by[bD]]}if(!(bB?U:b.isEmptyObject)(bE)){return}}}if(!bB){delete e[bz].data;if(!U(e[bz])){return}}if(b.support.deleteExpando||!e.setInterval){delete e[bz]}else{e[bz]=null}if(bG){if(b.support.deleteExpando){delete bA[b.expando]}else{if(bA.removeAttribute){bA.removeAttribute(b.expando)}else{bA[b.expando]=null}}}},_data:function(by,e,bz){return b.data(by,e,bz,true)},acceptData:function(by){if(by.nodeName){var e=b.noData[by.nodeName.toLowerCase()];if(e){return !(e===true||by.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(bB,bD){var bE,e,bz,bC=null;if(typeof bB==="undefined"){if(this.length){bC=b.data(this[0]);if(this[0].nodeType===1&&!b._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var bA=0,by=e.length;bA<by;bA++){bz=e[bA].name;if(bz.indexOf("data-")===0){bz=b.camelCase(bz.substring(5));a7(this[0],bz,bC[bz])}}b._data(this[0],"parsedAttrs",true)}}return bC}else{if(typeof bB==="object"){return this.each(function(){b.data(this,bB)})}}bE=bB.split(".");bE[1]=bE[1]?"."+bE[1]:"";if(bD===M){bC=this.triggerHandler("getData"+bE[1]+"!",[bE[0]]);if(bC===M&&this.length){bC=b.data(this[0],bB);bC=a7(this[0],bB,bC)}return bC===M&&bE[1]?this.data(bE[0]):bC}else{return this.each(function(){var bG=b(this),bF=[bE[0],bD];bG.triggerHandler("setData"+bE[1]+"!",bF);b.data(this,bB,bD);bG.triggerHandler("changeData"+bE[1]+"!",bF)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a7(bA,bz,bB){if(bB===M&&bA.nodeType===1){var by="data-"+bz.replace(aA,"-$1").toLowerCase();bB=bA.getAttribute(by);if(typeof bB==="string"){try{bB=bB==="true"?true:bB==="false"?false:bB==="null"?null:b.isNumeric(bB)?parseFloat(bB):aT.test(bB)?b.parseJSON(bB):bB}catch(bC){}b.data(bA,bz,bB)}else{bB=M}}return bB}function U(by){for(var e in by){if(e==="data"&&b.isEmptyObject(by[e])){continue}if(e!=="toJSON"){return false}}return true}function bk(bB,bA,bD){var bz=bA+"defer",by=bA+"queue",e=bA+"mark",bC=b._data(bB,bz);if(bC&&(bD==="queue"||!b._data(bB,by))&&(bD==="mark"||!b._data(bB,e))){setTimeout(function(){if(!b._data(bB,by)&&!b._data(bB,e)){b.removeData(bB,bz,true);bC.fire()}},0)}}b.extend({_mark:function(by,e){if(by){e=(e||"fx")+"mark";b._data(by,e,(b._data(by,e)||0)+1)}},_unmark:function(bB,bA,by){if(bB!==true){by=bA;bA=bB;bB=false}if(bA){by=by||"fx";var e=by+"mark",bz=bB?0:((b._data(bA,e)||1)-1);if(bz){b._data(bA,e,bz)}else{b.removeData(bA,e,true);bk(bA,by,"mark")}}},queue:function(by,e,bA){var bz;if(by){e=(e||"fx")+"queue";bz=b._data(by,e);if(bA){if(!bz||b.isArray(bA)){bz=b._data(by,e,b.makeArray(bA))}else{bz.push(bA)}}return bz||[]}},dequeue:function(bB,bA){bA=bA||"fx";var by=b.queue(bB,bA),bz=by.shift(),e={};if(bz==="inprogress"){bz=by.shift()}if(bz){if(bA==="fx"){by.unshift("inprogress")}b._data(bB,bA+".run",e);bz.call(bB,function(){b.dequeue(bB,bA)},e)}if(!by.length){b.removeData(bB,bA+"queue "+bA+".run",true);bk(bB,bA,"queue")}}});b.fn.extend({queue:function(e,by){if(typeof e!=="string"){by=e;e="fx"}if(by===M){return b.queue(this[0],e)}return this.each(function(){var bz=b.queue(this,e,by);if(e==="fx"&&bz[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(by,e){by=b.fx?b.fx.speeds[by]||by:by;e=e||"fx";return this.queue(e,function(bA,bz){var bB=setTimeout(bA,by);bz.stop=function(){clearTimeout(bB)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bG,bz){if(typeof bG!=="string"){bz=bG;bG=M}bG=bG||"fx";var e=b.Deferred(),by=this,bB=by.length,bE=1,bC=bG+"defer",bD=bG+"queue",bF=bG+"mark",bA;function bH(){if(!(--bE)){e.resolveWith(by,[by])}}while(bB--){if((bA=b.data(by[bB],bC,M,true)||(b.data(by[bB],bD,M,true)||b.data(by[bB],bF,M,true))&&b.data(by[bB],bC,b.Callbacks("once memory"),true))){bE++;bA.add(bH)}}bH();return e.promise()}});var aQ=/[\n\t\r]/g,ag=/\s+/,aV=/\r/g,g=/^(?:button|input)$/i,E=/^(?:button|input|object|select|textarea)$/i,m=/^a(?:rea)?$/i,ao=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,G=b.support.getSetAttribute,bg,aZ,aF;b.fn.extend({attr:function(e,by){return b.access(this,e,by,true,b.attr)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,by){return b.access(this,e,by,true,b.prop)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=M;delete this[e]}catch(by){}})},addClass:function(bB){var bD,bz,by,bA,bC,bE,e;if(b.isFunction(bB)){return this.each(function(bF){b(this).addClass(bB.call(this,bF,this.className))})}if(bB&&typeof bB==="string"){bD=bB.split(ag);for(bz=0,by=this.length;bz<by;bz++){bA=this[bz];if(bA.nodeType===1){if(!bA.className&&bD.length===1){bA.className=bB}else{bC=" "+bA.className+" ";for(bE=0,e=bD.length;bE<e;bE++){if(!~bC.indexOf(" "+bD[bE]+" ")){bC+=bD[bE]+" "}}bA.className=b.trim(bC)}}}}return this},removeClass:function(bC){var bD,bz,by,bB,bA,bE,e;if(b.isFunction(bC)){return this.each(function(bF){b(this).removeClass(bC.call(this,bF,this.className))})}if((bC&&typeof bC==="string")||bC===M){bD=(bC||"").split(ag);for(bz=0,by=this.length;bz<by;bz++){bB=this[bz];if(bB.nodeType===1&&bB.className){if(bC){bA=(" "+bB.className+" ").replace(aQ," ");for(bE=0,e=bD.length;bE<e;bE++){bA=bA.replace(" "+bD[bE]+" "," ")}bB.className=b.trim(bA)}else{bB.className=""}}}}return this},toggleClass:function(bA,by){var bz=typeof bA,e=typeof by==="boolean";if(b.isFunction(bA)){return this.each(function(bB){b(this).toggleClass(bA.call(this,bB,this.className,by),by)})}return this.each(function(){if(bz==="string"){var bD,bC=0,bB=b(this),bE=by,bF=bA.split(ag);while((bD=bF[bC++])){bE=e?bE:!bB.hasClass(bD);bB[bE?"addClass":"removeClass"](bD)}}else{if(bz==="undefined"||bz==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bA===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bA=" "+e+" ",bz=0,by=this.length;for(;bz<by;bz++){if(this[bz].nodeType===1&&(" "+this[bz].className+" ").replace(aQ," ").indexOf(bA)>-1){return true}}return false},val:function(bA){var e,by,bB,bz=this[0];if(!arguments.length){if(bz){e=b.valHooks[bz.nodeName.toLowerCase()]||b.valHooks[bz.type];if(e&&"get" in e&&(by=e.get(bz,"value"))!==M){return by}by=bz.value;return typeof by==="string"?by.replace(aV,""):by==null?"":by}return M}bB=b.isFunction(bA);return this.each(function(bD){var bC=b(this),bE;if(this.nodeType!==1){return}if(bB){bE=bA.call(this,bD,bC.val())}else{bE=bA}if(bE==null){bE=""}else{if(typeof bE==="number"){bE+=""}else{if(b.isArray(bE)){bE=b.map(bE,function(bF){return bF==null?"":bF+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bE,"value")===M){this.value=bE}})}});b.extend({valHooks:{option:{get:function(e){var by=e.attributes.value;return !by||by.specified?e.value:e.text}},select:{get:function(e){var bD,by,bC,bA,bB=e.selectedIndex,bE=[],bF=e.options,bz=e.type==="select-one";if(bB<0){return null}by=bz?bB:0;bC=bz?bB+1:bF.length;for(;by<bC;by++){bA=bF[by];if(bA.selected&&(b.support.optDisabled?!bA.disabled:bA.getAttribute("disabled")===null)&&(!bA.parentNode.disabled||!b.nodeName(bA.parentNode,"optgroup"))){bD=b(bA).val();if(bz){return bD}bE.push(bD)}}if(bz&&!bE.length&&bF.length){return b(bF[bB]).val()}return bE},set:function(by,bz){var e=b.makeArray(bz);b(by).find("option").each(function(){this.selected=b.inArray(b(this).val(),e)>=0});if(!e.length){by.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bD,bA,bE,bC){var bz,e,bB,by=bD.nodeType;if(!bD||by===3||by===8||by===2){return M}if(bC&&bA in b.attrFn){return b(bD)[bA](bE)}if(!("getAttribute" in bD)){return b.prop(bD,bA,bE)}bB=by!==1||!b.isXMLDoc(bD);if(bB){bA=bA.toLowerCase();e=b.attrHooks[bA]||(ao.test(bA)?aZ:bg)}if(bE!==M){if(bE===null){b.removeAttr(bD,bA);return M}else{if(e&&"set" in e&&bB&&(bz=e.set(bD,bE,bA))!==M){return bz}else{bD.setAttribute(bA,""+bE);return bE}}}else{if(e&&"get" in e&&bB&&(bz=e.get(bD,bA))!==null){return bz}else{bz=bD.getAttribute(bA);return bz===null?M:bz}}},removeAttr:function(bA,bC){var bB,bD,by,e,bz=0;if(bA.nodeType===1){bD=(bC||"").split(ag);e=bD.length;for(;bz<e;bz++){by=bD[bz].toLowerCase();bB=b.propFix[by]||by;b.attr(bA,by,"");bA.removeAttribute(G?by:bB);if(ao.test(by)&&bB in bA){bA[bB]=false}}}},attrHooks:{type:{set:function(e,by){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&by==="radio"&&b.nodeName(e,"input")){var bz=e.value;e.setAttribute("type",by);if(bz){e.value=bz}return by}}}},value:{get:function(by,e){if(bg&&b.nodeName(by,"button")){return bg.get(by,e)}return e in by?by.value:null},set:function(by,bz,e){if(bg&&b.nodeName(by,"button")){return bg.set(by,bz,e)}by.value=bz}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(bC,bA,bD){var bz,e,bB,by=bC.nodeType;if(!bC||by===3||by===8||by===2){return M}bB=by!==1||!b.isXMLDoc(bC);if(bB){bA=b.propFix[bA]||bA;e=b.propHooks[bA]}if(bD!==M){if(e&&"set" in e&&(bz=e.set(bC,bD,bA))!==M){return bz}else{return(bC[bA]=bD)}}else{if(e&&"get" in e&&(bz=e.get(bC,bA))!==null){return bz}else{return bC[bA]}}},propHooks:{tabIndex:{get:function(by){var e=by.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):E.test(by.nodeName)||m.test(by.nodeName)&&by.href?0:M}}}});b.attrHooks.tabindex=b.propHooks.tabIndex;aZ={get:function(by,e){var bA,bz=b.prop(by,e);return bz===true||typeof bz!=="boolean"&&(bA=by.getAttributeNode(e))&&bA.nodeValue!==false?e.toLowerCase():M},set:function(by,bA,e){var bz;if(bA===false){b.removeAttr(by,e)}else{bz=b.propFix[e]||e;if(bz in by){by[bz]=true}by.setAttribute(e,e.toLowerCase())}return e}};if(!G){aF={name:true,id:true};bg=b.valHooks.button={get:function(bz,by){var e;e=bz.getAttributeNode(by);return e&&(aF[by]?e.nodeValue!=="":e.specified)?e.nodeValue:M},set:function(bz,bA,by){var e=bz.getAttributeNode(by);if(!e){e=av.createAttribute(by);bz.setAttributeNode(e)}return(e.nodeValue=bA+"")}};b.attrHooks.tabindex.set=bg.set;b.each(["width","height"],function(by,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bz,bA){if(bA===""){bz.setAttribute(e,"auto");return bA}}})});b.attrHooks.contenteditable={get:bg.get,set:function(by,bz,e){if(bz===""){bz="false"}bg.set(by,bz,e)}}}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(by,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bA){var bz=bA.getAttribute(e,2);return bz===null?M:bz}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||M},set:function(e,by){return(e.style.cssText=""+by)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(by){var e=by.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!b.support.enctype){b.propFix.enctype="encoding"}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,by){if(b.isArray(by)){return(e.checked=b.inArray(b(e).val(),by)>=0)}}})});var a1=/\.(.*)$/,bf=/^(?:textarea|input|select)$/i,P=/\./g,bl=/ /g,aH=/[^\w\s.|`]/g,o=/^([^\.]*)?(?:\.(.+))?$/,K=/\bhover(\.\S+)?/,aP=/^key/,bh=/^(?:mouse|contextmenu)|click/,V=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Z=function(e){var by=V.exec(e);if(by){by[1]=(by[1]||"").toLowerCase();by[3]=by[3]&&new RegExp("(?:^|\\s)"+by[3]+"(?:\\s|$)")}return by},k=function(by,e){return((!e[1]||by.nodeName.toLowerCase()===e[1])&&(!e[2]||by.id===e[2])&&(!e[3]||e[3].test(by.className)))},bw=function(e){return b.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};b.event={add:function(bA,bF,bM,bD,bB){var bG,bE,bN,bL,bK,bI,e,bJ,by,bC,bz,bH;if(bA.nodeType===3||bA.nodeType===8||!bF||!bM||!(bG=b._data(bA))){return}if(bM.handler){by=bM;bM=by.handler}if(!bM.guid){bM.guid=b.guid++}bN=bG.events;if(!bN){bG.events=bN={}}bE=bG.handle;if(!bE){bG.handle=bE=function(bO){return typeof b!=="undefined"&&(!bO||b.event.triggered!==bO.type)?b.event.dispatch.apply(bE.elem,arguments):M};bE.elem=bA}bF=bw(bF).split(" ");for(bL=0;bL<bF.length;bL++){bK=o.exec(bF[bL])||[];bI=bK[1];e=(bK[2]||"").split(".").sort();bH=b.event.special[bI]||{};bI=(bB?bH.delegateType:bH.bindType)||bI;bH=b.event.special[bI]||{};bJ=b.extend({type:bI,origType:bK[1],data:bD,handler:bM,guid:bM.guid,selector:bB,namespace:e.join(".")},by);if(bB){bJ.quick=Z(bB);if(!bJ.quick&&b.expr.match.POS.test(bB)){bJ.isPositional=true}}bz=bN[bI];if(!bz){bz=bN[bI]=[];bz.delegateCount=0;if(!bH.setup||bH.setup.call(bA,bD,e,bE)===false){if(bA.addEventListener){bA.addEventListener(bI,bE,false)}else{if(bA.attachEvent){bA.attachEvent("on"+bI,bE)}}}}if(bH.add){bH.add.call(bA,bJ);if(!bJ.handler.guid){bJ.handler.guid=bM.guid}}if(bB){bz.splice(bz.delegateCount++,0,bJ)}else{bz.push(bJ)}b.event.global[bI]=true}bA=null},global:{},remove:function(bz,bE,bK,bA){var bF=b.hasData(bz)&&b._data(bz),bL,bM,bH,by,bB,bC,bJ,bG,bD,e,bI;if(!bF||!(bJ=bF.events)){return}bE=bw(bE||"").split(" ");for(bL=0;bL<bE.length;bL++){bM=o.exec(bE[bL])||[];bH=bM[1];by=bM[2];if(!bH){by=by?"."+by:"";for(bC in bJ){b.event.remove(bz,bC+by,bK,bA)}return}bG=b.event.special[bH]||{};bH=(bA?bG.delegateType:bG.bindType)||bH;e=bJ[bH]||[];bB=e.length;by=by?new RegExp("(^|\\.)"+by.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(bK||by||bA||bG.remove){for(bC=0;bC<e.length;bC++){bI=e[bC];if(!bK||bK.guid===bI.guid){if(!by||by.test(bI.namespace)){if(!bA||bA===bI.selector||bA==="**"&&bI.selector){e.splice(bC--,1);if(bI.selector){e.delegateCount--}if(bG.remove){bG.remove.call(bz,bI)}}}}}}else{e.length=0}if(e.length===0&&bB!==e.length){if(!bG.teardown||bG.teardown.call(bz,by)===false){b.removeEvent(bz,bH,bF.handle)}delete bJ[bH]}}if(b.isEmptyObject(bJ)){bD=bF.handle;if(bD){bD.elem=null}b.removeData(bz,["events","handle"],true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(by,bG,bD,bM){if(bD&&(bD.nodeType===3||bD.nodeType===8)){return}var bJ=by.type||by,bA=[],e,bz,bF,bK,bC,bB,bI,bH,bE,bL;if(bJ.indexOf("!")>=0){bJ=bJ.slice(0,-1);bz=true}if(bJ.indexOf(".")>=0){bA=bJ.split(".");bJ=bA.shift();bA.sort()}if((!bD||b.event.customEvent[bJ])&&!b.event.global[bJ]){return}by=typeof by==="object"?by[b.expando]?by:new b.Event(bJ,by):new b.Event(bJ);by.type=bJ;by.isTrigger=true;by.exclusive=bz;by.namespace=bA.join(".");by.namespace_re=by.namespace?new RegExp("(^|\\.)"+bA.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;bB=bJ.indexOf(":")<0?"on"+bJ:"";if(bM||!bD){by.preventDefault()}if(!bD){e=b.cache;for(bF in e){if(e[bF].events&&e[bF].events[bJ]){b.event.trigger(by,bG,e[bF].handle.elem,true)}}return}by.result=M;if(!by.target){by.target=bD}bG=bG!=null?b.makeArray(bG):[];bG.unshift(by);bI=b.event.special[bJ]||{};if(bI.trigger&&bI.trigger.apply(bD,bG)===false){return}bE=[[bD,bI.bindType||bJ]];if(!bM&&!bI.noBubble&&!b.isWindow(bD)){bL=bI.delegateType||bJ;bC=null;for(bK=bD.parentNode;bK;bK=bK.parentNode){bE.push([bK,bL]);bC=bK}if(bC&&bC===bD.ownerDocument){bE.push([bC.defaultView||bC.parentWindow||bd,bL])}}for(bF=0;bF<bE.length;bF++){bK=bE[bF][0];by.type=bE[bF][1];bH=(b._data(bK,"events")||{})[by.type]&&b._data(bK,"handle");if(bH){bH.apply(bK,bG)}bH=bB&&bK[bB];if(bH&&b.acceptData(bK)){bH.apply(bK,bG)}if(by.isPropagationStopped()){break}}by.type=bJ;if(!by.isDefaultPrevented()){if((!bI._default||bI._default.apply(bD.ownerDocument,bG)===false)&&!(bJ==="click"&&b.nodeName(bD,"a"))&&b.acceptData(bD)){if(bB&&bD[bJ]&&((bJ!=="focus"&&bJ!=="blur")||by.target.offsetWidth!==0)&&!b.isWindow(bD)){bC=bD[bB];if(bC){bD[bB]=null}b.event.triggered=bJ;bD[bJ]();b.event.triggered=M;if(bC){bD[bB]=bC}}}}return by.result},dispatch:function(bJ){bJ=b.event.fix(bJ||bd.event);var bF=((b._data(this,"events")||{})[bJ.type]||[]),bE=bF.delegateCount,bA=[].slice.call(arguments,0),bG=!bJ.exclusive&&!bJ.namespace,bC=(b.event.special[bJ.type]||{}).handle,by=[],bL,bI,bB,bN,bK,bD,bz,e,bH,bM,bO;bA[0]=bJ;bJ.delegateTarget=this;if(bE&&!bJ.target.disabled&&!(bJ.button&&bJ.type==="click")){for(bB=bJ.target;bB!=this;bB=bB.parentNode||this){bK={};bz=[];for(bL=0;bL<bE;bL++){e=bF[bL];bH=e.selector;bM=bK[bH];if(e.isPositional){bM=(bM||(bK[bH]=b(bH))).index(bB)>=0}else{if(bM===M){bM=bK[bH]=(e.quick?k(bB,e.quick):b(bB).is(bH))}}if(bM){bz.push(e)}}if(bz.length){by.push({elem:bB,matches:bz})}}}if(bF.length>bE){by.push({elem:this,matches:bF.slice(bE)})}for(bL=0;bL<by.length&&!bJ.isPropagationStopped();bL++){bD=by[bL];bJ.currentTarget=bD.elem;for(bI=0;bI<bD.matches.length&&!bJ.isImmediatePropagationStopped();bI++){e=bD.matches[bI];if(bG||(!bJ.namespace&&!e.namespace)||bJ.namespace_re&&bJ.namespace_re.test(e.namespace)){bJ.data=e.data;bJ.handleObj=e;bN=(bC||e.handler).apply(bD.elem,bA);if(bN!==M){bJ.result=bN;if(bN===false){bJ.preventDefault();bJ.stopPropagation()}}}}}return bJ.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(by,e){if(by.which==null){by.which=e.charCode!=null?e.charCode:e.keyCode}return by}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(bA,bz){var bB,bC,e,by=bz.button,bD=bz.fromElement;if(bA.pageX==null&&bz.clientX!=null){bB=bA.target.ownerDocument||av;bC=bB.documentElement;e=bB.body;bA.pageX=bz.clientX+(bC&&bC.scrollLeft||e&&e.scrollLeft||0)-(bC&&bC.clientLeft||e&&e.clientLeft||0);bA.pageY=bz.clientY+(bC&&bC.scrollTop||e&&e.scrollTop||0)-(bC&&bC.clientTop||e&&e.clientTop||0)}if(!bA.relatedTarget&&bD){bA.relatedTarget=bD===bA.target?bz.toElement:bD}if(!bA.which&&by!==M){bA.which=(by&1?1:(by&2?3:(by&4?2:0)))}return bA}},fix:function(bz){if(bz[b.expando]){return bz}var by,bC,e=bz,bA=b.event.fixHooks[bz.type]||{},bB=bA.props?this.props.concat(bA.props):this.props;bz=b.Event(e);for(by=bB.length;by;){bC=bB[--by];bz[bC]=e[bC]}if(!bz.target){bz.target=e.srcElement||av}if(bz.target.nodeType===3){bz.target=bz.target.parentNode}if(bz.metaKey===M){bz.metaKey=bz.ctrlKey}return bA.filter?bA.filter(bz,e):bz},special:{ready:{setup:b.bindReady},focus:{delegateType:"focusin",noBubble:true},blur:{delegateType:"focusout",noBubble:true},beforeunload:{setup:function(bz,by,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(by,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}},simulate:function(bz,bB,bA,by){var bC=b.extend(new b.Event(),bA,{type:bz,isSimulated:true,originalEvent:{}});if(by){b.event.trigger(bC,null,bB)}else{b.event.dispatch.call(bB,bC)}if(bC.isDefaultPrevented()){bA.preventDefault()}}};b.event.handle=b.event.dispatch;b.removeEvent=av.removeEventListener?function(by,e,bz){if(by.removeEventListener){by.removeEventListener(e,bz,false)}}:function(by,e,bz){if(by.detachEvent){by.detachEvent("on"+e,bz)}};b.Event=function(by,e){if(!(this instanceof b.Event)){return new b.Event(by,e)}if(by&&by.type){this.originalEvent=by;this.type=by.type;this.isDefaultPrevented=(by.defaultPrevented||by.returnValue===false||by.getPreventDefault&&by.getPreventDefault())?j:bn}else{this.type=by}if(e){b.extend(this,e)}this.timeStamp=by&&by.timeStamp||b.now();this[b.expando]=true};function bn(){return false}function j(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=j;var by=this.originalEvent;if(!by){return}if(by.preventDefault){by.preventDefault()}else{by.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=j;var by=this.originalEvent;if(!by){return}if(by.stopPropagation){by.stopPropagation()}by.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=j;this.stopPropagation()},isDefaultPrevented:bn,isPropagationStopped:bn,isImmediatePropagationStopped:bn};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(by,e){b.event.special[by]=b.event.special[e]={delegateType:e,bindType:e,handle:function(bC){var bF=this,bE=bC.relatedTarget,bB=bC.handleObj,bz=bB.selector,bD,bA;if(!bE||bB.origType===bC.type||(bE!==bF&&!b.contains(bF,bE))){bD=bC.type;bC.type=bB.origType;bA=bB.handler.apply(this,arguments);bC.type=bD}return bA}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(){if(b.nodeName(this,"form")){return false}b.event.add(this,"click._submit keypress._submit",function(bA){var bz=bA.target,by=b.nodeName(bz,"input")||b.nodeName(bz,"button")?bz.form:M;if(by&&!by._submit_attached){b.event.add(by,"submit._submit",function(e){if(this.parentNode){b.event.simulate("submit",this.parentNode,e,true)}});by._submit_attached=true}})},teardown:function(){if(b.nodeName(this,"form")){return false}b.event.remove(this,"._submit")}}}if(!b.support.changeBubbles){b.event.special.change={setup:function(){if(bf.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){b.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});b.event.add(this,"click._change",function(e){if(this._just_changed){this._just_changed=false;b.event.simulate("change",this,e,true)}})}return false}b.event.add(this,"beforeactivate._change",function(bz){var by=bz.target;if(bf.test(by.nodeName)&&!by._change_attached){b.event.add(by,"change._change",function(e){if(this.parentNode&&!e.isSimulated){b.event.simulate("change",this.parentNode,e,true)}});by._change_attached=true}})},handle:function(by){var e=by.target;if(this!==e||by.isSimulated||by.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return by.handleObj.handler.apply(this,arguments)}},teardown:function(){b.event.remove(this,"._change");return bf.test(this.nodeName)}}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bA,e){var by=0,bz=function(bB){b.event.simulate(e,bB.target,b.event.fix(bB),true)};b.event.special[e]={setup:function(){if(by++===0){av.addEventListener(bA,bz,true)}},teardown:function(){if(--by===0){av.removeEventListener(bA,bz,true)}}}})}b.fn.extend({on:function(bz,e,bC,bB,by){var bD,bA;if(typeof bz==="object"){if(typeof e!=="string"){bC=e;e=M}for(bA in bz){this.on(bA,e,bC,bz[bA],by)}return this}if(bC==null&&bB==null){bB=e;bC=e=M}else{if(bB==null){if(typeof e==="string"){bB=bC;bC=M}else{bB=bC;bC=e;e=M}}}if(bB===false){bB=bn}else{if(!bB){return this}}if(by===1){bD=bB;bB=function(bE){b().off(bE);return bD.apply(this,arguments)};bB.guid=bD.guid||(bD.guid=b.guid++)}return this.each(function(){b.event.add(this,bz,bB,bC,e)})},one:function(by,e,bA,bz){return this.on.call(this,by,e,bA,bz,1)},off:function(bz,e,bB){if(bz&&bz.preventDefault&&bz.handleObj){var by=bz.handleObj;b(bz.delegateTarget).off(by.namespace?by.type+"."+by.namespace:by.type,by.selector,by.handler);return this}if(typeof bz==="object"){for(var bA in bz){this.off(bA,e,bz[bA])}return this}if(e===false||typeof e==="function"){bB=e;e=M}if(bB===false){bB=bn}return this.each(function(){b.event.remove(this,bz,bB,e)})},bind:function(e,bz,by){return this.on(e,null,bz,by)},unbind:function(e,by){return this.off(e,null,by)},live:function(e,bz,by){b(this.context).on(e,this.selector,bz,by);return this},die:function(e,by){b(this.context).off(e,this.selector||"**",by);return this},delegate:function(e,by,bA,bz){return this.on(by,e,bA,bz)},undelegate:function(e,by,bz){return arguments.length==1?this.off(e,"**"):this.off(by,e,bz)},trigger:function(e,by){return this.each(function(){b.event.trigger(e,by,this)})},triggerHandler:function(e,by){if(this[0]){return b.event.trigger(e,by,this[0],true)}},toggle:function(bA){var by=arguments,e=bA.guid||b.guid++,bz=0,bB=function(bC){var bD=(b._data(this,"lastToggle"+bA.guid)||0)%bz;b._data(this,"lastToggle"+bA.guid,bD+1);bC.preventDefault();return by[bD].apply(this,arguments)||false};bB.guid=e;while(bz<by.length){by[bz++].guid=e}return this.click(bB)},hover:function(e,by){return this.mouseenter(e).mouseleave(by||e)}});b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(by,e){b.fn[e]=function(bA,bz){if(bz==null){bz=bA;bA=null}return arguments.length>0?this.bind(e,bA,bz):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aP.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bh.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}});
/*!
 * Sizzle CSS Selector Engine
 *  Copyright 2011, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var bK=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bF="sizcache"+(Math.random()+"").replace(".",""),bL=0,bO=Object.prototype.toString,bE=false,bD=true,bN=/\\/g,bR=/\r\n/g,bT=/\W/;[0,0].sort(function(){bD=false;return 0});var bB=function(bY,e,b1,b2){b1=b1||[];e=e||av;var b4=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bY||typeof bY!=="string"){return b1}var bV,b6,b9,bU,b5,b8,b7,b0,bX=true,bW=bB.isXML(e),bZ=[],b3=bY;do{bK.exec("");bV=bK.exec(b3);if(bV){b3=bV[3];bZ.push(bV[1]);if(bV[2]){bU=bV[3];break}}}while(bV);if(bZ.length>1&&bG.exec(bY)){if(bZ.length===2&&bH.relative[bZ[0]]){b6=bP(bZ[0]+bZ[1],e,b2)}else{b6=bH.relative[bZ[0]]?[e]:bB(bZ.shift(),e);while(bZ.length){bY=bZ.shift();if(bH.relative[bY]){bY+=bZ.shift()}b6=bP(bY,b6,b2)}}}else{if(!b2&&bZ.length>1&&e.nodeType===9&&!bW&&bH.match.ID.test(bZ[0])&&!bH.match.ID.test(bZ[bZ.length-1])){b5=bB.find(bZ.shift(),e,bW);e=b5.expr?bB.filter(b5.expr,b5.set)[0]:b5.set[0]}if(e){b5=b2?{expr:bZ.pop(),set:bI(b2)}:bB.find(bZ.pop(),bZ.length===1&&(bZ[0]==="~"||bZ[0]==="+")&&e.parentNode?e.parentNode:e,bW);b6=b5.expr?bB.filter(b5.expr,b5.set):b5.set;if(bZ.length>0){b9=bI(b6)}else{bX=false}while(bZ.length){b8=bZ.pop();b7=b8;if(!bH.relative[b8]){b8=""}else{b7=bZ.pop()}if(b7==null){b7=e}bH.relative[b8](b9,b7,bW)}}else{b9=bZ=[]}}if(!b9){b9=b6}if(!b9){bB.error(b8||bY)}if(bO.call(b9)==="[object Array]"){if(!bX){b1.push.apply(b1,b9)}else{if(e&&e.nodeType===1){for(b0=0;b9[b0]!=null;b0++){if(b9[b0]&&(b9[b0]===true||b9[b0].nodeType===1&&bB.contains(e,b9[b0]))){b1.push(b6[b0])}}}else{for(b0=0;b9[b0]!=null;b0++){if(b9[b0]&&b9[b0].nodeType===1){b1.push(b6[b0])}}}}}else{bI(b9,b1)}if(bU){bB(bU,b4,b1,b2);bB.uniqueSort(b1)}return b1};bB.uniqueSort=function(bU){if(bM){bE=bD;bU.sort(bM);if(bE){for(var e=1;e<bU.length;e++){if(bU[e]===bU[e-1]){bU.splice(e--,1)}}}}return bU};bB.matches=function(e,bU){return bB(e,null,null,bU)};bB.matchesSelector=function(e,bU){return bB(bU,null,null,[e]).length>0};bB.find=function(b0,e,b1){var bZ,bV,bX,bW,bY,bU;if(!b0){return[]}for(bV=0,bX=bH.order.length;bV<bX;bV++){bY=bH.order[bV];if((bW=bH.leftMatch[bY].exec(b0))){bU=bW[1];bW.splice(1,1);if(bU.substr(bU.length-1)!=="\\"){bW[1]=(bW[1]||"").replace(bN,"");bZ=bH.find[bY](bW,e,b1);if(bZ!=null){b0=b0.replace(bH.match[bY],"");break}}}}if(!bZ){bZ=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bZ,expr:b0}};bB.filter=function(b4,b3,b7,bX){var bZ,e,b2,b9,b6,bU,bW,bY,b5,bV=b4,b8=[],b1=b3,b0=b3&&b3[0]&&bB.isXML(b3[0]);while(b4&&b3.length){for(b2 in bH.filter){if((bZ=bH.leftMatch[b2].exec(b4))!=null&&bZ[2]){bU=bH.filter[b2];bW=bZ[1];e=false;bZ.splice(1,1);if(bW.substr(bW.length-1)==="\\"){continue}if(b1===b8){b8=[]}if(bH.preFilter[b2]){bZ=bH.preFilter[b2](bZ,b1,b7,b8,bX,b0);if(!bZ){e=b9=true}else{if(bZ===true){continue}}}if(bZ){for(bY=0;(b6=b1[bY])!=null;bY++){if(b6){b9=bU(b6,bZ,bY,b1);b5=bX^b9;if(b7&&b9!=null){if(b5){e=true}else{b1[bY]=false}}else{if(b5){b8.push(b6);e=true}}}}}if(b9!==M){if(!b7){b1=b8}b4=b4.replace(bH.match[b2],"");if(!e){return[]}break}}}if(b4===bV){if(e==null){bB.error(b4)}else{break}}bV=b4}return b1};bB.error=function(e){throw"Syntax error, unrecognized expression: "+e};var bz=bB.getText=function(bX){var bV,bW,e=bX.nodeType,bU="";if(e){if(e===1){if(typeof bX.textContent==="string"){return bX.textContent}else{if(typeof bX.innerText==="string"){return bX.innerText.replace(bR,"")}else{for(bX=bX.firstChild;bX;bX=bX.nextSibling){bU+=bz(bX)}}}}else{if(e===3||e===4){return bX.nodeValue}}}else{for(bV=0;(bW=bX[bV]);bV++){if(bW.nodeType!==8){bU+=bz(bW)}}}return bU};var bH=bB.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bZ,bU){var bW=typeof bU==="string",bY=bW&&!bT.test(bU),b0=bW&&!bY;if(bY){bU=bU.toLowerCase()}for(var bV=0,e=bZ.length,bX;bV<e;bV++){if((bX=bZ[bV])){while((bX=bX.previousSibling)&&bX.nodeType!==1){}bZ[bV]=b0||bX&&bX.nodeName.toLowerCase()===bU?bX||false:bX===bU}}if(b0){bB.filter(bU,bZ,true)}},">":function(bZ,bU){var bY,bX=typeof bU==="string",bV=0,e=bZ.length;if(bX&&!bT.test(bU)){bU=bU.toLowerCase();for(;bV<e;bV++){bY=bZ[bV];if(bY){var bW=bY.parentNode;bZ[bV]=bW.nodeName.toLowerCase()===bU?bW:false}}}else{for(;bV<e;bV++){bY=bZ[bV];if(bY){bZ[bV]=bX?bY.parentNode:bY.parentNode===bU}}if(bX){bB.filter(bU,bZ,true)}}},"":function(bW,bU,bY){var bX,bV=bL++,e=bQ;if(typeof bU==="string"&&!bT.test(bU)){bU=bU.toLowerCase();bX=bU;e=by}e("parentNode",bU,bV,bW,bX,bY)},"~":function(bW,bU,bY){var bX,bV=bL++,e=bQ;if(typeof bU==="string"&&!bT.test(bU)){bU=bU.toLowerCase();bX=bU;e=by}e("previousSibling",bU,bV,bW,bX,bY)}},find:{ID:function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var e=bV.getElementById(bU[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bV,bY){if(typeof bY.getElementsByName!=="undefined"){var bU=[],bX=bY.getElementsByName(bV[1]);for(var bW=0,e=bX.length;bW<e;bW++){if(bX[bW].getAttribute("name")===bV[1]){bU.push(bX[bW])}}return bU.length===0?null:bU}},TAG:function(e,bU){if(typeof bU.getElementsByTagName!=="undefined"){return bU.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bW,bU,bV,e,bZ,b0){bW=" "+bW[1].replace(bN,"")+" ";if(b0){return bW}for(var bX=0,bY;(bY=bU[bX])!=null;bX++){if(bY){if(bZ^(bY.className&&(" "+bY.className+" ").replace(/[\t\n\r]/g," ").indexOf(bW)>=0)){if(!bV){e.push(bY)}}else{if(bV){bU[bX]=false}}}}return false},ID:function(e){return e[1].replace(bN,"")},TAG:function(bU,e){return bU[1].replace(bN,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bB.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bU=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bU[1]+(bU[2]||1))-0;e[3]=bU[3]-0}else{if(e[2]){bB.error(e[0])}}e[0]=bL++;return e},ATTR:function(bX,bU,bV,e,bY,bZ){var bW=bX[1]=bX[1].replace(bN,"");if(!bZ&&bH.attrMap[bW]){bX[1]=bH.attrMap[bW]}bX[4]=(bX[4]||bX[5]||"").replace(bN,"");if(bX[2]==="~="){bX[4]=" "+bX[4]+" "}return bX},PSEUDO:function(bX,bU,bV,e,bY){if(bX[1]==="not"){if((bK.exec(bX[3])||"").length>1||/^\w/.test(bX[3])){bX[3]=bB(bX[3],null,null,bU)}else{var bW=bB.filter(bX[3],bU,bV,true^bY);if(!bV){e.push.apply(e,bW)}return false}}else{if(bH.match.POS.test(bX[0])||bH.match.CHILD.test(bX[0])){return true}}return bX},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bV,bU,e){return !!bB(e[3],bV).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bV){var e=bV.getAttribute("type"),bU=bV.type;return bV.nodeName.toLowerCase()==="input"&&"text"===bU&&(e===bU||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bU){var e=bU.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bU.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bU){var e=bU.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bU.type},button:function(bU){var e=bU.nodeName.toLowerCase();return e==="input"&&"button"===bU.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bU,e){return e===0},last:function(bV,bU,e,bW){return bU===bW.length-1},even:function(bU,e){return e%2===0},odd:function(bU,e){return e%2===1},lt:function(bV,bU,e){return bU<e[3]-0},gt:function(bV,bU,e){return bU>e[3]-0},nth:function(bV,bU,e){return e[3]-0===bU},eq:function(bV,bU,e){return e[3]-0===bU}},filter:{PSEUDO:function(bV,b0,bZ,b1){var e=b0[1],bU=bH.filters[e];if(bU){return bU(bV,bZ,b0,b1)}else{if(e==="contains"){return(bV.textContent||bV.innerText||bz([bV])||"").indexOf(b0[3])>=0}else{if(e==="not"){var bW=b0[3];for(var bY=0,bX=bW.length;bY<bX;bY++){if(bW[bY]===bV){return false}}return true}else{bB.error(e)}}}},CHILD:function(bV,bX){var bW,b3,bZ,b2,e,bY,b1,b0=bX[1],bU=bV;switch(b0){case"only":case"first":while((bU=bU.previousSibling)){if(bU.nodeType===1){return false}}if(b0==="first"){return true}bU=bV;case"last":while((bU=bU.nextSibling)){if(bU.nodeType===1){return false}}return true;case"nth":bW=bX[2];b3=bX[3];if(bW===1&&b3===0){return true}bZ=bX[0];b2=bV.parentNode;if(b2&&(b2[bF]!==bZ||!bV.nodeIndex)){bY=0;for(bU=b2.firstChild;bU;bU=bU.nextSibling){if(bU.nodeType===1){bU.nodeIndex=++bY}}b2[bF]=bZ}b1=bV.nodeIndex-b3;if(bW===0){return b1===0}else{return(b1%bW===0&&b1/bW>=0)}}},ID:function(bU,e){return bU.nodeType===1&&bU.getAttribute("id")===e},TAG:function(bU,e){return(e==="*"&&bU.nodeType===1)||!!bU.nodeName&&bU.nodeName.toLowerCase()===e},CLASS:function(bU,e){return(" "+(bU.className||bU.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bY,bW){var bV=bW[1],e=bB.attr?bB.attr(bY,bV):bH.attrHandle[bV]?bH.attrHandle[bV](bY):bY[bV]!=null?bY[bV]:bY.getAttribute(bV),bZ=e+"",bX=bW[2],bU=bW[4];return e==null?bX==="!=":!bX&&bB.attr?e!=null:bX==="="?bZ===bU:bX==="*="?bZ.indexOf(bU)>=0:bX==="~="?(" "+bZ+" ").indexOf(bU)>=0:!bU?bZ&&e!==false:bX==="!="?bZ!==bU:bX==="^="?bZ.indexOf(bU)===0:bX==="$="?bZ.substr(bZ.length-bU.length)===bU:bX==="|="?bZ===bU||bZ.substr(0,bU.length+1)===bU+"-":false},POS:function(bX,bU,bV,bY){var e=bU[2],bW=bH.setFilters[e];if(bW){return bW(bX,bV,bU,bY)}}}};var bG=bH.match.POS,bA=function(bU,e){return"\\"+(e-0+1)};for(var bC in bH.match){bH.match[bC]=new RegExp(bH.match[bC].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bH.leftMatch[bC]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bH.match[bC].source.replace(/\\(\d+)/g,bA))}var bI=function(bU,e){bU=Array.prototype.slice.call(bU,0);if(e){e.push.apply(e,bU);return e}return bU};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bS){bI=function(bX,bW){var bV=0,bU=bW||[];if(bO.call(bX)==="[object Array]"){Array.prototype.push.apply(bU,bX)}else{if(typeof bX.length==="number"){for(var e=bX.length;bV<e;bV++){bU.push(bX[bV])}}else{for(;bX[bV];bV++){bU.push(bX[bV])}}}return bU}}var bM,bJ;if(av.documentElement.compareDocumentPosition){bM=function(bU,e){if(bU===e){bE=true;return 0}if(!bU.compareDocumentPosition||!e.compareDocumentPosition){return bU.compareDocumentPosition?-1:1}return bU.compareDocumentPosition(e)&4?-1:1}}else{bM=function(b1,b0){if(b1===b0){bE=true;return 0}else{if(b1.sourceIndex&&b0.sourceIndex){return b1.sourceIndex-b0.sourceIndex}}var bY,bU,bV=[],e=[],bX=b1.parentNode,bZ=b0.parentNode,b2=bX;if(bX===bZ){return bJ(b1,b0)}else{if(!bX){return -1}else{if(!bZ){return 1}}}while(b2){bV.unshift(b2);b2=b2.parentNode}b2=bZ;while(b2){e.unshift(b2);b2=b2.parentNode}bY=bV.length;bU=e.length;for(var bW=0;bW<bY&&bW<bU;bW++){if(bV[bW]!==e[bW]){return bJ(bV[bW],e[bW])}}return bW===bY?bJ(b1,e[bW],-1):bJ(bV[bW],b0,1)};bJ=function(bU,e,bV){if(bU===e){return bV}var bW=bU.nextSibling;while(bW){if(bW===e){return -1}bW=bW.nextSibling}return 1}}(function(){var bU=av.createElement("div"),bV="script"+(new Date()).getTime(),e=av.documentElement;bU.innerHTML="<a name='"+bV+"'/>";e.insertBefore(bU,e.firstChild);if(av.getElementById(bV)){bH.find.ID=function(bX,bY,bZ){if(typeof bY.getElementById!=="undefined"&&!bZ){var bW=bY.getElementById(bX[1]);return bW?bW.id===bX[1]||typeof bW.getAttributeNode!=="undefined"&&bW.getAttributeNode("id").nodeValue===bX[1]?[bW]:M:[]}};bH.filter.ID=function(bY,bW){var bX=typeof bY.getAttributeNode!=="undefined"&&bY.getAttributeNode("id");return bY.nodeType===1&&bX&&bX.nodeValue===bW}}e.removeChild(bU);e=bU=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bH.find.TAG=function(bU,bY){var bX=bY.getElementsByTagName(bU[1]);if(bU[1]==="*"){var bW=[];for(var bV=0;bX[bV];bV++){if(bX[bV].nodeType===1){bW.push(bX[bV])}}bX=bW}return bX}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bH.attrHandle.href=function(bU){return bU.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=bB,bW=av.createElement("div"),bV="__sizzle__";bW.innerHTML="<p class='TEST'></p>";if(bW.querySelectorAll&&bW.querySelectorAll(".TEST").length===0){return}bB=function(b7,bY,b2,b6){bY=bY||av;if(!b6&&!bB.isXML(bY)){var b5=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b7);if(b5&&(bY.nodeType===1||bY.nodeType===9)){if(b5[1]){return bI(bY.getElementsByTagName(b7),b2)}else{if(b5[2]&&bH.find.CLASS&&bY.getElementsByClassName){return bI(bY.getElementsByClassName(b5[2]),b2)}}}if(bY.nodeType===9){if(b7==="body"&&bY.body){return bI([bY.body],b2)}else{if(b5&&b5[3]){var b1=bY.getElementById(b5[3]);if(b1&&b1.parentNode){if(b1.id===b5[3]){return bI([b1],b2)}}else{return bI([],b2)}}}try{return bI(bY.querySelectorAll(b7),b2)}catch(b3){}}else{if(bY.nodeType===1&&bY.nodeName.toLowerCase()!=="object"){var bZ=bY,b0=bY.getAttribute("id"),bX=b0||bV,b9=bY.parentNode,b8=/^\s*[+~]/.test(b7);if(!b0){bY.setAttribute("id",bX)}else{bX=bX.replace(/'/g,"\\$&")}if(b8&&b9){bY=bY.parentNode}try{if(!b8||b9){return bI(bY.querySelectorAll("[id='"+bX+"'] "+b7),b2)}}catch(b4){}finally{if(!b0){bZ.removeAttribute("id")}}}}}return e(b7,bY,b2,b6)};for(var bU in e){bB[bU]=e[bU]}bW=null})()}(function(){var e=av.documentElement,bV=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bV){var bX=!bV.call(av.createElement("div"),"div"),bU=false;try{bV.call(av.documentElement,"[test!='']:sizzle")}catch(bW){bU=true}bB.matchesSelector=function(bZ,b1){b1=b1.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bB.isXML(bZ)){try{if(bU||!bH.match.PSEUDO.test(b1)&&!/!=/.test(b1)){var bY=bV.call(bZ,b1);if(bY||!bX||bZ.document&&bZ.document.nodeType!==11){return bY}}}catch(b0){}}return bB(b1,null,null,[bZ]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bH.order.splice(1,0,"CLASS");bH.find.CLASS=function(bU,bV,bW){if(typeof bV.getElementsByClassName!=="undefined"&&!bW){return bV.getElementsByClassName(bU[1])}};e=null})();function by(bU,bZ,bY,b2,b0,b1){for(var bW=0,bV=b2.length;bW<bV;bW++){var e=b2[bW];if(e){var bX=false;e=e[bU];while(e){if(e[bF]===bY){bX=b2[e.sizset];break}if(e.nodeType===1&&!b1){e[bF]=bY;e.sizset=bW}if(e.nodeName.toLowerCase()===bZ){bX=e;break}e=e[bU]}b2[bW]=bX}}}function bQ(bU,bZ,bY,b2,b0,b1){for(var bW=0,bV=b2.length;bW<bV;bW++){var e=b2[bW];if(e){var bX=false;e=e[bU];while(e){if(e[bF]===bY){bX=b2[e.sizset];break}if(e.nodeType===1){if(!b1){e[bF]=bY;e.sizset=bW}if(typeof bZ!=="string"){if(e===bZ){bX=true;break}}else{if(bB.filter(bZ,[e]).length>0){bX=e;break}}}e=e[bU]}b2[bW]=bX}}}if(av.documentElement.contains){bB.contains=function(bU,e){return bU!==e&&(bU.contains?bU.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){bB.contains=function(bU,e){return !!(bU.compareDocumentPosition(e)&16)}}else{bB.contains=function(){return false}}}bB.isXML=function(e){var bU=(e?e.ownerDocument||e:0).documentElement;return bU?bU.nodeName!=="HTML":false};var bP=function(bV,e,bZ){var bY,b0=[],bX="",b1=e.nodeType?[e]:e;while((bY=bH.match.PSEUDO.exec(bV))){bX+=bY[0];bV=bV.replace(bH.match.PSEUDO,"")}bV=bH.relative[bV]?bV+"*":bV;for(var bW=0,bU=b1.length;bW<bU;bW++){bB(bV,b1[bW],b0,bZ)}return bB.filter(bX,b0)};bB.attr=b.attr;bB.selectors.attrMap={};b.find=bB;b.expr=bB.selectors;b.expr[":"]=b.expr.filters;b.unique=bB.uniqueSort;b.text=bB.getText;b.isXMLDoc=bB.isXML;b.contains=bB.contains})();var ac=/Until$/,aq=/^(?:parents|prevUntil|prevAll)/,bb=/,/,bs=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,I=b.expr.match.POS,ay={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bz=this,bB,by;if(typeof e!=="string"){return b(e).filter(function(){for(bB=0,by=bz.length;bB<by;bB++){if(b.contains(bz[bB],this)){return true}}})}var bA=this.pushStack("","find",e),bD,bE,bC;for(bB=0,by=this.length;bB<by;bB++){bD=bA.length;b.find(e,this[bB],bA);if(bB>0){for(bE=bD;bE<bA.length;bE++){for(bC=0;bC<bD;bC++){if(bA[bC]===bA[bE]){bA.splice(bE--,1);break}}}}}return bA},has:function(by){var e=b(by);return this.filter(function(){for(var bA=0,bz=e.length;bA<bz;bA++){if(b.contains(this,e[bA])){return true}}})},not:function(e){return this.pushStack(aG(this,e,false),"not",e)},filter:function(e){return this.pushStack(aG(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?I.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(bB,bA){var by=[],bz,e,bC=this[0];if(b.isArray(bB)){var bE=1;while(bC&&bC.ownerDocument&&bC!==bA){for(bz=0;bz<bB.length;bz++){if(b(bC).is(bB[bz])){by.push({selector:bB[bz],elem:bC,level:bE})}}bC=bC.parentNode;bE++}return by}var bD=I.test(bB)||typeof bB!=="string"?b(bB,bA||this.context):0;for(bz=0,e=this.length;bz<e;bz++){bC=this[bz];while(bC){if(bD?bD.index(bC)>-1:b.find.matchesSelector(bC,bB)){by.push(bC);break}else{bC=bC.parentNode;if(!bC||!bC.ownerDocument||bC===bA||bC.nodeType===11){break}}}}by=by.length>1?b.unique(by):by;return this.pushStack(by,"closest",bB)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,by){var bA=typeof e==="string"?b(e,by):b.makeArray(e&&e.nodeType?[e]:e),bz=b.merge(this.get(),bA);return this.pushStack(D(bA[0])||D(bz[0])?bz:b.unique(bz))},andSelf:function(){return this.add(this.prevObject)}});function D(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(by){var e=by.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(by,e,bz){return b.dir(by,"parentNode",bz)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(by,e,bz){return b.dir(by,"nextSibling",bz)},prevUntil:function(by,e,bz){return b.dir(by,"previousSibling",bz)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,by){b.fn[e]=function(bC,bz){var bB=b.map(this,by,bC),bA=R.call(arguments);if(!ac.test(e)){bz=bC}if(bz&&typeof bz==="string"){bB=b.filter(bz,bB)}bB=this.length>1&&!ay[e]?b.unique(bB):bB;if((this.length>1||bb.test(bz))&&aq.test(e)){bB=bB.reverse()}return this.pushStack(bB,e,bA.join(","))}});b.extend({filter:function(bz,e,by){if(by){bz=":not("+bz+")"}return e.length===1?b.find.matchesSelector(e[0],bz)?[e[0]]:[]:b.find.matches(bz,e)},dir:function(bz,by,bB){var e=[],bA=bz[by];while(bA&&bA.nodeType!==9&&(bB===M||bA.nodeType!==1||!b(bA).is(bB))){if(bA.nodeType===1){e.push(bA)}bA=bA[by]}return e},nth:function(bB,e,bz,bA){e=e||1;var by=0;for(;bB;bB=bB[bz]){if(bB.nodeType===1&&++by===e){break}}return bB},sibling:function(bz,by){var e=[];for(;bz;bz=bz.nextSibling){if(bz.nodeType===1&&bz!==by){e.push(bz)}}return e}});function aG(bA,bz,e){bz=bz||0;if(b.isFunction(bz)){return b.grep(bA,function(bC,bB){var bD=!!bz.call(bC,bB,bC);return bD===e})}else{if(bz.nodeType){return b.grep(bA,function(bC,bB){return(bC===bz)===e})}else{if(typeof bz==="string"){var by=b.grep(bA,function(bB){return bB.nodeType===1});if(bs.test(bz)){return b.filter(bz,by,!e)}else{bz=b.filter(bz,by)}}}}return b.grep(bA,function(bC,bB){return(b.inArray(bC,bz)>=0)===e})}function a(e){var bz=aS.split(" "),by=e.createDocumentFragment();if(by.createElement){while(bz.length){by.createElement(bz.pop())}}return by}var aS="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",ah=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,x=/<tbody/i,X=/<|&#?\w+;/,af=/<(?:script|style)/i,Q=/<(?:script|object|embed|option|style)/i,ai=new RegExp("<(?:"+aS.replace(" ","|")+")","i"),p=/checked\s*(?:[^=]|=\s*.checked.)/i,bp=/\/(java|ecma)script/i,aO=/^\s*<!(?:\[CDATA\[|\-\-)/,ax={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ad=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bz){var by=b(this);by.text(e.call(this,bz,by.text()))})}if(typeof e!=="object"&&e!==M){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bz){b(this).wrapAll(e.call(this,bz))})}if(this[0]){var by=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){by.insertBefore(this[0])}by.map(function(){var bz=this;while(bz.firstChild&&bz.firstChild.nodeType===1){bz=bz.firstChild}return bz}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(by){b(this).wrapInner(e.call(this,by))})}return this.each(function(){var by=b(this),bz=by.contents();if(bz.length){bz.wrapAll(e)}else{by.append(e)}})},wrap:function(e){return this.each(function(){b(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(by){this.parentNode.insertBefore(by,this)})}else{if(arguments.length){var e=b(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(by){this.parentNode.insertBefore(by,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b(arguments[0]).toArray());return e}}},remove:function(e,bA){for(var by=0,bz;(bz=this[by])!=null;by++){if(!e||b.filter(e,[bz]).length){if(!bA&&bz.nodeType===1){b.cleanData(bz.getElementsByTagName("*"));b.cleanData([bz])}if(bz.parentNode){bz.parentNode.removeChild(bz)}}}return this},empty:function(){for(var e=0,by;(by=this[e])!=null;e++){if(by.nodeType===1){b.cleanData(by.getElementsByTagName("*"))}while(by.firstChild){by.removeChild(by.firstChild)}}return this},clone:function(by,e){by=by==null?false:by;e=e==null?by:e;return this.map(function(){return b.clone(this,by,e)})},html:function(bA){if(bA===M){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ah,""):null}else{if(typeof bA==="string"&&!af.test(bA)&&(b.support.leadingWhitespace||!ar.test(bA))&&!ax[(d.exec(bA)||["",""])[1].toLowerCase()]){bA=bA.replace(T,"<$1></$2>");try{for(var bz=0,by=this.length;bz<by;bz++){if(this[bz].nodeType===1){b.cleanData(this[bz].getElementsByTagName("*"));this[bz].innerHTML=bA}}}catch(bB){this.empty().append(bA)}}else{if(b.isFunction(bA)){this.each(function(bC){var e=b(this);e.html(bA.call(this,bC,e.html()))})}else{this.empty().append(bA)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bA){var bz=b(this),by=bz.html();bz.replaceWith(e.call(this,bA,by))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bz=this.nextSibling,by=this.parentNode;b(this).remove();if(bz){b(bz).before(e)}else{b(by).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bE,bI,bH){var bA,bB,bD,bG,bF=bE[0],by=[];if(!b.support.checkClone&&arguments.length===3&&typeof bF==="string"&&p.test(bF)){return this.each(function(){b(this).domManip(bE,bI,bH,true)})}if(b.isFunction(bF)){return this.each(function(bK){var bJ=b(this);bE[0]=bF.call(this,bK,bI?bJ.html():M);bJ.domManip(bE,bI,bH)})}if(this[0]){bG=bF&&bF.parentNode;if(b.support.parentNode&&bG&&bG.nodeType===11&&bG.childNodes.length===this.length){bA={fragment:bG}}else{bA=b.buildFragment(bE,this,by)}bD=bA.fragment;if(bD.childNodes.length===1){bB=bD=bD.firstChild}else{bB=bD.firstChild}if(bB){bI=bI&&b.nodeName(bB,"tr");for(var bz=0,e=this.length,bC=e-1;bz<e;bz++){bH.call(bI?bc(this[bz],bB):this[bz],bA.cacheable||(e>1&&bz<bC)?b.clone(bD,true,true):bD)}}if(by.length){b.each(by,br)}}return this}});function bc(e,by){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function u(bE,by){if(by.nodeType!==1||!b.hasData(bE)){return}var bB,bA,e,bD=b._data(bE),bC=b._data(by,bD),bz=bD.events;if(bz){delete bC.handle;bC.events={};for(bB in bz){for(bA=0,e=bz[bB].length;bA<e;bA++){b.event.add(by,bB+(bz[bB][bA].namespace?".":"")+bz[bB][bA].namespace,bz[bB][bA],bz[bB][bA].data)}}}if(bC.data){bC.data=b.extend({},bC.data)}}function aj(by,e){var bz;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(by)}bz=e.nodeName.toLowerCase();if(bz==="object"){e.outerHTML=by.outerHTML}else{if(bz==="input"&&(by.type==="checkbox"||by.type==="radio")){if(by.checked){e.defaultChecked=e.checked=by.checked}if(e.value!==by.value){e.value=by.value}}else{if(bz==="option"){e.selected=by.defaultSelected}else{if(bz==="input"||bz==="textarea"){e.defaultValue=by.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bC,bA,by){var bB,e,bz,bD,bE=bC[0];if(bA&&bA[0]){bD=bA[0].ownerDocument||bA[0]}if(!bD.createDocumentFragment){bD=av}if(bC.length===1&&typeof bE==="string"&&bE.length<512&&bD===av&&bE.charAt(0)==="<"&&!Q.test(bE)&&(b.support.checkClone||!p.test(bE))&&(!b.support.unknownElems&&ai.test(bE))){e=true;bz=b.fragments[bE];if(bz&&bz!==1){bB=bz}}if(!bB){bB=bD.createDocumentFragment();b.clean(bC,bD,bB,by)}if(e){b.fragments[bE]=bz?bB:1}return{fragment:bB,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,by){b.fn[e]=function(bz){var bC=[],bF=b(bz),bE=this.length===1&&this[0].parentNode;if(bE&&bE.nodeType===11&&bE.childNodes.length===1&&bF.length===1){bF[by](this[0]);return this}else{for(var bD=0,bA=bF.length;bD<bA;bD++){var bB=(bD>0?this.clone(true):this).get();b(bF[bD])[by](bB);bC=bC.concat(bB)}return this.pushStack(bC,e,bF.selector)}}});function bi(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function F(e){var by=(e.nodeName||"").toLowerCase();if(by==="input"){az(e)}else{if(by!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}b.extend({clone:function(bB,bD,bz){var bC=bB.cloneNode(true),e,by,bA;if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(bB.nodeType===1||bB.nodeType===11)&&!b.isXMLDoc(bB)){aj(bB,bC);e=bi(bB);by=bi(bC);for(bA=0;e[bA];++bA){if(by[bA]){aj(e[bA],by[bA])}}}if(bD){u(bB,bC);if(bz){e=bi(bB);by=bi(bC);for(bA=0;e[bA];++bA){u(e[bA],by[bA])}}}e=by=null;return bC},clean:function(bz,bB,bK,bD){var bI;bB=bB||av;if(typeof bB.createElement==="undefined"){bB=bB.ownerDocument||bB[0]&&bB[0].ownerDocument||av}var bL=[],bE;for(var bH=0,bC;(bC=bz[bH])!=null;bH++){if(typeof bC==="number"){bC+=""}if(!bC){continue}if(typeof bC==="string"){if(!X.test(bC)){bC=bB.createTextNode(bC)}else{bC=bC.replace(T,"<$1></$2>");var bN=(d.exec(bC)||["",""])[1].toLowerCase(),bA=ax[bN]||ax._default,bG=bA[0],by=bB.createElement("div");if(bB===av){ad.appendChild(by)}else{a(bB).appendChild(by)}by.innerHTML=bA[1]+bC+bA[2];while(bG--){by=by.lastChild}if(!b.support.tbody){var e=x.test(bC),bF=bN==="table"&&!e?by.firstChild&&by.firstChild.childNodes:bA[1]==="<table>"&&!e?by.childNodes:[];for(bE=bF.length-1;bE>=0;--bE){if(b.nodeName(bF[bE],"tbody")&&!bF[bE].childNodes.length){bF[bE].parentNode.removeChild(bF[bE])}}}if(!b.support.leadingWhitespace&&ar.test(bC)){by.insertBefore(bB.createTextNode(ar.exec(bC)[0]),by.firstChild)}bC=by.childNodes}}var bJ;if(!b.support.appendChecked){if(bC[0]&&typeof(bJ=bC.length)==="number"){for(bE=0;bE<bJ;bE++){F(bC[bE])}}else{F(bC)}}if(bC.nodeType){bL.push(bC)}else{bL=b.merge(bL,bC)}}if(bK){bI=function(bO){return !bO.type||bp.test(bO.type)};for(bH=0;bL[bH];bH++){if(bD&&b.nodeName(bL[bH],"script")&&(!bL[bH].type||bL[bH].type.toLowerCase()==="text/javascript")){bD.push(bL[bH].parentNode?bL[bH].parentNode.removeChild(bL[bH]):bL[bH])}else{if(bL[bH].nodeType===1){var bM=b.grep(bL[bH].getElementsByTagName("script"),bI);bL.splice.apply(bL,[bH+1,0].concat(bM))}bK.appendChild(bL[bH])}}}return bL},cleanData:function(by){var bB,bz,e=b.cache,bE=b.event.special,bD=b.support.deleteExpando;for(var bC=0,bA;(bA=by[bC])!=null;bC++){if(bA.nodeName&&b.noData[bA.nodeName.toLowerCase()]){continue}bz=bA[b.expando];if(bz){bB=e[bz];if(bB&&bB.events){for(var bF in bB.events){if(bE[bF]){b.event.remove(bA,bF)}else{b.removeEvent(bA,bF,bB.handle)}}if(bB.handle){bB.handle.elem=null}}if(bD){delete bA[b.expando]}else{if(bA.removeAttribute){bA.removeAttribute(b.expando)}}delete e[bz]}}}});function br(e,by){if(by.src){b.ajax({url:by.src,async:false,dataType:"script"})}else{b.globalEval((by.text||by.textContent||by.innerHTML||"").replace(aO,"/*$0*/"))}if(by.parentNode){by.parentNode.removeChild(by)}}var al=/alpha\([^)]*\)/i,au=/opacity=([^)]*)/,A=/([A-Z]|^ms)/g,be=/^-?\d+(?:px)?$/i,bq=/^-?\d/,J=/^([\-+])=([\-+.\de]+)/,a9={position:"absolute",visibility:"hidden",display:"block"},an=["Left","Right"],a3=["Top","Bottom"],aa,aJ,aY;b.fn.css=function(e,by){if(arguments.length===2&&by===M){return this}return b.access(this,e,by,true,function(bA,bz,bB){return bB!==M?b.style(bA,bz,bB):b.css(bA,bz)})};b.extend({cssHooks:{opacity:{get:function(bz,by){if(by){var e=aa(bz,"opacity","opacity");return e===""?"1":e}else{return bz.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bA,bz,bG,bB){if(!bA||bA.nodeType===3||bA.nodeType===8||!bA.style){return}var bE,bF,bC=b.camelCase(bz),by=bA.style,bH=b.cssHooks[bC];bz=b.cssProps[bC]||bC;if(bG!==M){bF=typeof bG;if(bF==="string"&&(bE=J.exec(bG))){bG=(+(bE[1]+1)*+bE[2])+parseFloat(b.css(bA,bz));bF="number"}if(bG==null||bF==="number"&&isNaN(bG)){return}if(bF==="number"&&!b.cssNumber[bC]){bG+="px"}if(!bH||!("set" in bH)||(bG=bH.set(bA,bG))!==M){try{by[bz]=bG}catch(bD){}}}else{if(bH&&"get" in bH&&(bE=bH.get(bA,false,bB))!==M){return bE}return by[bz]}},css:function(bB,bA,by){var bz,e;bA=b.camelCase(bA);e=b.cssHooks[bA];bA=b.cssProps[bA]||bA;if(bA==="cssFloat"){bA="float"}if(e&&"get" in e&&(bz=e.get(bB,true,by))!==M){return bz}else{if(aa){return aa(bB,bA)}}},swap:function(bA,bz,bB){var e={};for(var by in bz){e[by]=bA.style[by];bA.style[by]=bz[by]}bB.call(bA);for(by in bz){bA.style[by]=e[by]}}});b.curCSS=b.css;b.each(["height","width"],function(by,e){b.cssHooks[e]={get:function(bB,bA,bz){var bC;if(bA){if(bB.offsetWidth!==0){return q(bB,e,bz)}else{b.swap(bB,a9,function(){bC=q(bB,e,bz)})}return bC}},set:function(bz,bA){if(be.test(bA)){bA=parseFloat(bA);if(bA>=0){return bA+"px"}}else{return bA}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(by,e){return au.test((e&&by.currentStyle?by.currentStyle.filter:by.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(bB,bC){var bA=bB.style,by=bB.currentStyle,e=b.isNumeric(bC)?"alpha(opacity="+bC*100+")":"",bz=by&&by.filter||bA.filter||"";bA.zoom=1;if(bC>=1&&b.trim(bz.replace(al,""))===""){bA.removeAttribute("filter");if(by&&!by.filter){return}}bA.filter=al.test(bz)?bz.replace(al,e):bz+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bz,by){var e;b.swap(bz,{display:"inline-block"},function(){if(by){e=aa(bz,"margin-right","marginRight")}else{e=bz.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aJ=function(bB,bz){var by,bA,e;bz=bz.replace(A,"-$1").toLowerCase();if(!(bA=bB.ownerDocument.defaultView)){return M}if((e=bA.getComputedStyle(bB,null))){by=e.getPropertyValue(bz);if(by===""&&!b.contains(bB.ownerDocument.documentElement,bB)){by=b.style(bB,bz)}}return by}}if(av.documentElement.currentStyle){aY=function(bC,bz){var bD,e,bB,by=bC.currentStyle&&bC.currentStyle[bz],bA=bC.style;if(by===null&&bA&&(bB=bA[bz])){by=bB}if(!be.test(by)&&bq.test(by)){bD=bA.left;e=bC.runtimeStyle&&bC.runtimeStyle.left;if(e){bC.runtimeStyle.left=bC.currentStyle.left}bA.left=bz==="fontSize"?"1em":(by||0);by=bA.pixelLeft+"px";bA.left=bD;if(e){bC.runtimeStyle.left=e}}return by===""?"auto":by}}aa=aJ||aY;function q(bz,by,e){var bB=by==="width"?bz.offsetWidth:bz.offsetHeight,bA=by==="width"?an:a3;if(bB>0){if(e!=="border"){b.each(bA,function(){if(!e){bB-=parseFloat(b.css(bz,"padding"+this))||0}if(e==="margin"){bB+=parseFloat(b.css(bz,e+this))||0}else{bB-=parseFloat(b.css(bz,"border"+this+"Width"))||0}})}return bB+"px"}bB=aa(bz,by,by);if(bB<0||bB==null){bB=bz.style[by]||0}bB=parseFloat(bB)||0;if(e){b.each(bA,function(){bB+=parseFloat(b.css(bz,"padding"+this))||0;if(e!=="padding"){bB+=parseFloat(b.css(bz,"border"+this+"Width"))||0}if(e==="margin"){bB+=parseFloat(b.css(bz,e+this))||0}})}return bB+"px"}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bz){var by=bz.offsetWidth,e=bz.offsetHeight;return(by===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bz.style&&bz.style.display)||b.css(bz,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var l=/%20/g,ap=/\[\]$/,bv=/\r?\n/g,bt=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,a0=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aN=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aR=/^(?:GET|HEAD)$/,c=/^\/\//,N=/\?/,a8=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,r=/^(?:select|textarea)/i,h=/\s+/,bu=/([?&])_=[^&]*/,L=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,B=b.fn.load,ab={},s={},aE,t,aW=["*/"]+["*"];try{aE=bo.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}t=L.exec(aE.toLowerCase())||[];function f(e){return function(bB,bD){if(typeof bB!=="string"){bD=bB;bB="*"}if(b.isFunction(bD)){var bA=bB.toLowerCase().split(h),bz=0,bC=bA.length,by,bE,bF;for(;bz<bC;bz++){by=bA[bz];bF=/^\+/.test(by);if(bF){by=by.substr(1)||"*"}bE=e[by]=e[by]||[];bE[bF?"unshift":"push"](bD)}}}}function aX(by,bH,bC,bG,bE,bA){bE=bE||bH.dataTypes[0];bA=bA||{};bA[bE]=true;var bD=by[bE],bz=0,e=bD?bD.length:0,bB=(by===ab),bF;for(;bz<e&&(bB||!bF);bz++){bF=bD[bz](bH,bC,bG);if(typeof bF==="string"){if(!bB||bA[bF]){bF=M}else{bH.dataTypes.unshift(bF);bF=aX(by,bH,bC,bG,bF,bA)}}}if((bB||!bF)&&!bA["*"]){bF=aX(by,bH,bC,bG,"*",bA)}return bF}function am(bz,bA){var by,e,bB=b.ajaxSettings.flatOptions||{};for(by in bA){if(bA[by]!==M){(bB[by]?bz:(e||(e={})))[by]=bA[by]}}if(e){b.extend(true,bz,e)}}b.fn.extend({load:function(bz,bC,bD){if(typeof bz!=="string"&&B){return B.apply(this,arguments)}else{if(!this.length){return this}}var bB=bz.indexOf(" ");if(bB>=0){var e=bz.slice(bB,bz.length);bz=bz.slice(0,bB)}var bA="GET";if(bC){if(b.isFunction(bC)){bD=bC;bC=M}else{if(typeof bC==="object"){bC=b.param(bC,b.ajaxSettings.traditional);bA="POST"}}}var by=this;b.ajax({url:bz,type:bA,dataType:"html",data:bC,complete:function(bF,bE,bG){bG=bF.responseText;if(bF.isResolved()){bF.done(function(bH){bG=bH});by.html(e?b("<div>").append(bG.replace(a8,"")).find(e):bG)}if(bD){by.each(bD,[bG,bE,bF])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||r.test(this.nodeName)||a0.test(this.type))}).map(function(e,by){var bz=b(this).val();return bz==null?null:b.isArray(bz)?b.map(bz,function(bB,bA){return{name:by.name,value:bB.replace(bv,"\r\n")}}):{name:by.name,value:bz.replace(bv,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,by){b.fn[by]=function(bz){return this.bind(by,bz)}});b.each(["get","post"],function(e,by){b[by]=function(bz,bB,bC,bA){if(b.isFunction(bB)){bA=bA||bC;bC=bB;bB=M}return b.ajax({type:by,url:bz,data:bB,success:bC,dataType:bA})}});b.extend({getScript:function(e,by){return b.get(e,M,by,"script")},getJSON:function(e,by,bz){return b.get(e,by,bz,"json")},ajaxSetup:function(by,e){if(e){am(by,b.ajaxSettings)}else{e=by;by=b.ajaxSettings}am(by,e);return by},ajaxSettings:{url:aE,isLocal:aN.test(t[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bd.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(ab),ajaxTransport:f(s),ajax:function(bC,bA){if(typeof bC==="object"){bA=bC;bC=M}bA=bA||{};var bG=b.ajaxSetup({},bA),bV=bG.context||bG,bJ=bV!==bG&&(bV.nodeType||bV instanceof b)?b(bV):b.event,bU=b.Deferred(),bQ=b.Callbacks("once memory"),bE=bG.statusCode||{},bF,bK={},bR={},bT,bB,bO,bH,bL,bD=0,bz,bN,bM={readyState:0,setRequestHeader:function(bW,bX){if(!bD){var e=bW.toLowerCase();bW=bR[e]=bR[e]||bW;bK[bW]=bX}return this},getAllResponseHeaders:function(){return bD===2?bT:null},getResponseHeader:function(bW){var e;if(bD===2){if(!bB){bB={};while((e=aD.exec(bT))){bB[e[1].toLowerCase()]=e[2]}}e=bB[bW.toLowerCase()]}return e===M?null:e},overrideMimeType:function(e){if(!bD){bG.mimeType=e}return this},abort:function(e){e=e||"abort";if(bO){bO.abort(e)}bI(0,e);return this}};function bI(b2,bX,b3,bZ){if(bD===2){return}bD=2;if(bH){clearTimeout(bH)}bO=M;bT=bZ||"";bM.readyState=b2>0?4:0;var bW,b7,b6,b0=bX,b1=b3?bm(bG,bM,b3):M,bY,b5;if(b2>=200&&b2<300||b2===304){if(bG.ifModified){if((bY=bM.getResponseHeader("Last-Modified"))){b.lastModified[bF]=bY}if((b5=bM.getResponseHeader("Etag"))){b.etag[bF]=b5}}if(b2===304){b0="notmodified";bW=true}else{try{b7=H(bG,b1);b0="success";bW=true}catch(b4){b0="parsererror";b6=b4}}}else{b6=b0;if(!b0||b2){b0="error";if(b2<0){b2=0}}}bM.status=b2;bM.statusText=""+(bX||b0);if(bW){bU.resolveWith(bV,[b7,b0,bM])}else{bU.rejectWith(bV,[bM,b0,b6])}bM.statusCode(bE);bE=M;if(bz){bJ.trigger("ajax"+(bW?"Success":"Error"),[bM,bG,bW?b7:b6])}bQ.fireWith(bV,[bM,b0]);if(bz){bJ.trigger("ajaxComplete",[bM,bG]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bU.promise(bM);bM.success=bM.done;bM.error=bM.fail;bM.complete=bQ.add;bM.statusCode=function(bW){if(bW){var e;if(bD<2){for(e in bW){bE[e]=[bE[e],bW[e]]}}else{e=bW[bM.status];bM.then(e,e)}}return this};bG.url=((bC||bG.url)+"").replace(bt,"").replace(c,t[1]+"//");bG.dataTypes=b.trim(bG.dataType||"*").toLowerCase().split(h);if(bG.crossDomain==null){bL=L.exec(bG.url.toLowerCase());bG.crossDomain=!!(bL&&(bL[1]!=t[1]||bL[2]!=t[2]||(bL[3]||(bL[1]==="http:"?80:443))!=(t[3]||(t[1]==="http:"?80:443))))}if(bG.data&&bG.processData&&typeof bG.data!=="string"){bG.data=b.param(bG.data,bG.traditional)}aX(ab,bG,bA,bM);if(bD===2){return false}bz=bG.global;bG.type=bG.type.toUpperCase();bG.hasContent=!aR.test(bG.type);if(bz&&b.active++===0){b.event.trigger("ajaxStart")}if(!bG.hasContent){if(bG.data){bG.url+=(N.test(bG.url)?"&":"?")+bG.data;delete bG.data}bF=bG.url;if(bG.cache===false){var by=b.now(),bS=bG.url.replace(bu,"$1_="+by);bG.url=bS+((bS===bG.url)?(N.test(bG.url)?"&":"?")+"_="+by:"")}}if(bG.data&&bG.hasContent&&bG.contentType!==false||bA.contentType){bM.setRequestHeader("Content-Type",bG.contentType)}if(bG.ifModified){bF=bF||bG.url;if(b.lastModified[bF]){bM.setRequestHeader("If-Modified-Since",b.lastModified[bF])}if(b.etag[bF]){bM.setRequestHeader("If-None-Match",b.etag[bF])}}bM.setRequestHeader("Accept",bG.dataTypes[0]&&bG.accepts[bG.dataTypes[0]]?bG.accepts[bG.dataTypes[0]]+(bG.dataTypes[0]!=="*"?", "+aW+"; q=0.01":""):bG.accepts["*"]);for(bN in bG.headers){bM.setRequestHeader(bN,bG.headers[bN])}if(bG.beforeSend&&(bG.beforeSend.call(bV,bM,bG)===false||bD===2)){bM.abort();return false}for(bN in {success:1,error:1,complete:1}){bM[bN](bG[bN])}bO=aX(s,bG,bA,bM);if(!bO){bI(-1,"No Transport")}else{bM.readyState=1;if(bz){bJ.trigger("ajaxSend",[bM,bG])}if(bG.async&&bG.timeout>0){bH=setTimeout(function(){bM.abort("timeout")},bG.timeout)}try{bD=1;bO.send(bK,bI)}catch(bP){if(bD<2){bI(-1,bP)}else{b.error(bP)}}}return bM},param:function(e,bz){var by=[],bB=function(bC,bD){bD=b.isFunction(bD)?bD():bD;by[by.length]=encodeURIComponent(bC)+"="+encodeURIComponent(bD)};if(bz===M){bz=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){bB(this.name,this.value)})}else{for(var bA in e){w(bA,e[bA],bz,bB)}}return by.join("&").replace(l,"+")}});function w(bz,bB,by,bA){if(b.isArray(bB)){b.each(bB,function(bD,bC){if(by||ap.test(bz)){bA(bz,bC)}else{w(bz+"["+(typeof bC==="object"||b.isArray(bC)?bD:"")+"]",bC,by,bA)}})}else{if(!by&&bB!=null&&typeof bB==="object"){for(var e in bB){w(bz+"["+e+"]",bB[e],by,bA)}}else{bA(bz,bB)}}}b.extend({active:0,lastModified:{},etag:{}});function bm(bG,bF,bC){var by=bG.contents,bE=bG.dataTypes,bz=bG.responseFields,bB,bD,bA,e;for(bD in bz){if(bD in bC){bF[bz[bD]]=bC[bD]}}while(bE[0]==="*"){bE.shift();if(bB===M){bB=bG.mimeType||bF.getResponseHeader("content-type")}}if(bB){for(bD in by){if(by[bD]&&by[bD].test(bB)){bE.unshift(bD);break}}}if(bE[0] in bC){bA=bE[0]}else{for(bD in bC){if(!bE[0]||bG.converters[bD+" "+bE[0]]){bA=bD;break}if(!e){e=bD}}bA=bA||e}if(bA){if(bA!==bE[0]){bE.unshift(bA)}return bC[bA]}}function H(bK,bC){if(bK.dataFilter){bC=bK.dataFilter(bC,bK.dataType)}var bG=bK.dataTypes,bJ={},bD,bH,bz=bG.length,bE,bF=bG[0],bA,bB,bI,by,e;for(bD=1;bD<bz;bD++){if(bD===1){for(bH in bK.converters){if(typeof bH==="string"){bJ[bH.toLowerCase()]=bK.converters[bH]}}}bA=bF;bF=bG[bD];if(bF==="*"){bF=bA}else{if(bA!=="*"&&bA!==bF){bB=bA+" "+bF;bI=bJ[bB]||bJ["* "+bF];if(!bI){e=M;for(by in bJ){bE=by.split(" ");if(bE[0]===bA||bE[0]==="*"){e=bJ[bE[1]+" "+bF];if(e){by=bJ[by];if(by===true){bI=e}else{if(e===true){bI=by}}break}}}}if(!(bI||e)){b.error("No conversion from "+bB.replace(" "," to "))}if(bI!==true){bC=bI?bI(bC):e(by(bC))}}}}return bC}var aC=b.now(),v=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(aC++)}});b.ajaxPrefilter("json jsonp",function(bG,bD,bF){var bA=bG.contentType==="application/x-www-form-urlencoded"&&(typeof bG.data==="string");if(bG.dataTypes[0]==="jsonp"||bG.jsonp!==false&&(v.test(bG.url)||bA&&v.test(bG.data))){var bE,bz=bG.jsonpCallback=b.isFunction(bG.jsonpCallback)?bG.jsonpCallback():bG.jsonpCallback,bC=bd[bz],e=bG.url,bB=bG.data,by="$1"+bz+"$2";if(bG.jsonp!==false){e=e.replace(v,by);if(bG.url===e){if(bA){bB=bB.replace(v,by)}if(bG.data===bB){e+=(/\?/.test(e)?"&":"?")+bG.jsonp+"="+bz}}}bG.url=e;bG.data=bB;bd[bz]=function(bH){bE=[bH]};bF.always(function(){bd[bz]=bC;if(bE&&b.isFunction(bC)){bd[bz](bE[0])}});bG.converters["script json"]=function(){if(!bE){b.error(bz+" was not called")}return bE[0]};bG.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===M){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bz){if(bz.crossDomain){var e,by=av.head||av.getElementsByTagName("head")[0]||av.documentElement;return{send:function(bA,bB){e=av.createElement("script");e.async="async";if(bz.scriptCharset){e.charset=bz.scriptCharset}e.src=bz.url;e.onload=e.onreadystatechange=function(bD,bC){if(bC||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(by&&e.parentNode){by.removeChild(e)}e=M;if(!bC){bB(200,"success")}}};by.insertBefore(e,by.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var C=bd.ActiveXObject?function(){for(var e in O){O[e](0,1)}}:false,z=0,O;function aM(){try{return new bd.XMLHttpRequest()}catch(by){}}function ak(){try{return new bd.ActiveXObject("Microsoft.XMLHTTP")}catch(by){}}b.ajaxSettings.xhr=bd.ActiveXObject?function(){return !this.isLocal&&aM()||ak()}:aM;(function(e){b.extend(b.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(b.ajaxSettings.xhr());if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var by;return{send:function(bE,bz){var bD=e.xhr(),bC,bB;if(e.username){bD.open(e.type,e.url,e.async,e.username,e.password)}else{bD.open(e.type,e.url,e.async)}if(e.xhrFields){for(bB in e.xhrFields){bD[bB]=e.xhrFields[bB]}}if(e.mimeType&&bD.overrideMimeType){bD.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bE["X-Requested-With"]){bE["X-Requested-With"]="XMLHttpRequest"}try{for(bB in bE){bD.setRequestHeader(bB,bE[bB])}}catch(bA){}bD.send((e.hasContent&&e.data)||null);by=function(bN,bH){var bI,bG,bF,bL,bK;try{if(by&&(bH||bD.readyState===4)){by=M;if(bC){bD.onreadystatechange=b.noop;if(C){delete O[bC]}}if(bH){if(bD.readyState!==4){bD.abort()}}else{bI=bD.status;bF=bD.getAllResponseHeaders();bL={};bK=bD.responseXML;if(bK&&bK.documentElement){bL.xml=bK}bL.text=bD.responseText;try{bG=bD.statusText}catch(bM){bG=""}if(!bI&&e.isLocal&&!e.crossDomain){bI=bL.text?200:404}else{if(bI===1223){bI=204}}}}}catch(bJ){if(!bH){bz(-1,bJ)}}if(bL){bz(bI,bG,bL,bF)}};if(!e.async||bD.readyState===4){by()}else{bC=++z;if(C){if(!O){O={};b(bd).unload(C)}O[bC]=by}bD.onreadystatechange=by}},abort:function(){if(by){by(0,1)}}}}})}var S={},ba,n,aB=/^(?:toggle|show|hide)$/,aU=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,a5,aI=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a6;b.fn.extend({show:function(bA,bD,bC){var bz,bB;if(bA||bA===0){return this.animate(a2("show",3),bA,bD,bC)}else{for(var by=0,e=this.length;by<e;by++){bz=this[by];if(bz.style){bB=bz.style.display;if(!b._data(bz,"olddisplay")&&bB==="none"){bB=bz.style.display=""}if(bB===""&&b.css(bz,"display")==="none"){b._data(bz,"olddisplay",y(bz.nodeName))}}}for(by=0;by<e;by++){bz=this[by];if(bz.style){bB=bz.style.display;if(bB===""||bB==="none"){bz.style.display=b._data(bz,"olddisplay")||""}}}return this}},hide:function(bA,bD,bC){if(bA||bA===0){return this.animate(a2("hide",3),bA,bD,bC)}else{var bz,bB,by=0,e=this.length;for(;by<e;by++){bz=this[by];if(bz.style){bB=b.css(bz,"display");if(bB!=="none"&&!b._data(bz,"olddisplay")){b._data(bz,"olddisplay",bB)}}}for(by=0;by<e;by++){if(this[by].style){this[by].style.display="none"}}return this}},_toggle:b.fn.toggle,toggle:function(bz,by,bA){var e=typeof bz==="boolean";if(b.isFunction(bz)&&b.isFunction(by)){this._toggle.apply(this,arguments)}else{if(bz==null||e){this.each(function(){var bB=e?bz:b(this).is(":hidden");b(this)[bB?"show":"hide"]()})}else{this.animate(a2("toggle",3),bz,by,bA)}}return this},fadeTo:function(e,bA,bz,by){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bA},e,bz,by)},animate:function(bC,bz,bB,bA){var e=b.speed(bz,bB,bA);if(b.isEmptyObject(bC)){return this.each(e.complete,[false])}bC=b.extend({},bC);function by(){if(e.queue===false){b._mark(this)}var bH=b.extend({},e),bN=this.nodeType===1,bL=bN&&b(this).is(":hidden"),bE,bI,bG,bM,bK,bF,bJ,bO,bD;bH.animatedProperties={};for(bG in bC){bE=b.camelCase(bG);if(bG!==bE){bC[bE]=bC[bG];delete bC[bG]}bI=bC[bE];if(b.isArray(bI)){bH.animatedProperties[bE]=bI[1];bI=bC[bE]=bI[0]}else{bH.animatedProperties[bE]=bH.specialEasing&&bH.specialEasing[bE]||bH.easing||"swing"}if(bI==="hide"&&bL||bI==="show"&&!bL){return bH.complete.call(this)}if(bN&&(bE==="height"||bE==="width")){bH.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout||y(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.zoom=1}}}}if(bH.overflow!=null){this.style.overflow="hidden"}for(bG in bC){bM=new b.fx(this,bH,bG);bI=bC[bG];if(aB.test(bI)){bD=b._data(this,"toggle"+bG)||(bI==="toggle"?bL?"show":"hide":0);if(bD){b._data(this,"toggle"+bG,bD==="show"?"hide":"show");bM[bD]()}else{bM[bI]()}}else{bK=aU.exec(bI);bF=bM.cur();if(bK){bJ=parseFloat(bK[2]);bO=bK[3]||(b.cssNumber[bG]?"":"px");if(bO!=="px"){b.style(this,bG,(bJ||1)+bO);bF=((bJ||1)/bM.cur())*bF;b.style(this,bG,bF+bO)}if(bK[1]){bJ=((bK[1]==="-="?-1:1)*bJ)+bF}bM.custom(bF,bJ,bO)}else{bM.custom(bF,bI,"")}}}return true}return e.queue===false?this.each(by):this.queue(e.queue,by)},stop:function(bz,by,e){if(typeof bz!=="string"){e=by;by=bz;bz=M}if(by&&bz!==false){this.queue(bz||"fx",[])}return this.each(function(){var bB,bA=false,bD=b.timers,bC=b._data(this);if(!e){b._unmark(true,this)}function bE(bH,bI,bG){var bF=bI[bG];b.removeData(bH,bG,true);bF.stop(e)}if(bz==null){for(bB in bC){if(bC[bB].stop&&bB.indexOf(".run")===bB.length-4){bE(this,bC,bB)}}}else{if(bC[bB=bz+".run"]&&bC[bB].stop){bE(this,bC,bB)}}for(bB=bD.length;bB--;){if(bD[bB].elem===this&&(bz==null||bD[bB].queue===bz)){if(e){bD[bB](true)}else{bD[bB].saveState()}bA=true;bD.splice(bB,1)}}if(!(e&&bA)){b.dequeue(this,bz)}})}});function bj(){setTimeout(at,0);return(a6=b.now())}function at(){a6=M}function a2(by,e){var bz={};b.each(aI.concat.apply([],aI.slice(0,e)),function(){bz[this]=by});return bz}b.each({slideDown:a2("show",1),slideUp:a2("hide",1),slideToggle:a2("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,by){b.fn[e]=function(bz,bB,bA){return this.animate(by,bz,bB,bA)}});b.extend({speed:function(bz,bA,by){var e=bz&&typeof bz==="object"?b.extend({},bz):{complete:by||!by&&bA||b.isFunction(bz)&&bz,duration:bz,easing:by&&bA||bA&&!b.isFunction(bA)&&bA};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(bB){if(b.isFunction(e.old)){e.old.call(this)}if(e.queue){b.dequeue(this,e.queue)}else{if(bB!==false){b._unmark(this)}}};return e},easing:{linear:function(bz,bA,e,by){return e+by*bz},swing:function(bz,bA,e,by){return((-Math.cos(bz*Math.PI)/2)+0.5)*by+e}},timers:[],fx:function(by,e,bz){this.options=e;this.elem=by;this.prop=bz;e.orig=e.orig||{}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,by=b.css(this.elem,this.prop);return isNaN(e=parseFloat(by))?!by||by==="auto"?0:by:e},custom:function(bC,bB,bA){var e=this,bz=b.fx;this.startTime=a6||bj();this.end=bB;this.now=this.start=bC;this.pos=this.state=0;this.unit=bA||this.unit||(b.cssNumber[this.prop]?"":"px");function by(bD){return e.step(bD)}by.queue=this.options.queue;by.elem=this.elem;by.saveState=function(){if(e.options.hide&&b._data(e.elem,"fxshow"+e.prop)===M){b._data(e.elem,"fxshow"+e.prop,e.start)}};if(by()&&b.timers.push(by)&&!a5){a5=setInterval(bz.tick,bz.interval)}},show:function(){var e=b._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||b.style(this.elem,this.prop);this.options.show=true;if(e!==M){this.custom(this.cur(),e)}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur())}b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b._data(this.elem,"fxshow"+this.prop)||b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(bB){var bD,bE,by,bA=a6||bj(),e=true,bC=this.elem,bz=this.options;if(bB||bA>=bz.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bz.animatedProperties[this.prop]=true;for(bD in bz.animatedProperties){if(bz.animatedProperties[bD]!==true){e=false}}if(e){if(bz.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bF,bG){bC.style["overflow"+bG]=bz.overflow[bF]})}if(bz.hide){b(bC).hide()}if(bz.hide||bz.show){for(bD in bz.animatedProperties){b.style(bC,bD,bz.orig[bD]);b.removeData(bC,"fxshow"+bD,true);b.removeData(bC,"toggle"+bD,true)}}by=bz.complete;if(by){bz.complete=false;by.call(bC)}}return false}else{if(bz.duration==Infinity){this.now=bA}else{bE=bA-this.startTime;this.state=bE/bz.duration;this.pos=b.easing[bz.animatedProperties[this.prop]](this.state,bE,0,1,bz.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bz,by=b.timers,e=0;for(;e<by.length;e++){bz=by[e];if(!bz()&&by[e]===bz){by.splice(e--,1)}}if(!by.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(a5);a5=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=e.now+e.unit}else{e.elem[e.prop]=e.now}}}});b.each(["width","height"],function(e,by){b.fx.step[by]=function(bz){b.style(bz.elem,by,Math.max(0,bz.now))}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(by){return e===by.elem}).length}}function y(bA){if(!S[bA]){var e=av.body,by=b("<"+bA+">").appendTo(e),bz=by.css("display");by.remove();if(bz==="none"||bz===""){if(!ba){ba=av.createElement("iframe");ba.frameBorder=ba.width=ba.height=0}e.appendChild(ba);if(!n||!ba.createElement){n=(ba.contentWindow||ba.contentDocument).document;n.write((av.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");n.close()}by=n.createElement(bA);n.body.appendChild(by);bz=b.css(by,"display");e.removeChild(ba)}S[bA]=bz}return S[bA]}var W=/^t(?:able|d|h)$/i,ae=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bL){var bB=this[0],bE;if(bL){return this.each(function(e){b.offset.setOffset(this,bL,e)})}if(!bB||!bB.ownerDocument){return null}if(bB===bB.ownerDocument.body){return b.offset.bodyOffset(bB)}try{bE=bB.getBoundingClientRect()}catch(bI){}var bK=bB.ownerDocument,bz=bK.documentElement;if(!bE||!b.contains(bz,bB)){return bE?{top:bE.top,left:bE.left}:{top:0,left:0}}var bF=bK.body,bG=aL(bK),bD=bz.clientTop||bF.clientTop||0,bH=bz.clientLeft||bF.clientLeft||0,by=bG.pageYOffset||b.support.boxModel&&bz.scrollTop||bF.scrollTop,bC=bG.pageXOffset||b.support.boxModel&&bz.scrollLeft||bF.scrollLeft,bJ=bE.top+by-bD,bA=bE.left+bC-bH;return{top:bJ,left:bA}}}else{b.fn.offset=function(bI){var bC=this[0];if(bI){return this.each(function(bJ){b.offset.setOffset(this,bI,bJ)})}if(!bC||!bC.ownerDocument){return null}if(bC===bC.ownerDocument.body){return b.offset.bodyOffset(bC)}var bF,bz=bC.offsetParent,by=bC,bH=bC.ownerDocument,bA=bH.documentElement,bD=bH.body,bE=bH.defaultView,e=bE?bE.getComputedStyle(bC,null):bC.currentStyle,bG=bC.offsetTop,bB=bC.offsetLeft;while((bC=bC.parentNode)&&bC!==bD&&bC!==bA){if(b.support.fixedPosition&&e.position==="fixed"){break}bF=bE?bE.getComputedStyle(bC,null):bC.currentStyle;bG-=bC.scrollTop;bB-=bC.scrollLeft;if(bC===bz){bG+=bC.offsetTop;bB+=bC.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&W.test(bC.nodeName))){bG+=parseFloat(bF.borderTopWidth)||0;bB+=parseFloat(bF.borderLeftWidth)||0}by=bz;bz=bC.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bF.overflow!=="visible"){bG+=parseFloat(bF.borderTopWidth)||0;bB+=parseFloat(bF.borderLeftWidth)||0}e=bF}if(e.position==="relative"||e.position==="static"){bG+=bD.offsetTop;bB+=bD.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bG+=Math.max(bA.scrollTop,bD.scrollTop);bB+=Math.max(bA.scrollLeft,bD.scrollLeft)}return{top:bG,left:bB}}}b.offset={bodyOffset:function(e){var bz=e.offsetTop,by=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bz+=parseFloat(b.css(e,"marginTop"))||0;by+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bz,left:by}},setOffset:function(bA,bJ,bD){var bE=b.css(bA,"position");if(bE==="static"){bA.style.position="relative"}var bC=b(bA),by=bC.offset(),e=b.css(bA,"top"),bH=b.css(bA,"left"),bI=(bE==="absolute"||bE==="fixed")&&b.inArray("auto",[e,bH])>-1,bG={},bF={},bz,bB;if(bI){bF=bC.position();bz=bF.top;bB=bF.left}else{bz=parseFloat(e)||0;bB=parseFloat(bH)||0}if(b.isFunction(bJ)){bJ=bJ.call(bA,bD,by)}if(bJ.top!=null){bG.top=(bJ.top-by.top)+bz}if(bJ.left!=null){bG.left=(bJ.left-by.left)+bB}if("using" in bJ){bJ.using.call(bA,bG)}else{bC.css(bG)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bz=this[0],by=this.offsetParent(),bA=this.offset(),e=ae.test(by[0].nodeName)?{top:0,left:0}:by.offset();bA.top-=parseFloat(b.css(bz,"marginTop"))||0;bA.left-=parseFloat(b.css(bz,"marginLeft"))||0;e.top+=parseFloat(b.css(by[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(by[0],"borderLeftWidth"))||0;return{top:bA.top-e.top,left:bA.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ae.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(by,e){var bz="scroll"+e;b.fn[bz]=function(bC){var bA,bB;if(bC===M){bA=this[0];if(!bA){return null}bB=aL(bA);return bB?("pageXOffset" in bB)?bB[by?"pageYOffset":"pageXOffset"]:b.support.boxModel&&bB.document.documentElement[bz]||bB.document.body[bz]:bA[bz]}return this.each(function(){bB=aL(this);if(bB){bB.scrollTo(!by?bC:b(bB).scrollLeft(),by?bC:b(bB).scrollTop())}else{this[bz]=bC}})}});function aL(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(by,e){var bz=e.toLowerCase();b.fn["inner"+e]=function(){var bA=this[0];return bA?bA.style?parseFloat(b.css(bA,bz,"padding")):this[bz]():null};b.fn["outer"+e]=function(bB){var bA=this[0];return bA?bA.style?parseFloat(b.css(bA,bz,bB?"margin":"border")):this[bz]():null};b.fn[bz]=function(bC){var bD=this[0];if(!bD){return bC==null?null:this}if(b.isFunction(bC)){return this.each(function(bH){var bG=b(this);bG[bz](bC.call(this,bH,bG[bz]()))})}if(b.isWindow(bD)){var bE=bD.document.documentElement["client"+e],bA=bD.document.body;return bD.document.compatMode==="CSS1Compat"&&bE||bA&&bA["client"+e]||bE}else{if(bD.nodeType===9){return Math.max(bD.documentElement["client"+e],bD.body["scroll"+e],bD.documentElement["scroll"+e],bD.body["offset"+e],bD.documentElement["offset"+e])}else{if(bC===M){var bF=b.css(bD,bz),bB=parseFloat(bF);return b.isNumeric(bB)?bB:bF}else{return this.css(bz,typeof bC==="string"?bC:bC+"px")}}}}});bd.jQuery=bd.$=b})(window);jQuery.fn.center=function(b){var a={vertical:true,horizontal:true};op=jQuery.extend(a,b);return this.each(function(){var n=jQuery(this);var c=n.width();var o=n.height();var p=parseInt(n.css("padding-top"));var d=parseInt(n.css("padding-bottom"));var e=parseInt(n.css("border-top-width"));var m=parseInt(n.css("border-bottom-width"));var h=(e+m)/2;var k=(p+d)/2;var j=n.parent().css("position");var g=(c/2)*(-1);var l=((o/2)*(-1))-k-h;var f={position:"absolute"};if(op.vertical){f.height=o;f.top="50%";f.marginTop=l}if(op.horizontal){f.width=c;f.left="50%";f.marginLeft=g}if(j=="static"){n.parent().css("position","relative")}n.css(f)})};(function(e){var b={},l,n,p,k=e.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),a=false;e.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){e.tooltip.blocked=!e.tooltip.blocked}};e.fn.extend({tooltip:function(q){q=e.extend({},e.tooltip.defaults,q);h(q);return this.each(function(){e.data(this,"tooltip",q);this.tOpacity=b.parent.css("opacity");this.tooltipText=this.title;e(this).removeAttr("title");this.alt=""}).mouseover(m).mouseout(f).click(f)},fixPNG:k?function(){return this.each(function(){var q=e(this).css("backgroundImage");if(q.match(/^url\(["']?(.*\.png)["']?\)$/i)){q=RegExp.$1;e(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+q+"')"}).each(function(){var r=e(this).css("position");if(r!="absolute"&&r!="relative"){e(this).css("position","relative")}})}})}:function(){return this},unfixPNG:k?function(){return this.each(function(){e(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){e(this)[e(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function h(q){if(b.parent){return}b.parent=e('<div id="'+q.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if(e.fn.bgiframe){b.parent.bgiframe()}b.title=e("h3",b.parent);b.body=e("div.body",b.parent);b.url=e("div.url",b.parent)}function c(q){return e.data(q,"tooltip")}function g(q){if(c(this).delay){p=setTimeout(o,c(this).delay)}else{o()}a=!!c(this).track;e(document.body).bind("mousemove",d);d(q)}function m(){if(e.tooltip.blocked||this==l||(!this.tooltipText&&!c(this).bodyHandler)){return}l=this;n=this.tooltipText;if(c(this).bodyHandler){b.title.hide();var t=c(this).bodyHandler.call(this);if(t.nodeType||t.jquery){b.body.empty().append(t)}else{b.body.html(t)}b.body.show()}else{if(c(this).showBody){var s=n.split(c(this).showBody);b.title.html(s.shift()).show();b.body.empty();for(var r=0,q;(q=s[r]);r++){if(r>0){b.body.append("<br/>")}b.body.append(q)}b.body.hideWhenEmpty()}else{b.title.html(n).show();b.body.hide()}}if(c(this).showURL&&e(this).url()){b.url.html(e(this).url().replace("http://","")).show()}else{b.url.hide()}b.parent.addClass(c(this).extraClass);if(c(this).fixPNG){b.parent.fixPNG()}g.apply(this,arguments)}function o(){p=null;if((!k||!e.fn.bgiframe)&&c(l).fade){if(b.parent.is(":animated")){b.parent.stop().show().fadeTo(c(l).fade,l.tOpacity)}else{b.parent.is(":visible")?b.parent.fadeTo(c(l).fade,l.tOpacity):b.parent.fadeIn(c(l).fade)}}else{b.parent.show()}d()}function d(t){if(e.tooltip.blocked){return}if(t&&t.target.tagName=="OPTION"){return}if(!a&&b.parent.is(":visible")){e(document.body).unbind("mousemove",d)}if(l==null){e(document.body).unbind("mousemove",d);return}b.parent.removeClass("viewport-right").removeClass("viewport-bottom");var w=b.parent[0].offsetLeft;var u=b.parent[0].offsetTop;if(t){w=t.pageX+c(l).left;u=t.pageY+c(l).top;var r="auto";if(c(l).positionLeft){r=e(window).width()-w;w="auto"}b.parent.css({left:w,right:r,top:u})}var q=j(),s=b.parent[0];if(q.x+q.cx<s.offsetLeft+s.offsetWidth){w-=s.offsetWidth+20+c(l).left;b.parent.css({left:w+"px"}).addClass("viewport-right")}if(q.y+q.cy<s.offsetTop+s.offsetHeight){u-=s.offsetHeight+20+c(l).top;b.parent.css({top:u+"px"}).addClass("viewport-bottom")}}function j(){return{x:e(window).scrollLeft(),y:e(window).scrollTop(),cx:e(window).width(),cy:e(window).height()}}function f(s){if(e.tooltip.blocked){return}if(p){clearTimeout(p)}l=null;var r=c(this);function q(){b.parent.removeClass(r.extraClass).hide().css("opacity","")}if((!k||!e.fn.bgiframe)&&r.fade){if(b.parent.is(":animated")){b.parent.stop().fadeTo(r.fade,0,q)}else{b.parent.stop().fadeOut(r.fade,q)}}else{q()}if(c(this).fixPNG){b.parent.unfixPNG()}}})(jQuery);var commonUtils={string:{hasOnlySeparateChars:function(a){replacedS=a.replace(/\s/g,"");return(replacedS=="")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},_formatWithObject:function(b,d){var a=/\{\w\}/g;for(var c in d){b=b.replace(new RegExp("\\{"+String(c)+"\\}","g"),d[c])}return b},_formatWithArgs:function(c,a){for(i=1;i<a.length;i++){var b=new RegExp("\\{"+String(i-1)+"\\}","g");c=c.replace(b,a[i]);delete b}return c},format:function(c){var a;if(arguments.length==2){var b=arguments[1];if(typeof(b)=="object"){a=commonUtils.string._formatWithObject(c,b)}else{a=commonUtils.string._formatWithArgs(c,arguments)}}else{a=commonUtils.string._formatWithArgs(c,arguments)}return a}},getTime:function(){var b=new Date();var a=b.getTime();delete b;return a},getObjectString:function(c){var b="";for(var a in c){b+="obj['"+String(a)+"']="+String(c[a])}return b},getBlankTargetLink:function(a,b){return"<a target='_blank' href='"+a+"'>"+b+"</a>"},getHost:function(){return window.location.hostname},getCurrentURL:function(){return window.location.href},getUrlVars:function(){var d=[],c;var a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var b=0;b<a.length;b++){c=a[b].split("=");d.push(c[0]);d[c[0]]=c[1]}return d},getUrlVar:function(b){var a=this.getUrlVars();return a[b]},fillNumberToStr:function(a,b){var c=String(a);while(c.length<b){c="0"+c}return c},browsers:{isIE:function(){return navigator.appName=="Microsoft Internet Explorer"},isOpera:function(){return navigator.appName=="Opera"},isIE6:function(){var a=navigator.appVersion;var b="MSIE";if(a.indexOf(b)!=-1){var c=a.indexOf(b)+b.length;while(isNaN(parseInt(a.charAt(c)))){c++}for(var e="";!isNaN(parseInt(a.charAt(c)));c++){e+=a.charAt(c)}var f=parseInt(e);if(f==6){return true}}return false}},indexKeyValue:function(b){for(var a in b){key=a;value=b[key];break}return{key:key,value:value}},format:{noWrap:function(a){return"<nobr>"+a+"</nobr>"},trunc:function(e,d){var a=e.length;var c="&hellip;";var b;if(a>d){b=e.substring(0,d-1)+c}else{b=e}return b},paragraph:function(a){return"<p>"+a+"</p>"},convertSlashNsToParagraphs:function(d){var a="\n";var b=d.split(a);sRes="";for(var c in b){sRes+=this.paragraph(b[c])}return sRes},metricValueToStyle:function(a){return String(a)+"px"},updateMinus:function(b){var a="&#150;";var c=Math.abs(b);if(c!=b){return a+String(c)}return String(b)}},timer:{getStr:function(c,a){var b=String(c);if(a==true||a==null){if(b.length<2){b="0"+b}}return b},getStrMinutes:function(a){return this.getStr(Math.floor(a.seconds/60),a.zeroAlign)},getStrSeconds:function(a){return this.getStr(a.seconds-a.minutes*60,a.zeroAlign)}},labelManager:{ru:{formList:[0,1,2,2,2,0,0,0,0,0],getForm:function(d,b){var a=d%100;if(a>=10&&a<20){return b[0]}else{var c=a%10;return b[this.formList[c]]}}}},NumberAndWords:{_RemainderSelector:function(k,j,h,g,f,e,d,c,b,a){this._words=new Array(k,j,h,g,f,e,d,c,b,a)},selectWord:function(a){rem=a%10;return this._words[rem]},_orderedNumberEndEn:function(b){var a=new this._RemainderSelector("th","st","nd","rd","th","th","th","th","th","th");var b=Math.abs(b);if(b>=11&&b<=20){return"th"}return a.selectWord(b)},chooseCnt:function(d){var c=d%10;var b=d%100;var a=5;if(c==1&&b!=11){a=1}else{if(c==2&&b!=12||c==3&&b!=13||c==4&&b!=14){a=2}}return a},chooseWordForm:function(e,c){var b=c[0];var a=c[1];var d=c[2];cnt=this.chooseCnt(e);if(cnt==1){return b}else{if(cnt==2){return a}}return d},_OneOrManyFilter:function(d,c){var b=c[0];var a=c[1];if(d==1){return b}else{return a}},_GenderFilter:function(e,d){var c=d[0];var b=d[1];var a;if(e=="male"){a=c}else{if(e=="female"){a=b}else{throw"не ожидаемо"}}return a},_ConditionFilter:function(e,d){var c=d[0];var b=d[1];var a;if(e){a=c}else{a=b}return a},_Is2Filter:function(e,d){var c=d[0];var b=d[1];var a;if(e==2){a=c}else{a=b}return a},_extractWords:function(a){var c=a.split(",");for(var b=0;b<c.length;b++){c[b]=c[b].replace(new RegExp('"',"g"),"")}return c},_extractWordsFromMatch:function(a){return this._extractWords(a[4])},formatWithNumberAndWordsFilters:function(e,a){var b=/{(\w+)\|(\w+)(:("([^"]*)"(,"([^"]*)")*))?}/;var d="";strInput=String(e);var c;for(c=strInput.match(b);c!=null;c=strInput.match(b)){arg=c[1];filt=c[2];if(filt=="125_nouns"){result=this.chooseWordForm(a[arg],this._extractWordsFromMatch(c))}else{if(filt=="one_or_many"){result=this._OneOrManyFilter(a[arg],this._extractWordsFromMatch(c))}else{if(filt=="st_nd"){result=this._orderedNumberEndEn(a[arg])}else{if(filt=="gender"){result=this._GenderFilter(a[arg],this._extractWordsFromMatch(c))}else{if(filt=="condition"){result=this._ConditionFilter(a[arg],this._extractWordsFromMatch(c))}else{if(filt=="is2"){result=this._Is2Filter(a[arg],this._extractWordsFromMatch(c))}else{throw'Неизвестное имя фильтра "'+filt+'" в строке "'+strInput+'"'}}}}}}strInput=strInput.replace(b,result)}return commonUtils.string.format(strInput,a)},_NumberInWordsRus:function(){this.ZERO="нулевой";this.L1=new Array(this.ZERO,"первый","второй","третий","четвертый","пятый","шестой","седьмой","восьмой","девятый","десятый","одиннадцатый","двенадцатый","тринадцатый","четырнадцатый","пятнадцатый","шестнадцатый","семнадцатый","восемнадцатый","девятнадцатый");this.L10=new Array(this.ZERO,"десятый","двадцатый","тридцатый","сороковой","пятидесятый","шестидесятый","семидесятый","восьмидесятый","девяностый");this.L10_1=new Array(this.ZERO,"","двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто");this.L100=new Array(this.ZERO,"сотый","двухсотый","трёхсотый","четырёхсотый","пятисотый","шестисотый","семисотый","восьмисотый","девятисотый");this.L100_1=new Array(this.ZERO,"сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот");this.write=function(e){if(e>=999){throw"Invalid parameter 'n' for NumberInWords._NumberInWords.write()"}if(e==0){return this.ZERO}n100=Math.floor(e/100);n10=Math.floor(e%100/10);n1=e%10;var b=[];if(n100==0){b.push(this.L100[n100])}else{b.push(this.L100_1[n100])}if(n10==1){b.push(this.L1[10*n10+n1])}else{if(n1==0){b.push(this.L10[n10])}else{b.push(this.L10_1[n10])}}b.push(this.L1[n1]);var d=new Array();for(var a=0;a<b.length;a++){var c=b[a];if(c!=this.ZERO){d.push(c)}}return d.join(" ")}},_NumberInWordsEng:function(){this._AND="and ";this._ordinals={0:"zero",1:"first",2:"second",3:"third",4:"fourth",5:"fifth",6:"sixth",7:"seventh",8:"eighth",9:"ninth",10:"tenth",11:"eleventh",12:"twelfth",13:"thirteenth",14:"fourteenth",15:"fifteenth",16:"sixteenth",17:"seventeenth",18:"eighteenth",19:"nineteenth",20:"twentieth",30:"thirtieth",40:"fortieth",50:"fiftieth",60:"sixtieth",70:"seventieth",80:"eightieth",90:"ninetieth"};this._cardinals={0:"zero",1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen",17:"seventeen",18:"eighteen",19:"nineteen",20:"twenty",30:"thirty",40:"forty",50:"fifty",60:"sixty",70:"seventy",80:"eighty",90:"ninety"};this._spokenNumber=function(f,c,b){var d;var e;if(c!=null){d=c}else{d=false}if(b!=null){e=b}else{e=false}if(e==false&&this._ordinals[f]!=null){result=this._ordinals[f];if(d){return this._AND+result}else{return result}return result}else{if(e&&this._cardinals[f]!=null){return this._cardinals[f]}}bestGuess=String(f);remainder=0;if(f<=20){throw""}else{if(f<100){bestGuess=this._spokenNumber(Math.floor(f/10)*10,false,true)+"-"+this._spokenNumber(f%10,false);return bestGuess}else{bestGuess=this._spokenNumber(Math.floor(f/100),true,true)+" hundred";remainder=f%100}}if(remainder){var a;if(remainder>=100){a=","}else{a=""}return bestGuess+a+" "+this._spokenNumber(remainder,true)}else{return bestGuess}};this.write=function(a){return this._spokenNumber(a)}},NumberInWordsWriter:function(c){this.write=function(d){return a.write(d)};var b={"1":commonUtils.NumberAndWords._NumberInWordsRus,"2":commonUtils.NumberAndWords._NumberInWordsEng};var a=new b[String(c)]();return a}},linkConstructor:{replaceParagraph:function(c,d){var b="#";var e=c.indexOf(b);var a;if(e!=-1){a=c.substring(0,e)}else{a=c}return a+b+d}},ScreenResolution:function(a){this._vertLowLimit=a.vertLowLimit;this._horVertLimit=a.horLowLimit;this.isLow=function(){var e=this._vertLowLimit;var c=this._horLowLimit;var b=screen.width;var d=screen.height;if(e==null&&c==null){return true}else{if(c==null){return e>screen.height}}return c>screen.width};this.isHigh=function(){return(!this.isLow())};return this},Caller:function(c,d){var a=c;var b=d;this.call=function(){b(a,arguments)};return this},keyCodes:{backspace:8,enter:13},flash:{getCurVersion:function(){return swfobject.getFlashPlayerVersion()},formatVersion:function(a,b){var c=".";if(b!=null){c=b}return String(a.major)+c+String(a.minor)},installed:function(){var a=this.getCurVersion();return(a.minor>0||a.major>0)},isValidVersion:function(a){var b=this.getCurVersion();if(b.major<a.major){return false}else{if(b.major==a.major){if(b.minor<a.minor){return false}}}return true}}};
/*!	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var E="undefined",s="object",T="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",r="application/x-shockwave-flash",S="SWFObjectExprInst",y="onreadystatechange",P=window,k=document,u=navigator,U=false,V=[h],p=[],O=[],J=[],m,R,F,C,K=false,a=false,o,H,n=true,N=function(){var ab=typeof k.getElementById!=E&&typeof k.getElementsByTagName!=E&&typeof k.createElement!=E,ai=u.userAgent.toLowerCase(),Z=u.platform.toLowerCase(),af=Z?/win/.test(Z):/win/.test(ai),ad=Z?/mac/.test(Z):/mac/.test(ai),ag=/webkit/.test(ai)?parseFloat(ai.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Y=!+"\v1",ah=[0,0,0],ac=null;if(typeof u.plugins!=E&&typeof u.plugins[T]==s){ac=u.plugins[T].description;if(ac&&!(typeof u.mimeTypes!=E&&u.mimeTypes[r]&&!u.mimeTypes[r].enabledPlugin)){U=true;Y=false;ac=ac.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ah[0]=parseInt(ac.replace(/^(.*)\..*$/,"$1"),10);ah[1]=parseInt(ac.replace(/^.*\.(.*)\s.*$/,"$1"),10);ah[2]=/[a-zA-Z]/.test(ac)?parseInt(ac.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof P.ActiveXObject!=E){try{var ae=new ActiveXObject(X);if(ae){ac=ae.GetVariable("$version");if(ac){Y=true;ac=ac.split(" ")[1].split(",");ah=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}}catch(aa){}}}return{w3:ab,pv:ah,wk:ag,ie:Y,win:af,mac:ad}}(),l=function(){if(!N.w3){return}if((typeof k.readyState!=E&&k.readyState=="complete")||(typeof k.readyState==E&&(k.getElementsByTagName("body")[0]||k.body))){f()}if(!K){if(typeof k.addEventListener!=E){k.addEventListener("DOMContentLoaded",f,false)}if(N.ie&&N.win){k.attachEvent(y,function(){if(k.readyState=="complete"){k.detachEvent(y,arguments.callee);f()}});if(P==top){(function(){if(K){return}try{k.documentElement.doScroll("left")}catch(Y){setTimeout(arguments.callee,0);return}f()})()}}if(N.wk){(function(){if(K){return}if(!/loaded|complete/.test(k.readyState)){setTimeout(arguments.callee,0);return}f()})()}t(f)}}();function f(){if(K){return}try{var aa=k.getElementsByTagName("body")[0].appendChild(D("span"));aa.parentNode.removeChild(aa)}catch(ab){return}K=true;var Y=V.length;for(var Z=0;Z<Y;Z++){V[Z]()}}function L(Y){if(K){Y()}else{V[V.length]=Y}}function t(Z){if(typeof P.addEventListener!=E){P.addEventListener("load",Z,false)}else{if(typeof k.addEventListener!=E){k.addEventListener("load",Z,false)}else{if(typeof P.attachEvent!=E){j(P,"onload",Z)}else{if(typeof P.onload=="function"){var Y=P.onload;P.onload=function(){Y();Z()}}else{P.onload=Z}}}}}function h(){if(U){W()}else{I()}}function W(){var Y=k.getElementsByTagName("body")[0];var ab=D(s);ab.setAttribute("type",r);var aa=Y.appendChild(ab);if(aa){var Z=0;(function(){if(typeof aa.GetVariable!=E){var ac=aa.GetVariable("$version");if(ac){ac=ac.split(" ")[1].split(",");N.pv=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}else{if(Z<10){Z++;setTimeout(arguments.callee,10);return}}Y.removeChild(ab);aa=null;I()})()}else{I()}}function I(){var ah=p.length;if(ah>0){for(var ag=0;ag<ah;ag++){var Z=p[ag].id;var ac=p[ag].callbackFn;var ab={success:false,id:Z};if(N.pv[0]>0){var af=c(Z);if(af){if(G(p[ag].swfVersion)&&!(N.wk&&N.wk<312)){x(Z,true);if(ac){ab.success=true;ab.ref=A(Z);ac(ab)}}else{if(p[ag].expressInstall&&B()){var aj={};aj.data=p[ag].expressInstall;aj.width=af.getAttribute("width")||"0";aj.height=af.getAttribute("height")||"0";if(af.getAttribute("class")){aj.styleclass=af.getAttribute("class")}if(af.getAttribute("align")){aj.align=af.getAttribute("align")}var ai={};var Y=af.getElementsByTagName("param");var ad=Y.length;for(var ae=0;ae<ad;ae++){if(Y[ae].getAttribute("name").toLowerCase()!="movie"){ai[Y[ae].getAttribute("name")]=Y[ae].getAttribute("value")}}Q(aj,ai,Z,ac)}else{q(af);if(ac){ac(ab)}}}}}else{x(Z,true);if(ac){var aa=A(Z);if(aa&&typeof aa.SetVariable!=E){ab.success=true;ab.ref=aa}ac(ab)}}}}}function A(ab){var Y=null;var Z=c(ab);if(Z&&Z.nodeName=="OBJECT"){if(typeof Z.SetVariable!=E){Y=Z}else{var aa=Z.getElementsByTagName(s)[0];if(aa){Y=aa}}}return Y}function B(){return !a&&G("6.0.65")&&(N.win||N.mac)&&!(N.wk&&N.wk<312)}function Q(ab,ac,Y,aa){a=true;F=aa||null;C={success:false,id:Y};var af=c(Y);if(af){if(af.nodeName=="OBJECT"){m=g(af);R=null}else{m=af;R=Y}ab.id=S;if(typeof ab.width==E||(!/%$/.test(ab.width)&&parseInt(ab.width,10)<310)){ab.width="310"}if(typeof ab.height==E||(!/%$/.test(ab.height)&&parseInt(ab.height,10)<137)){ab.height="137"}k.title=k.title.slice(0,47)+" - Flash Player Installation";var ae=N.ie&&N.win?"ActiveX":"PlugIn",ad="MMredirectURL="+encodeURI(P.location).toString().replace(/&/g,"%26")+"&MMplayerType="+ae+"&MMdoctitle="+k.title;if(typeof ac.flashvars!=E){ac.flashvars+="&"+ad}else{ac.flashvars=ad}if(N.ie&&N.win&&af.readyState!=4){var Z=D("div");Y+="SWFObjectNew";Z.setAttribute("id",Y);af.parentNode.insertBefore(Z,af);af.style.display="none";(function(){if(af.readyState==4){af.parentNode.removeChild(af)}else{setTimeout(arguments.callee,10)}})()}v(ab,ac,Y)}}function q(Z){if(N.ie&&N.win&&Z.readyState!=4){var Y=D("div");Z.parentNode.insertBefore(Y,Z);Y.parentNode.replaceChild(g(Z),Y);Z.style.display="none";(function(){if(Z.readyState==4){Z.parentNode.removeChild(Z)}else{setTimeout(arguments.callee,10)}})()}else{Z.parentNode.replaceChild(g(Z),Z)}}function g(ad){var ab=D("div");if(N.win&&N.ie){ab.innerHTML=ad.innerHTML}else{var Z=ad.getElementsByTagName(s)[0];if(Z){var ae=Z.childNodes;if(ae){var Y=ae.length;for(var aa=0;aa<Y;aa++){if(!(ae[aa].nodeType==1&&ae[aa].nodeName=="PARAM")&&!(ae[aa].nodeType==8)){ab.appendChild(ae[aa].cloneNode(true))}}}}}return ab}function v(aj,ah,Z){var Y,ab=c(Z);if(N.wk&&N.wk<312){return Y}if(ab){if(typeof aj.id==E){aj.id=Z}if(N.ie&&N.win){var ai="";for(var af in aj){if(aj[af]!=Object.prototype[af]){if(af.toLowerCase()=="data"){ah.movie=aj[af]}else{if(af.toLowerCase()=="styleclass"){ai+=' class="'+aj[af]+'"'}else{if(af.toLowerCase()!="classid"){ai+=" "+af+'="'+aj[af]+'"'}}}}}var ag="";for(var ae in ah){if(ah[ae]!=Object.prototype[ae]){ag+='<param name="'+ae+'" value="'+ah[ae]+'" />'}}ab.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ai+">"+ag+"</object>";O[O.length]=aj.id;Y=c(aj.id)}else{var aa=D(s);aa.setAttribute("type",r);for(var ad in aj){if(aj[ad]!=Object.prototype[ad]){if(ad.toLowerCase()=="styleclass"){aa.setAttribute("class",aj[ad])}else{if(ad.toLowerCase()!="classid"){aa.setAttribute(ad,aj[ad])}}}}for(var ac in ah){if(ah[ac]!=Object.prototype[ac]&&ac.toLowerCase()!="movie"){e(aa,ac,ah[ac])}}ab.parentNode.replaceChild(aa,ab);Y=aa}}return Y}function e(aa,Y,Z){var ab=D("param");ab.setAttribute("name",Y);ab.setAttribute("value",Z);aa.appendChild(ab)}function z(Z){var Y=c(Z);if(Y&&Y.nodeName=="OBJECT"){if(N.ie&&N.win){Y.style.display="none";(function(){if(Y.readyState==4){b(Z)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.removeChild(Y)}}}function b(aa){var Z=c(aa);if(Z){for(var Y in Z){if(typeof Z[Y]=="function"){Z[Y]=null}}Z.parentNode.removeChild(Z)}}function c(aa){var Y=null;try{Y=k.getElementById(aa)}catch(Z){}return Y}function D(Y){return k.createElement(Y)}function j(aa,Y,Z){aa.attachEvent(Y,Z);J[J.length]=[aa,Y,Z]}function G(aa){var Z=N.pv,Y=aa.split(".");Y[0]=parseInt(Y[0],10);Y[1]=parseInt(Y[1],10)||0;Y[2]=parseInt(Y[2],10)||0;return(Z[0]>Y[0]||(Z[0]==Y[0]&&Z[1]>Y[1])||(Z[0]==Y[0]&&Z[1]==Y[1]&&Z[2]>=Y[2]))?true:false}function w(ad,Z,ae,ac){if(N.ie&&N.mac){return}var ab=k.getElementsByTagName("head")[0];if(!ab){return}var Y=(ae&&typeof ae=="string")?ae:"screen";if(ac){o=null;H=null}if(!o||H!=Y){var aa=D("style");aa.setAttribute("type","text/css");aa.setAttribute("media",Y);o=ab.appendChild(aa);if(N.ie&&N.win&&typeof k.styleSheets!=E&&k.styleSheets.length>0){o=k.styleSheets[k.styleSheets.length-1]}H=Y}if(N.ie&&N.win){if(o&&typeof o.addRule==s){o.addRule(ad,Z)}}else{if(o&&typeof k.createTextNode!=E){o.appendChild(k.createTextNode(ad+" {"+Z+"}"))}}}function x(aa,Y){if(!n){return}var Z=Y?"visible":"hidden";if(K&&c(aa)){c(aa).style.visibility=Z}else{w("#"+aa,"visibility:"+Z)}}function M(Z){var aa=/[\\\"<>\.;]/;var Y=aa.exec(Z)!=null;return Y&&typeof encodeURIComponent!=E?encodeURIComponent(Z):Z}var d=function(){if(N.ie&&N.win){window.attachEvent("onunload",function(){var ad=J.length;for(var ac=0;ac<ad;ac++){J[ac][0].detachEvent(J[ac][1],J[ac][2])}var aa=O.length;for(var ab=0;ab<aa;ab++){z(O[ab])}for(var Z in N){N[Z]=null}N=null;for(var Y in swfobject){swfobject[Y]=null}swfobject=null})}}();return{registerObject:function(ac,Y,ab,aa){if(N.w3&&ac&&Y){var Z={};Z.id=ac;Z.swfVersion=Y;Z.expressInstall=ab;Z.callbackFn=aa;p[p.length]=Z;x(ac,false)}else{if(aa){aa({success:false,id:ac})}}},getObjectById:function(Y){if(N.w3){return A(Y)}},embedSWF:function(ac,ai,af,ah,Z,ab,aa,ae,ag,ad){var Y={success:false,id:ai};if(N.w3&&!(N.wk&&N.wk<312)&&ac&&ai&&af&&ah&&Z){x(ai,false);L(function(){af+="";ah+="";var ak={};if(ag&&typeof ag===s){for(var am in ag){ak[am]=ag[am]}}ak.data=ac;ak.width=af;ak.height=ah;var an={};if(ae&&typeof ae===s){for(var al in ae){an[al]=ae[al]}}if(aa&&typeof aa===s){for(var aj in aa){if(typeof an.flashvars!=E){an.flashvars+="&"+aj+"="+aa[aj]}else{an.flashvars=aj+"="+aa[aj]}}}if(G(Z)){var ao=v(ak,an,ai);if(ak.id==ai){x(ai,true)}Y.success=true;Y.ref=ao}else{if(ab&&B()){ak.data=ab;Q(ak,an,ai,ad);return}else{x(ai,true)}}if(ad){ad(Y)}})}else{if(ad){ad(Y)}}},switchOffAutoHideShow:function(){n=false},ua:N,getFlashPlayerVersion:function(){return{major:N.pv[0],minor:N.pv[1],release:N.pv[2]}},hasFlashPlayerVersion:G,createSWF:function(aa,Z,Y){if(N.w3){return v(aa,Z,Y)}else{return undefined}},showExpressInstall:function(aa,ab,Y,Z){if(N.w3&&B()){Q(aa,ab,Y,Z)}},removeSWF:function(Y){if(N.w3){z(Y)}},createCSS:function(ab,aa,Z,Y){if(N.w3){w(ab,aa,Z,Y)}},addDomLoadEvent:L,addLoadEvent:t,getQueryParamValue:function(ab){var aa=k.location.search||k.location.hash;if(aa){if(/\?/.test(aa)){aa=aa.split("?")[1]}if(ab==null){return M(aa)}var Z=aa.split("&");for(var Y=0;Y<Z.length;Y++){if(Z[Y].substring(0,Z[Y].indexOf("="))==ab){return M(Z[Y].substring((Z[Y].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var Y=c(S);if(Y&&m){Y.parentNode.replaceChild(m,Y);if(R){x(R,true);if(N.ie&&N.win){m.style.display="block"}}if(F){F(C)}}a=false}}}}();var Tea={};Tea.encrypt=function(c,s){if(c.length==0){return("")}var t=Tea.strToLongs(c);if(t.length<=1){t[1]=0}var g=Tea.strToLongs(s.slice(0,16));var d=t.length;var l=t[d-1],m=t[0],r=2654435769;var o,j,a=Math.floor(6+52/d),h=0;while(a-->0){h+=r;j=h>>>2&3;for(var b=0;b<d;b++){m=t[(b+1)%d];o=(l>>>5^m<<2)+(m>>>3^l<<4)^(h^m)+(g[b&3^j]^l);l=t[b]+=o}}var f=Tea.longsToStr(t);return Base64.encode(f)};Tea.strToLongs=function(c){var a=new Array(Math.ceil(c.length/4));for(var b=0;b<a.length;b++){a[b]=c.charCodeAt(b*4)+(c.charCodeAt(b*4+1)<<8)+(c.charCodeAt(b*4+2)<<16)+(c.charCodeAt(b*4+3)<<24)}return a};Tea.longsToStr=function(c){var b=new Array(c.length);for(var d=0;d<c.length;d++){b[d]=String.fromCharCode(c[d]&255,c[d]>>>8&255,c[d]>>>16&255,c[d]>>>24&255)}return b.join("")};var Base64={};Base64.code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Base64.encode=function(o){var g,b,a,r,p,l,k,h,j=[],f="",n,q,m;var d=Base64.code;q=o;n=q.length%3;if(n>0){while(n++<3){f+="=";q+="\0"}}for(n=0;n<q.length;n+=3){g=q.charCodeAt(n);b=q.charCodeAt(n+1);a=q.charCodeAt(n+2);r=g<<16|b<<8|a;p=r>>18&63;l=r>>12&63;k=r>>6&63;h=r&63;j[n/3]=d.charAt(p)+d.charAt(l)+d.charAt(k)+d.charAt(h)}m=j.join("");m=m.slice(0,m.length-f.length)+f;return m};function sendAjaxRequest(d){var e=d.type;if(e==null){e="GET"}var b=d.url;var m=d.parameters;var h=d.dataType;if(h==null){h="html"}var l=d.callbackSuccess;if(l==null){l=function(p,q,o){}}var g=d.callbackError;if(g==null){g=function(o,q,p){}}var f=d.asynchronous;if(f==null){f=true}var k=d.contentType;if(k==null){k="application/x-www-form-urlencoded"}var c=d.headers;if(c==null){c={}}var n=d.keepalive;var j=null;if(n){j=function(o){o.setRequestHeader("Connection","Keep-Alive")}}var a=d.secure;var d=a&&m?{p:Tea.encrypt($.param(m),uniqueId)}:m;jQuery.ajax({type:e,url:b,data:d,dataType:h,contentType:k,async:f,headers:c,success:l,error:g,beforeSend:j,cache:false})}var keyPresses={region:function(){},city:function(){}};function updateRegions(f,a,e){url="/register/get_location_data.tmpl";var b=document.getElementById("region");var d=document.getElementById("city");var c={country_id:f};if(e!=undefined){c.process_field="true"}keyPresses.region=b.getElementsByTagName("select")[0].onkeypress;keyPresses.city=d.getElementsByTagName("select")[0].onkeypress;sendAjaxRequest({type:"POST",url:url,dataType:"html",parameters:c,callbackSuccess:function(g,h){b.innerHTML=g;d.innerHTML='<select id="select-city" type="select" name="city_id" value="" str_res="user-city" required="1" disabled="1"><option value="">...</option></select>';b.getElementsByTagName("select")[0].onkeypress=keyPresses.region;d.getElementsByTagName("select")[0].onkeypress=keyPresses.city}})}function updateCities(f,e,a,d){url="/register/get_location_data.tmpl";var b=document.getElementById("city");var c={country_id:f,region_id:e};if(d!=undefined){c.process_field="true"}keyPresses.city=b.getElementsByTagName("select")[0].onkeypress;sendAjaxRequest({type:"POST",url:url,dataType:"html",parameters:c,callbackSuccess:function(g,h){b.innerHTML=g;b.getElementsByTagName("select")[0].onkeypress=keyPresses.city}})}function TSelectorArr(){this.Arr=new Array();this.SForwBackw="...";this.Min=0;this.MinPg=0;this.MaxPg=0;this.Get=function(a,d,h){this.Arr.splice(0,this.Arr.length);var g=a-h/2;if(g<0){g=0}var e=g+h;var f=d-1;if(e>f){e=f}this.Min=g;this.MaxPg=d-1;if(g>0){this.Arr[0]=this.SForwBackw}else{this.Arr[0]=String(g)}for(var c=g+1,b=1;c<e;c++,b++){this.Arr[b]=String(c)}if(h<=this.Arr.length){if(e<f){this.Arr[h-1]=this.SForwBackw}else{this.Arr[h-1]=String(e)}}for(c=0;c<this.Arr.length;c++){if(!isNaN(parseInt(this.Arr[c]))){this.Arr[c]=String(parseInt(this.Arr[c])+1)}}return this.Arr}}var USelector=new TSelectorArr();Date.prototype.GetRusStr=function(o){var l=o.match(/[0-9]{2}/g);var k=o.match(/[0-9]{4}/g);var g=l[3];var b=l[2];var j=k[0];var e=l[4];var f=l[5];var n=l[6];var a=".";var h=":";return g+a+b+a+j+" "+e+h+f+h+n};var Context={BError:false,SetError:function(a){this.BError=a},IsError:function(){return this.BError}};var _specMath={rand:function(b,a){var c=Math.floor(Math.random()*(a-b+1))+b;if(c<b){c=b}else{if(c>a){c=a}}return c},round:function(c,a){if(a==null){return Math.round(c)}var b=Math.pow(10,a);return Math.round(c*b)/b},floor:function(c,a){if(a==null){return Math.floor(c)}var b=Math.pow(10,a);return Math.floor(c*b)/b},stringDecimals:function(c,a){var b=Math.pow(10,a);return String(Math.floor((c-Math.floor(c))*b))}};String.prototype.repeat=function(c){var b="";for(var a=0;a<c;a++){b+=this.toString()}return b};var tester={assert:function(a){if(a==undefined){throw String(a)+" not specified"}return a}};function navigateTo(a){document.location.href=a}function navigateNewWindowTo(a){window.open(a)}function wrapParameter(parameter){return String(parameter)+String(eval(parameter))}function isIe(){return(navigator.appName=="Microsoft Internet Explorer")}function isMacOS(){return(navigator.userAgent.indexOf("Macintosh")!=-1)}function isIe6(){var a=navigator.appVersion;var b="MSIE";if(a.indexOf(b)!=-1){var c=a.indexOf(b)+b.length;while(isNaN(parseInt(a.charAt(c)))){c++}for(var e="";!isNaN(parseInt(a.charAt(c)));c++){e+=a.charAt(c)}var f=parseInt(e);if(f==6){return true}}return false}function isOpera(){if(navigator.appName=="Opera"){return true}return false}function isOperaLess10(){var a=navigator.appName;var c=navigator.appVersion;var b=parseInt(c.substring(0,c.indexOf(".")));if(a=="Opera"&&b<10){return true}return false}function getScrollY(){if(typeof(window.pageYOffset)=="number"){return window.pageYOffset}else{if(document.body&&(document.body.scrollTop)){return document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollTop)){return document.documentElement.scrollTop}}}return 0}function OpenNewWindow(a){window.open(a)}function StrDeleteSymbols(f,b){var e="";for(var c=0;c<f.length;c++){var d=true;for(var a=0;a<b.length;a++){if(f.charAt(c)==b.charAt(a)){d=false;break}}if(d){e+=f.charAt(c)}}return e}function StrArrayDeleteSymbols(h,c){var e=Array();var g;for(var a=0;a<h.length;a++){g="";for(var d=0;d<h[a].length;d++){var f=true;for(var b=0;b<c.length;b++){if(h[a].charAt(d)==c.charAt(b)){f=false;break}}if(f){g+=h[a].charAt(d)}}e.push(g)}return e}function getPxNumber(a){var b=a.indexOf("p");if(b==-1){b=a.indexOf("P")}if(b==-1){b=a.length}return parseInt(a.slice(0,b))}function BeginFont(a,b){if(a!=""){return"<FONT "+a+"='"+b+"'>"}return"<FONT>"}function EndFont(){return"</FONT>"}function BeginBold(){return"<b>"}function EndBold(){return"</b>"}function BeginItalic(){return"<i>"}function EndItalic(){return"</i>"}function BeginP(a,b){if(a==undefined&&b==undefined){return"<P>"}if(a!=""){return"<P "+a+"='"+b+"'>"}return"<P>"}function EndP(){return"</P>"}function BeginNobr(){return"<NOBR>"}function EndNobr(){return"</NOBR>"}function Br(){return"<BR/>"}function BeginDiv(a,b){if(a!=""){return"<DIV "+a+"='"+b+"'>"}return"<DIV>"}function EndDiv(){return"</DIV>"}function BeginSpan(a,b){if(a!=""){return"<SPAN "+a+"='"+b+"'>"}return"<SPAN>"}function EndSpan(){return"</SPAN>"}function Write(a){document.write(a)}function AddToSection(a,b){document.getElementById(a).innerHTML+=b}function Table(){this.SetTWidth=w;this.SetTHeight=c;this.SetTID=m;this.SetTClass=t;this.SetTColor=a;this.ResetT=v;this.BeginT=u;this.BeginTable=s;this.EndTable=o;this.EndTd=q;this.BeginTr=r;this.EndTr=k;this.BeginTd=f;this.EndTd=q;this.SetTRowSpan=l;this.SetTAlign=b;this.SetTValign=p;this.SetTStyle=d;this.SetTCellspacing=h;this.SetTCellpadding=n;this.SetTColspan=j;this.SetAutoReset=g;this.ResetT();this.Width=0;this.Height=0;this.ID="";this.Class="";this.BkColor="";this.RowSpan="1";this.Style="";this.bAutoReset=false;this.TableCnt=0;this.TrCnt=0;this.TdCnt=0;this.TestNotInTable=e;function g(x){this.bAutoReset=x}function w(x){this.bWidthPresent=true;this.Width=x}function c(x){this.bHeightPresent=true;this.Height=x}function m(x){this.ID=x;this.bIDPresent=true}function t(x){this.Class=x;this.bClassPresent=true}function d(x){this.Style=x;this.bStyle=true}function a(x){this.BkColor=x;this.bBkColorPresent=true}function l(x){this.RowSpan=x;this.bRowSpanPresent=true}function b(x){this.Align=x;this.bAlignPresent=true}function p(x){this.Valign=x;this.bValignPresent=true}function h(x){this.Cellspacing=x;this.bCellspacing=true}function n(x){this.Cellpadding=x;this.bCellpadding=true}function j(x){this.Colspan=x;this.bColspan=true}function v(){this.bWidthPresent=false;this.bHeightPresent=false;this.bIDPresent=false;this.bClassPresent=false;this.bBkColorPresent=false;this.bRowSpanPresent=false;this.bAlignPresent=false;this.bValignPresent=false;this.bCellspacing=false;this.bCellpadding=false;this.bStyle=false;this.bColspan=false}function u(y){var x="";if(this.bWidthPresent){x+=' width="'+this.Width+'"'}if(this.bHeightPresent){x+=' height="'+this.Height+'"'}if(this.bIDPresent){x+=' id="'+this.ID+'"'}if(this.bClassPresent){x+=' class="'+this.Class+'"'}if(this.bBkColorPresent){x+=' style="background-color: '+this.BkColor+'"'}if(this.bRowSpanPresent){x+=' rowspan="'+this.RowSpan+'"'}if(this.bAlignPresent){x+=' align="'+this.Align+'"'}if(this.bValignPresent){x+=' valign="'+this.Valign+'"'}if(this.bColspan){x+=' colspan="'+this.Colspan+'"'}if(this.bCellspacing){x+=' cellspacing="'+this.Cellspacing+'"'}if(this.bCellpadding){x+=' cellpadding="'+this.Cellpadding+'"'}if(this.bStyle){x+=' style="'+this.Style+'"'}if(this.bAutoReset){this.ResetT()}return"<"+y+x+">"}function s(){this.TableCnt++;return this.BeginT("table border=1")}function o(){this.TableCnt--;return"</table>"}function r(){this.TrCnt++;return this.BeginT("tr")}function k(){this.TrCnt--;return"</tr>"}function f(){this.TdCnt++;return this.BeginT("td")}function q(){this.TdCnt--;return"</td>"}function e(){if(this.TableCnt==0&&this.TrCnt==0&&this.TdCnt==0){return true}else{return false}}}function BeginCenter(){return"<center>"}function EndCenter(){return"</center>"}function Img(c,a,d){var b="<img src='"+c+"'";if(a==undefined){return b+">"}if(d==undefined){return b+" usemap='#"+a+"'>"}return b+" usemap='#"+a+"' id='"+d+"'>"}var componentsInHTML={pleaseWait:"<table cellpadding='10' width='100%'><tr><td><div style='font-size: 20px; text-align: center;'>"+Locale.loadingPleaseWait+"</div></td></tr><tr><td align='center'><img align='center' src='/pics/indikator.gif' alt=''></td></tr></table></span>"};function GetNumberOfWordsToFinishString(c,e){var a=0,b=0,d=0;for(;a<c+1&&b<e.length;b++){if(e.charAt(b)=="\n"){a++;d++}if(e.charAt(b)==" "){d++}}return d}function EmptySpan(d){var c="display: block; height: 1px; overflow: hidden; font-size: 1px; margin: 0 1px";var b="padding: 0px 2px; margin: 0; font-weight: bold; height: 100%; font-family: Courier New; font-size: 12pt;";var e=d;if(e==" "){e="&nbsp;"}var a="<b style='"+c+"'></b><div style='"+b+"'>"+e+"</div><b style='"+c+"'></b>";return a}function GetWordBeginStrIndex(c,b){var d,a;for(d=0,a=0;d<b&&a<c.length;a++){if(c.charAt(a)==" "||c.charAt(a)=="\n"){d++}}return a}function IsWordLastAtString(b,c){var a;for(a=GetWordBeginStrIndex(b,c);a<b.length;a++){if(b.charAt(a)==" "){return false}if(b.charAt(a)=="\n"){return true}}}function GetNumOfWords(b){var a=0;for(i=0;i<b.length;i++){if(b.charAt(i)==" "||b.charAt(i)=="\n"){a++}}if(b.charAt(i-1)!="\n"&&b.charAt(i-1)!=" "&&i==b.length){a++}return a}function TInputField(s,p,n,l){this.Id=s;this.LetterId="Letter";this.StrLength=p;this.NumOfLines=n;this.NumOfLinesBeforeCurrentLine=l;this.Text=String("");this.InnerHTML=String("");this.Index=0;this.SetText=k;this.SetCaret=B;this.Render=A;this.PlaceHere=y;this.SetLastChar=f;this.SetBkRedCurrentChar=h;this.SetBkGreenCurrentChar=z;this.LetterSpan=g;this.EmptyField=new TEmptyField("Text","#f6f6f6");this.GetEmptyField=o;this.LastChar=-1;this.MarkError=false;this.BkCurrentCharColor="green";this.CurrentCharColor="white";this.GetStringId=m;this.GetLetterSpanId=a;this.SetCharColorBkColor=j;this.SetCharBkColor=d;this.SetCharColor=u;this.GetIndex=x;this.GetCurLine=c;this.StepForward=b;this.GoToBegOfLine=t;this.SetError=e;this.ResetError=w;this.GoToBeg=q;this.CurLine=0;this.PrevLine=0;this.NumOfLinesAtText=0;this.WholeTextNumOfLines=0;this.ShowElement=v;this.BWordsMode=false;this.GetCurLine=function(){return this.CurLine};this.GetNumOfLinesAtText=function(){return this.WholeTextNumOfLines};this.SetWordsMode=function(C){this.BWordsMode=C};this.GetWordNum=function(C){var D=document.getElementById(this.GetLetterSpanId(C));if(D==undefined){return}return document.getElementById(this.GetLetterSpanId(C)).innerHTML};function y(){return BeginSpan("id",this.Id)+EndSpan()}function o(){return this.EmptyField}function a(C){return this.Id+this.LetterId+String(C)}function k(D){var C=document.getElementById(this.Id);this.Text=D;for(i=0;i<this.Text.length;i++){this.InnerHTML+=this.LetterSpan(i,this.Text.charAt(i))}}function r(){return this.Text}function e(){this.SetCharBkColor(this.Index,"#AB0000")}function w(){this.SetCharBkColor(this.Index,"")}this.RestoreCursor=function(){this.SetCharColorBkColor(this.Index,"white","green")};function f(C){this.LastChar=C}function h(){this.BkCurrentCharColor="red"}function z(){this.BkCurrentCharColor="green"}function v(D,C){var E=document.getElementById(this.GetStringId(D));if(C){E.style.display=""}else{E.style.display="none"}}function B(D,E){if(D==0){this.CurLine=0;this.Index=0;if(E==true){this.Render()}}else{if(D>0){if(this.BWordsMode==false){if(this.Text.charAt(D-1)=="\n"&&E!=true){this.CurLine++}}else{if(D==GetNumberOfWordsToFinishString(this.CurLine,this.Text)){this.CurLine++}}}}if(this.CurLine!=this.PrevLine&&this.CurLine>this.NumOfLinesBeforeCurrentLine&&this.CurLine<this.NumOfLinesAtText-1&&E!=true){this.ShowElement(this.CurLine-this.NumOfLinesBeforeCurrentLine-1,false);this.ShowElement(this.CurLine+1,true)}var C="";if(E==undefined||E==false){C="green"}this.SetCharColorBkColor(this.Index,C,"");this.SetCharColorBkColor(D,"white","green");this.Index=D;this.PrevLine=this.CurLine}function x(){return this.Index}function b(){this.SetCaret(this.GetIndex()+1)}function q(){this.SetCaret(0,true)}function t(){var C=this.GetIndex();if(this.Text.charAt(C)=="\n"){C--}for(;C>0&&this.Text.charAt(C)!="\n";C--){this.SetCharColor(C,"");this.SetCharBkColor(C,"")}if(this.Text.charAt(C)=="\n"){C++}this.SetCaret(C,true)}function j(E,C,D){var H=document.getElementById(this.GetLetterSpanId(E)+"El1");var G=document.getElementById(this.GetLetterSpanId(E));var F=document.getElementById(this.GetLetterSpanId(E)+"El2");H.style.background=D;G.style.color=C;G.style.background=D;F.style.background=D}function g(C,E,D){if(E==" "){E="&nbsp;"}if(D==false){return"<b id='"+this.GetLetterSpanId(C)+"El1' class='Input1Class1'></b><div id='"+this.GetLetterSpanId(C)+"' class='Input2ColorNone'>"+E+"</div><b id='"+this.GetLetterSpanId(C)+"El2' class='Input1Class1'></b>"}else{return"<b id='"+this.GetLetterSpanId(C)+"El1' class='Input1Class1'></b><div id='"+this.GetLetterSpanId(C)+"' class='Input2ColorGreen'>"+E+"</div><b id='"+this.GetLetterSpanId(C)+"El2' class='Input1Class1'></b>"}}function d(D,C){this.Style1="display: block; height: 1px; overflow: hidden; font-size:1px; margin: 0 1px; background-color: "+this.BkColor;this.Style2="padding: 0 2px; margin: 0; background-color: "+this.BkColor+"; font-weight: bold;  text-align: left; color: "+this.Color+"; vertical-align: top;";document.getElementById(this.GetLetterSpanId(D)).style.background=C;return}function u(D,C){document.getElementById(this.GetLetterSpanId(D)).style.color=C}function c(C){return this.CurLine}function m(C){return"InputFieldString"+String(C)}this.GetNumOfWords=function(){return this.NumOfWords};this.GetWord=function(C,G){var D;var E=0;for(D=0;D<G.length;D++){if(C==E){var F="";for(;G.charAt(D)!=" "&&G.charAt(D)!="\n";D++){F+=G.charAt(D)}return F}if(G.charAt(D)==" "||G.charAt(D)=="\n"){E++}}};this.GetWordLength=function(D,F){var E,C=0;for(E=D;F.charAt(E)!=" "&&F.charAt(E)!="\n"&&E<F.length;E++){C++}return C};function A(){var G=document.getElementById(this.Id);var J="";var C=0;var L=this.Text;if(this.LastChar!=-1){L=this.Text.substring(0,this.LastChar)}C=this.GetCurLine();var M=C-this.NumOfLinesBeforeCurrentLine;if(M<0){M=0}var H=0;for(var E=0;E<M;H++){if(L.charAt(H)=="\n"){E++}}endLine=M+this.NumOfLines;var K;if(this.BWordsMode==false){for(H=0,E=0;H<L.length;H++){if(E>=M&&E<endLine){J+="<table id='"+this.GetStringId(E)+"' cellspacing='0' cellpadding='0' border='0'><tr>"}else{J+="<table id='"+this.GetStringId(E)+"' cellspacing='0' cellpadding='0' border='0' style='display: none'><tr>"}for(var F=0;F<this.StrLength&&H<L.length&&L.charAt(H)!="\n";F++,H++){J+="<td>";var D=false;if(this.Index>H){D=true}J+=this.LetterSpan(H,L.charAt(H),D);J+="</td>"}if(L.charAt(H)=="\n"){J+="<td>";J+=this.LetterSpan(H,"&nbsp;");J+="</td>";E++}J+="</tr></table>"}}else{var I=0;for(H=0,E=0;H<L.length;H++){if(E>=M&&E<endLine){J+="<table cellspacing='0' cellpadding='0' border='0'><tr id='"+this.GetStringId(E)+"'>"}else{J+="<table cellspacing='0' cellpadding='0' border='0'><tr id='"+this.GetStringId(E)+"' style='display: none'>"}for(var F=0;F<this.StrLength&&H<L.length;F++,H++){if(L.charAt(H)==" "||L.charAt(H)=="\n"){J+="<td>";var D=false;if(this.Index>I){D=true}J+=this.LetterSpan(I,this.GetWord(I,L),D);J+="</td>";I++}if(L.charAt(H)=="\n"){break}}if(L.charAt(H)=="\n"){J+="<td>";J+=EmptySpan("&nbsp;");J+="</td>";E++}J+="</tr></table>"}this.NumOfWords=I}this.WholeTextNumOfLines=E;for(;E<this.NumOfLines;E++){J+="<table cellspacing='0' cellpadding='0' border='0'><tr><td>&nbsp;</td></tr></table>"}this.NumOfLinesAtText=E;G.innerHTML=this.EmptyField.HTMLPreInputField(this.Id)+J+this.EmptyField.HTMLPostInputField()}}function TEmptyField(a,c,h){this.Style=a;this.HTMLPreInputField=e;this.HTMLPreInputField2=g;this.HTMLPostInputField=d;this.HTMLPostInputField2=j;this.Bk=c;this.Height=h;this.RowHeight=0;this.RowWidth=0;this.SetRowHeight=k;this.GetRowHeight=b;this.SetRowWidth=f;this.GetRowWidth=l;function k(m){this.RowHeight=m}function b(){return this.RowHeight}function f(m){this.RowWidth=m}function l(){return this.RowWidth}function e(o){var m="";if(this.Height!=0&&this.Height!=undefined){m=" height='"+String(this.Height)+"'"}var n="<table border=0 id='"+o+"Table' border=0 cellspacing=0 cellpadding=0 width='600' class='ex"+this.Style+"Table'><tr height='4px'><td class='ex"+this.Style+"CornerTopLeft' width='4px'></td><td height='4px' class='ex"+this.Style+"BkTop'></td><td width='4px' height='4px' class='ex"+this.Style+"CornerTopRight'></td></tr><tr><td width='4px' class='ex"+this.Style+"BkLeft'></td><td  valign='middle'><table border=0 cellspacing=0 cellpadding=7 width=100% align='center' bgcolor='"+this.Bk+"'><tr><td valign='middle'><span class='exercise"+this.Style+"'>";return n}function d(){return"</span></td></tr></table></td><td width='4px' class='ex"+this.Style+"BkRight'></td></tr><tr height='4px'><td width='4px' height='4px' class='ex"+this.Style+"CornerBottomLeft'></td><td  height='4px' class='ex"+this.Style+"BkBottom'></td><td width='4px'  height='4px' class='ex"+this.Style+"CornerBottomRight'></td></tr></table>"}function g(o){var m="";if(this.Height!=0&&this.Height!=undefined){m=" height='"+String(this.Height)+"'"}var n="<table id='"+o+"Table' border=0 cellspacing=0 cellpadding=0 width='600' class='ex"+this.Style+"Table'><tr height='4px'><td class='ex"+this.Style+"CornerTopLeft' width='4px'></td><td height='4px' class='ex"+this.Style+"BkTop'></td><td width='4px' height='4px' class='ex"+this.Style+"CornerTopRight'></td></tr><tr><td width='4px' class='ex"+this.Style+"BkLeft'></td><td  valign='middle'><table border=0 cellspacing=0 cellpadding=5 width=100% align='center' bgcolor='"+this.Bk+"'><tr><td valign='middle'><span class='exercise"+this.Style+"'>";return n}function j(){return"</span></td></tr></table></td><td width='4px' class='ex"+this.Style+"BkRight'></td></tr><tr height='4px'><td width='4px' height='4px' class='ex"+this.Style+"CornerBottomLeft'></td><td  height='4px' class='ex"+this.Style+"BkBottom'></td><td width='4px'  height='4px' class='ex"+this.Style+"CornerBottomRight'></td></tr></table>"}this.HTMLPreCiteField=function(m){if(m==undefined){m="Cite"}return"<TABLE class='ex"+m+"Table' WIDTH=100% BORDER='0' CELLPADDING=0 CELLSPACING=0>	<TR VALIGN=TOP height='4px'>		<TD WIDTH='19px'>		</TD>		<TD id='IDCiteCornerTopLeft' class='ex"+m+"CornerTopLeft' width='4px'>		</TD>		<TD id='IDCiteTop' class='ex"+m+"BkTop'>		</TD>		<TD id='IDCiteCornerTopRight' class='ex"+m+"CornerTopRight' width='4px'>		</TD>	</TR>	<TR VALIGN=TOP height='35px'>		<TD width='4px'><font size='2pt' face='Times New Roman'>&nbsp;</font>		</TD>		<TD id='IDCiteLeft' class='ex"+m+"BkLeft' WIDTH='4px'>		</TD>		<TD ROWSPAN=3>"};this.HTMLPostCiteField=function(m){if(m==undefined){m="Cite"}return"</TD>		<TD id='IDCiteRight' class='ex"+m+"BkRight' WIDTH='4px'>		</TD>	</TR>	<TR VALIGN=TOP style='height: 19px'>		<TD id='IDCiteSpeech' style='height: 19px' class='ex"+m+"SpeechBk' WIDTH='19px'>		</TD>		<TD id='IDCiteSpeechFiller' WIDTH='4px' class='exCiteSpeechFiller'		</TD>		<TD id='IDCiteRight2' class='ex"+m+"BkRight' WIDTH='4px'>		</TD>	</TR>	<TR VALIGN=TOP height='35px'>		<TD WIDTH='19px'><font size='2pt' face='Times New Roman'>&nbsp;</font>   </TD>		<TD id='IDCiteLeft2'  class='ex"+m+"BkLeft' WIDTH='4px'>		</TD>		<TD id='IDCiteRight3' WIDTH='4px' class='ex"+m+"BkRight' >		</TD>	</TR>	<TR VALIGN=TOP height='4px'>		<TD WIDTH='19px'>		</TD>		<TD id='IDCiteCornerBottomLeft' class='ex"+m+"CornerBottomLeft' WIDTH='4px'>		</TD>		<TD id='IDCiteBottom' class='ex"+m+"BkBottom'>		</TD>		<TD id='IDCiteCornerBottomRight' class='ex"+m+"CornerBottomRight' WIDTH='4px'>		</TD>	</TR></TABLE>"};this.HTMLPreResultMessageField=function(){var m="";if(this.Height!=0&&this.Height!=undefined){m=" height='"+String(this.Height)+"'"}var n="<table width='100%' border=0 cellspacing=0 cellpadding=0 class='exResultMessageTable'><tr height='4px'><td id='IDTdResultMessageCornerTopLeft' class='exResultMessageCornerTopLeft' width='4px'></td><td id='IDTdResultMessageBkTop' height='4px' class='exResultMessageBkTop'></td><td id='IDTdResultMessageCornerTopRight' width='4px' height='4px' class='exResultMessageCornerTopRight'></td></tr><tr><td id='IDTdResultMessageBkLeft' width='4px' class='exResultMessageBkLeft'></td><td valign='middle'><table border=0 cellspacing=0 cellpadding=7 width=100% align='center' bgcolor='"+this.Bk+"'><tr><td valign='middle'>";return n};this.HTMLPostResultMessageField=function(){return"</td></tr></table></td><td id='IDTdResultMessageBkRight' width='4px' class='exResultMessageBkRight'></td></tr><tr height='4px'><td id='IDTdResultMessageCornerBottomLeft' width='4px' height='4px' class='exResultMessageCornerBottomLeft'></td><td id='IDTdResultMessageBkBottom' height='4px' class='exResultMessageBkBottom'></td><td id='IDTdResultMessageCornerBottomRight' width='4px'  height='4px' class='exResultMessageCornerBottomRight'></td></tr></table>"}}function TInputField2(s,p,n,l){this.Id=s;this.LetterId="Letter";this.StrLength=p;this.NumOfLines=n;this.NumOfLinesBeforeCurrentLine=l;this.Text=String("");this.InnerHTML=String("");this.Index=0;this.SetText=k;this.SetCaret=E;this.Render=D;this.SetLastChar=f;this.SetBkRedCurrentChar=j;this.SetBkGreenCurrentChar=C;this.LetterSpan=h;this.EmptyField=new TEmptyField("Text","#f6f6f6");this.GetEmptyField=o;this.LastChar=-1;this.MarkError=false;this.BkCurrentCharColor="green";this.CurrentCharColor="white";this.GetLetterSpanId=a;this.SetCharBkColor=d;this.SetCharColor=v;this.GetIndex=A;this.GetCurLine=c;this.GetStringId=m;this.StepForward=b;this.SetError=e;this.GoToBegOfLine=t;this.SetChar=w;this.AppendLastChar=g;this.GoToBeg=q;this.ClearAfterError=u;this.PlaceHere=B;this.SetSpanVisible=z;this.SetSpanInvisible=y;this.NumOfLinesAtText=0;this.CurLine=0;this.ShowElement=x;this.BWordsMode=false;this.CurNumOfWord=0;this.NumOfWords=0;this.EnteredText="";this.WordSymbolIndex=0;this.bUseFragmentLength=false;this.SetUseFragmentLength=function(F){this.bUseFragmentLength=F};this.AddToEnteredText=function(F){this.EnteredText+=F};this.SetWordsMode=function(F){this.BWordsMode=F;this.CurNumOfWord=0};this.GetCurNumOfWord=function(){return this.CurNumOfWord};this.NextWord=function(){this.CurNumOfWord++};this.ClearCurWord=function(){this.CurWord="";this.WordSymbolIndex=0};this.GetCurWord=function(){return this.CurWord};this.AddToCurWord=function(H){var G=document.getElementById(this.GetLetterSpanId(this.CurNumOfWord));var F=G.innerHTML;F+=H;this.CurWord=F;G.innerHTML=F;this.WordSymbolIndex++};this.GetWordSymbolIndex=function(){return this.WordSymbolIndex};this.GetWordNum=function(F){var G=document.getElementById(this.GetLetterSpanId(F));if(G==undefined){alert("Can't get word number "+F);return}return document.getElementById(this.GetLetterSpanId(F)).innerHTML};function B(){return BeginSpan("id",this.Id)+EndSpan()}function o(){return this.EmptyField}function a(F){return this.Id+this.LetterId+String(F)}function h(G,I,H,F){var J=I;if(J==" "){J="&nbsp;"}if(F){return"<b class='Input2Class1'></b><div id='"+this.GetLetterSpanId(G)+"' class='Input2Class2Visible'>"+J+"</div><b class='Input2Class1'></b>"}else{return"<b class='Input2Class1'></b><div id='"+this.GetLetterSpanId(G)+"' class='Input2Class2Invisible'>"+J+"</div><b class='Input2Class1'></b>"}}this.WordModeWordSpan=function(F){if(F==" "){F="&nbsp;"}return"<b class='Input2Class1'></b><div class='Input2Class2Visible'>"+word_+"</div><b style='Input2Class1'></b>"};this.WordModeLetterSpan=function(F,H){var I=H;var G="visibility: hidden;";if(I==" "){I="&nbsp;"}return"<span id='"+this.GetLetterSpanId(F)+"' style='"+G+"'>"+I+"</span>"};function k(G){var F=document.getElementById(this.Id);this.Text=G;this.WordSymbolIndex=0;for(i=0;i<this.Text.length;i++){this.InnerHTML+=this.LetterSpan(i,this.Text.charAt(i))}}function r(){return this.Text}function e(F){this.AppendLastChar(F);this.SetCharColor(this.Index,"#AB0000")}this.SetBkRed=function(F){document.getElementById(this.GetLetterSpanId(F)).style.background="#AB0000"};this.ClearBk=function(F){document.getElementById(this.GetLetterSpanId(F)).style.background=""};this.TrimLastChar=function(){this.ClearBk(this.Index);document.getElementById(this.GetLetterSpanId(this.Index)).style.visibility="hidden";this.SetCharColor(this.Index,"");this.SetChar(this.Index,this.Text.charAt(this.Index))};function g(G){var F=G;if(F=="\r"){F="&#182;"}if(F==" "){document.getElementById(this.GetLetterSpanId(this.Index)).innerHTML="&nbsp;";document.getElementById(this.GetLetterSpanId(this.Index)).style.visibility="visible";this.SetBkRed(this.Index)}else{document.getElementById(this.GetLetterSpanId(this.Index)).innerHTML=F;document.getElementById(this.GetLetterSpanId(this.Index)).style.visibility="visible"}}function f(F){this.LastChar=F}function j(){this.BkCurrentCharColor="red"}function C(){this.BkCurrentCharColor="green"}function x(G,F){var H=document.getElementById(this.GetStringId(G));if(F){H.style.display=""}else{H.style.display="none"}}function E(F,G){this.Index=F}function q(){this.SetCaret(0,true);this.CurLine=0;this.CurNumOfWord=0;this.Render()}function A(){return this.Index}function z(F){document.getElementById(this.GetLetterSpanId(F)).style.visibility="visible"}function y(F){document.getElementById(this.GetLetterSpanId(F)).style.visibility="hidden"}function b(){var G;if(this.bUseFragmentLength==false){G=this.GetIndex()+1}else{G=this.GetIndex()+TextFragmentsData.GetLengthAddFrag(CaretPos)}if(G==0){this.CurLine=0;if(bIsBackward==true){this.Render()}}else{if(G>0){if(this.BWordsMode==false){if(this.Text.charAt(G-1)=="\n"){this.CurLine++}}else{if(IsWordLastAtString(this.Text,this.GetIndex())){this.CurLine++}}}}if(this.CurLine!=this.PrevLine&&this.CurLine>this.NumOfLinesBeforeCurrentLine&&this.CurLine<this.NumOfLinesAtText-1){this.ShowElement(this.CurLine-this.NumOfLinesBeforeCurrentLine-1,false);this.ShowElement(this.CurLine+1,true)}for(var F=this.Index;F<G;F++){this.SetSpanVisible(F)}this.Index=G}function w(F,G){if(G!=" "){document.getElementById(this.GetLetterSpanId(F)).innerHTML=G}else{document.getElementById(this.GetLetterSpanId(F)).innerHTML="&nbsp;"}}function u(){this.ClearBk(this.Index);this.SetCharColor(this.Index,"");this.SetChar(this.Index,this.Text.charAt(this.Index))}function t(){var F=this.GetIndex();if(this.Text.charAt(F)=="\n"){F--}this.ClearAfterError();for(;F>0&&this.Text.charAt(F)!="\n";F--){this.SetSpanInvisible(F)}if(this.Text.charAt(F)=="\n"){F++}else{this.SetSpanInvisible(F)}this.SetCaret(F)}function d(G,F){document.getElementById(this.GetLetterSpanId(G)).style.background=F}function v(G,F){document.getElementById(this.GetLetterSpanId(G)).style.color=F}function c(F){return this.CurLine}function m(F){return"InputField2String"+String(F)}function D(){var J=document.getElementById(this.Id);var M="";var F=0;var N=this.Text;if(this.LastChar!=-1){N=this.Text.substring(0,this.LastChar)}var F=this.GetCurLine();var O=F-this.NumOfLinesBeforeCurrentLine;if(O<0){O=0}var K=0;for(var H=0;H<O;K++){if(N.charAt(K)=="\n"){H++}}endLine=O+this.NumOfLines;if(this.BWordsMode==false){for(K=0,H=0;K<N.length;){if(H>=O&&H<endLine){M+="<table id='"+this.GetStringId(H)+"' cellspacing='0' cellpadding='0' border='0'><tr>"}else{M+="<table id='"+this.GetStringId(H)+"' cellspacing='0' cellpadding='0' border='0' style='display: none'><tr>"}for(var I=0;I<this.StrLength&&K<N.length&&N.charAt(K)!="\n";I++,K++){M+="<td>";M+=this.LetterSpan(K,N.charAt(K));M+="</td>"}if(N.charAt(K)=="\n"){M+="<td>";M+=this.LetterSpan(K,"&nbsp;");M+="</td>";H++;K++}M+="</tr></table>"}}else{var L=0;for(K=0,H=0;K<N.length;K++){if(H>=O&&H<endLine){M+="<table cellspacing='0' cellpadding='0' border='0'><tr id='"+this.GetStringId(H)+"'>"}else{M+="<table cellspacing='0' cellpadding='0' border='0'><tr id='"+this.GetStringId(H)+"' style='display: none'>"}for(var I=0;I<this.StrLength&&K<N.length;I++,K++){if(N.charAt(K)==" "||N.charAt(K)=="\n"){M+="<td>";var G=false;if(this.Index>L){G=true}M+=this.LetterSpan(L,"",G,true);M+="</td>";L++}if(N.charAt(K)=="\n"){break}}if(N.charAt(K)=="\n"){M+="<td>";M+=EmptySpan("&nbsp;");M+="</td>";H++}M+="</tr></table>"}}for(;H<this.NumOfLines;H++){M+="<table cellspacing='0' cellpadding='0' border='0'><tr><td>&nbsp;</td></tr></table>"}this.NumOfLinesAtText=H;J.innerHTML=this.EmptyField.HTMLPreInputField(this.Id)+M+this.EmptyField.HTMLPostInputField()}}function TRoundField(c,a,b){this.Value="";this.Id=c;this.BkColor=b;this.Color=a;this.Style1="display: block; height: 1px; overflow: hidden; font-size:1px; margin: 0 1px; background-color: "+this.BkColor;this.Style2="padding: 0 2px; margin: 0; background-color: "+this.BkColor+"; font-weight: bold;  text-family: Arial; text-size: 11px; text-align: left; color: "+this.Color+"; vertical-align: top;";this.StrPre="";this.StrPost="";this.SetStrPre=function(d){this.StrPre="<td><span style='font-family: Arial; font-size: 8pt'>"+d+"</span></td>"};this.SetStrPost=function(d){this.StrPost="<td><span style='font-family: Arial; font-size: 8pt'>"+d+"</span></td>"};this.Place=function(){var d="<table><tr>"+this.StrPre+"<td><b style='"+this.Style1+"'></b><div id='"+this.Id+"' style='"+this.Style2+"'></div><b style='"+this.Style1+"'></b></td>"+this.StrPost+"</tr></table>";return d};this.Update=function(d){};this.Show=function(){var d=document.getElementById(this.Id);d.style.visibility="visible"};this.Hide=function(){var d=document.getElementById(this.Id);d.style.visibility="hidden"}}function TTimeRoundField(e,a,b){this.Value="";this.Id=e;this.IdMin=this.Id+"Min";this.IdSec=this.Id+"Sec";this.BkColor=b;this.Color=a;this.Style1="display: block; height: 1px; overflow: hidden; font-size:1px; margin: 0 1px; background-color: "+this.BkColor;this.Style2="padding: 0 2px; margin: 0; background-color: "+this.BkColor+"; font-weight: bold; text-family: Arial; text-size: 11px; text-align: left; color: "+this.Color+"; vertical-align: top;";this.StrPre="";this.StrPost="";this.Place=c;this.Update=d;function c(){var f="<table><tr><td><b style='"+this.Style1+"'></b><div id='"+this.IdMin+"' style='"+this.Style2+"'></div><b style='"+this.Style1+"'></b></span></td><td><span style='font-family: Arial; font-size: 8pt'>&nbsp;минут</span></td><td><b style='"+this.Style1+"'></b><div id='"+this.IdSec+"' style='"+this.Style2+"'></div><b style='"+this.Style1+"'></b></td><td><span style='font-family: Arial; font-size: 8pt'>&nbsp;секунд</span></td></tr></table>";return f}function d(f,g){document.getElementById(this.IdMin).innerHTML=f;document.getElementById(this.IdSec).innerHTML=g}}TTextFragmentsData=function(){this.BlockingPositions=new Array();this.LengthAddFrag=new Array();this.SetBlockingWords=function(d){var b=0;this.BlockingPositions.splice(0,this.BlockingPositions.length);for(var c=0;c<d.length;c++){switch(d.charAt(c)){case" ":case"\n":for(var a=c-1;d.charAt(a)!=" "&&d.charAt(a)!="\n"&&d.charAt(a)!="«"&&a>0;a--){}if(d.charAt(a)!="«"){this.BlockingPositions.push(b)}b++;break;case"«":break;default:}}};this.IsWordBlocked=function(a){for(var b=0;b<this.BlockingPositions.length;b++){if(this.BlockingPositions[b]==a){return true}}return false};this.GetFragmentWordNum=function(f,b){var d=-1;var e="";for(var c=0;c<f.length;c++){if(f.charAt(c)=="«"){d++}if(d==b){for(var a=c+1;a<f.length&&f.charAt(a)!="»";a++){e+=f.charAt(a)}return e}}};this.ReplaceFragText=function(f,e){var d="";var c=-1;for(var b=0;b<f.length;b++){if(f.charAt(b)=="«"){c++;var g=this.GetFragmentWordNum(e,c);if(g==undefined){continue}this.LengthAddFrag.push(g.length);d+=g;for(var a=b+1;a<f.length&&f.charAt(a)!="»";a++){}b=a;continue}d+=f.charAt(b);this.LengthAddFrag.push(1)}return d};this.GetLengthAddFrag=function(a){if(a<this.LengthAddFrag.length){return this.LengthAddFrag[a]}else{alert("[!] GetLengthAddFrag: Array range error")}}};var TextFragmentsData=new TTextFragmentsData();function flashInputOnBlur(){}function flashInputMouseIn(){}function flashInputMouseOut(){}var exerciseIniter={Init:function(){this.Activate();this.InitLanguage();SetCurKeyboardKey()}};function TPhotoInfo(){this.IsHint=function(b,c,a){switch(c){case 1:case 6:if(a==0){return true}return false;default:}return false};this.GetNumOfPic=function(b,c,a){switch(c){case 1:case 6:if(a==0){return parseInt(b)}else{return parseInt(b)+100}default:return 201}}}var PhotoInfo=new TPhotoInfo();function TResultImg(c,b,a){this.ID=c;this.Path=b;this.Ext=a;this.GetNumOfPic=function(e,f,d){return PhotoInfo.GetNumOfPic(e,f,d)};this.Update=function(e,f,d){var g=this.Path+String(this.GetNumOfPic(e,f,d))+this.Ext;document.getElementById(this.ID).src=g}}String.prototype.SelectLinks=function(){var c=this;var b=c.match(/(http:\/\/|https:\/\/|http:\/\/www\.|www\.)([0-9a-zA-Z]+(\.|\/)){1,16}[a-zA-Z]+(\/)?(\?[0-9a-zA-Z]+=[%0-9a-zA-Z]+)?\S+/g);if(b!=null){for(var a=0;a<b.length;a++){mess3=c.replace(b[a],"<a href='"+b[a]+"'>"+b[a]+"</a>");c=mess3}}return c};var SpeedObj=new TProgressObject("SpeedObj",13,32,"#5FAC20","#939393");var ProgressObj=new TProgressObject("ProgressObj",13,32,"#5E5E5E","#939393");var ProgressObj2=new TProgressObject2("ProgressObj",13,32,"#5E5E5E","#939393");function TProgressObject(e,a,b,d,c){this.NumOfCells=b;this.ActiveColor=d;this.InactiveColor=c;this.ID=e;this.Height=a;this.Place=Place;this.Update=Update;this.UpdatePercents=UpdatePercents;this.NumOfActiveBars=0}function Place(){var b="";b="<table border='0' cellspacing='1' cellpadding='0' height='"+this.Height+"'><tr>";for(var a=0;a<this.NumOfCells-1;a++){b+="<td id='"+this.ID+String(a)+"' style='background: "+this.InactiveColor+"' width='3px'></td>"}b+="</tr></table>";return b}function Update(a){var c;for(var b=0;b<a;b++){c=this.ID+String(b);if(document.getElementById(c)!=undefined){document.getElementById(c).style.backgroundColor=this.ActiveColor}}for(;b<this.NumOfCells;b++){c=this.ID+String(b);if(document.getElementById(c)!=undefined){document.getElementById(c).style.backgroundColor=this.InactiveColor}}}function UpdatePercents(c){if(c>100){c=100}var a=this.NumOfActiveBars;this.NumOfActiveBars=Math.floor((c/100)*this.NumOfCells);if(a==this.NumOfActiveBars){return}var d;for(var b=a;b<this.NumOfActiveBars;b++){d=this.ID+String(b);if(document.getElementById(d)!=undefined){document.getElementById(this.ID+String(b)).style.backgroundColor=this.ActiveColor}}for(b=a-1;b>=this.NumOfActiveBars;b--){d=this.ID+String(b);if(document.getElementById(d)!=undefined){document.getElementById(this.ID+String(b)).style.backgroundColor=this.InactiveColor}}}function TProgressObject2(e,a,b,d,c){this.NumOfCells=b;this.ActiveColor=d;this.InactiveColor=c;this.ID=e;this.Height=a;this.NumOfActiveBars=0;this.GetDigitalViewID=function(){return this.ID+"DigitalValue"};this.GetDigitalView=function(){return document.getElementById(this.GetDigitalViewID())};this.Place=function(){var g="";g="<table border='0' cellspacing='1' cellpadding='0' height='"+this.Height+"'><tr>";for(var f=0;f<this.NumOfCells-1;f++){g+="<td id='"+this.ID+String(f)+"' style='background: "+this.InactiveColor+"' width='3px'></td>"}g+="</tr></table>";return g};this.Update=function(f){var h;for(var g=0;g<f;g++){h=this.ID+String(g);if(document.getElementById(h)!=undefined){document.getElementById(h).style.backgroundColor=this.ActiveColor}}for(;g<this.NumOfCells;g++){h=this.ID+String(g);if(document.getElementById(h)!=undefined){document.getElementById(h).style.backgroundColor=this.InactiveColor}}};this.UpdatePercents=function(h){if(h>100){h=100}var f=this.NumOfActiveBars;this.NumOfActiveBars=Math.floor((h/100)*this.NumOfCells);if(f==this.NumOfActiveBars){return}var j;for(var g=f;g<this.NumOfActiveBars;g++){j=this.ID+String(g);if(document.getElementById(j)!=undefined){document.getElementById(this.ID+String(g)).style.backgroundColor=this.ActiveColor}}for(g=f-1;g>=this.NumOfActiveBars;g--){j=this.ID+String(g);if(document.getElementById(j)!=undefined){document.getElementById(this.ID+String(g)).style.backgroundColor=this.InactiveColor}}}}function CloseRedoCloseMouseOver(objName){eval(objName).HighlightClose()}function CloseRedoRedoMouseOver(objName){eval(objName).HighlightRedo()}function CloseRedoMouseOut(objName){eval(objName).HighlightNone()}function TCloseRedoObj(b,c,e,a,d){this.ObjName=b;this.Place=Place;this.CloseAlt=a;this.RedoAlt=d;this.CloseFunc=c;this.RedoFunc=e;this.MapName="mapCloseRedo"+this.ObjName;this.ID=this.ObjName;this.IDImg=this.ObjName+"Img";this.IDImg1="IDCloseRedoImg1"+this.ObjName;this.IDImg2="IDCloseRedoImg2"+this.ObjName;this.IDImg3="IDCloseRedoImg3"+this.ObjName;this.SrcImg=new Array(Environment.getResourceDirectory()+"img/Features/CloseRedo.PNG",Environment.getResourceDirectory()+"img/Features/CloseRedoCloseHigh.PNG",Environment.getResourceDirectory()+"img/Features/CloseRedoRedoHigh.PNG");this.ExportAreas=function(){var f="";f+="<MAP name='"+this.MapName+"'>";f+="<AREA shape='circle' coords='74, 16, 15' title='"+this.CloseAlt+"' onmouseover='CloseRedoCloseMouseOver(\""+this.ObjName+"\")' onmouseout='CloseRedoMouseOut(\""+this.ObjName+"\")' onclick='"+this.CloseFunc+"();'>";f+="<AREA shape='circle' coords='28, 41, 30' title='"+this.RedoAlt+"' onmouseover='CloseRedoRedoMouseOver(\""+this.ObjName+"\")' onmouseout='CloseRedoMouseOut(\""+this.ObjName+"\")' onclick='"+this.RedoFunc+"();'>";f+="</MAP>";return f};this.Generate=function(){var f="";f+=this.ExportAreas();if(isOpera()){f+="<div style='display: none' id='"+this.ID+"'><div id='"+this.IDImg1+"' style='position: relative; visibility: visible; z-index: 0; width: 150px;'><img align='right' style='cursor: pointer' usemap='#"+this.MapName+"' src='"+this.SrcImg[0]+"'></div><div id='"+this.IDImg2+"' style='position: relative; top: -71px; visibility: hidden; z-index: 1; width: 150px;'><img align='right' style='cursor: pointer' usemap='#"+this.MapName+"' src='"+this.SrcImg[1]+"'></div><div id='"+this.IDImg3+"' style='position: relative; top: -142px; visibility: hidden; z-index: 2; width: 150px;'><img align='right' style='cursor: pointer' usemap='#"+this.MapName+"' src='"+this.SrcImg[2]+"'></div></div>"}else{f+="<span style='cursor: pointer'>"+Img(this.SrcImg[0],this.MapName,this.IDImg)+"</span>"}return f};this.Get=function(){return document.getElementById(this.ID)};this.Show=function(f){if(!isOpera()){return}if(f){this.Get().style.display=""}else{this.Get().style.display="none"}};this.ShowEl=function(f){document.getElementById(this.IDImg).src=this.SrcImg[f]};this.ShowElOpera=function(g){var h=new Array(document.getElementById(this.IDImg1),document.getElementById(this.IDImg2),document.getElementById(this.IDImg3));for(var f=0;f<3;f++){if(f==g){h[f].style.visibility="visible"}else{h[f].style.visibility="hidden"}}};this.HighlightClose=function(){if(isOpera()){this.ShowElOpera(1)}else{this.ShowEl(1)}};this.HighlightRedo=function(){if(isOpera()){this.ShowElOpera(2)}else{this.ShowEl(2)}};this.HighlightNone=function(){if(isOpera()){this.ShowElOpera(0)}else{this.ShowEl(0)}}}function TMiksanatik(){this.Generate=a;function a(){var b="";b+=Img(Environment.getResourceDirectory()+"img/Miksanatik/mainMiksanatik.PNG");return b}}function TTaskCaption(b){if(b==undefined){alert("Exception: TTask(num) - num is undefined")}this.ID="TaskCaption";this.Number=b;this.Generate=a;this.IsTaskCaption=true;function a(){var c="";c+=BeginSpan("id",this.ID)+Locale.exercise+" "+BeginFont("style","color: green; font-weight: bold")+String(this.Number)+EndFont()+EndSpan();return c}this.SetTaskCaption=function(c){this.Number=c};this.SetSpeedTestCaption=function(){};this.Show=function(c){if(c==false){document.getElementById(this.ID).style.display="none"}else{document.getElementById(this.ID).style.display=""}}}function TUserCaption(c){this.UserName=c;this.ID="UserCaption";this.Generate=a;this.Set=b;function a(){var d="";d+="<b>"+BeginSpan("id",this.ID)+this.TrimUserCaption(this.UserName)+EndSpan()+"</b>";return d}function b(d){this.UserName=d}this.GetUserName=function(){return this.UserName};this.IsEmpty=function(){return(this.UserName=="")};this.TrimUserCaption=function(d){if(d.length>17){return d.slice(0,16)+"&hellip;"}return d}}function TLastError(){this.CiteArr=Locale.lastErrors;this.Get=function(){var a=Math.floor(Math.random()*this.CiteArr.length+0.5);return this.CiteArr[a]}}var LastErrorObj=new TLastError();function TWriter(g,f){if(g==undefined||f==undefined){alert("TWriter(id, zIndex): exception - id == undefined || zIndex == undefined");return}this.ID=g;this.ZIndex=f;this.GenerateDiv=d;this.Write=b;this.Clear=c;this.Show=e;this.Hide=a;this.GenerateDiv();function d(){Write("<div id='"+this.ID+"' style='z-index: "+this.ZIndex+"'></div>")}function b(h){document.getElementById(this.ID).innerHTML+=h}function c(){document.getElementById(this.ID).innerHTML=""}function e(){document.getElementById(this.ID).style.display=""}function a(){document.getElementById(this.ID).style.display="none"}}var courseUtilities={getFlashNameById:function(a){switch(a){case"1":return"Russian";case"2":return"Numeric";case"3":return"Ukranian";case"4":return"English";case"5":return"German";case"6":return"Italian";case"7":return"French"}}};var commonInfo={Language:"1",CourseID:0,TypeOfExercise:"",iteration:1,getLayoutText:function(){return this.getFlashLanguage()+"LayoutText"},getDefaultLayout:function(){return"0"},setDefaultSpeed:function(a){this.avSpeed=a},getDefaultSpeed:function(a){return this.avSpeed}};var exerciseInfo={BResponseReceived:false,BRequested:false,SortID:"",ID:0,LessonNumber:"",ExerciseNumber:"",MaxNumOfMistakes:"",RegWarning:"",HighSpeed:"",Difficulty:"",Text:"",Text2:"",Language:"Russian",UserName:"",Redirect:"",RefToNext:"",RefToLast:"",PhotoCaption:"",writeGoLinks:function(){var a=wrapParameter("this.Redirect")+", "+wrapParameter("this.IDNext")+", "+wrapParameter("this.RefToNext")+", "+wrapParameter("this.RefToLast");document.write(a)},isExam:false,typeExam:"speedTest",examType:"startExam",Reset:function(){this.BResponseReceived=false;this.BRequested=false},IsResponseReceived:function(){return this.BResponseReceived},IsRequested:function(){return this.BRequested},scorm:{lastExercise:"",initById:function(){if(exerciseInfo.ID!=undefined){var c=exercises[exerciseInfo.ID];var b=exerciseInfo.ID.indexOf(".");exerciseInfo.LessonNumber=exerciseInfo.ID.substring(0,b);exerciseInfo.ExerciseNumber=exerciseInfo.ID.substring(b+1,exerciseInfo.ID.length);for(var a=1;exercises[exerciseInfo.LessonNumber+"."+String(a)]!=undefined;a++){}this.lastExercise=a-1;exerciseInfo.MaxNumOfMistakes=c.max_errors;commonInfo.TypeOfExercise=c.type;exerciseInfo.Text=c.text;exerciseInfo.Text2=c.text2;exerciseInfo.PhotoCaption=c.photo_caption}}}};function TSpeedTestInfo(){this.BResponseReceived=false;this.BRequested=false;this.Text="";this.UserName="";this.ID=-1;this.RefToLast="";this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested};this.SimFormed=function(){this.BRequested=true;this.BResponseReceived=true}}function TExamInfo(){this.Text="";this.UserName=""}function TCiteInfo(){this.BResponseReceived=false;this.BRequested=false;this.Text="";this.Author="";this.AuthorInfo="";this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested}}function TTodayResultInfo(){this.BResponseReceived=false;this.BRequested=false;this.NumOfTasks="";this.AvarageSpeed="";this.SymbolsTyped="";this.NumOfErrors="";this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested}}function TResultInfo(){this.BResponseReceived=false;this.BRequested=false;this.Mark="";this.Text="";this.Header="";this.RefToNext="";this.IDAdd="";this.IDRemove="";this.IDNext="";this.IDMax="";this.NextLessonNo="";this.NextExerciseNo="";this.FreeAttempts="";this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested}}function TResultSpeedTestInfo(){this.BResponseReceived=false;this.BRequested=false;this.Text="";this.Header="";this.nFlds=8;this.nCrit=0;this.sCrits=new Array("dt","avg_speed","errors");this.nPage=0;this.SetNumFields=function(a){this.nFlds=a};this.APos=new Array();this.ADate=new Array();this.AAvgSpeed=new Array();this.AErrors=new Array();this.Reset=function(){this.BResponseReceived=false;this.BRequested=false;this.nPage=0};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested}}function TErrorsInfo(){this.BResponseReceived=false;this.BRequested=false;this.MaxNumOfErrors=500;this.NumOfErrors=0;this.ErrorsDivider=25;this.Errors=new Array();this.BErrorUsed=new Array();this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested};this.MixErrors=function(){for(var b=0;b<this.NumOfErrors/2;b++){var d=Math.floor(Math.random()*this.NumOfErrors);if(d==this.NumOfErrors){d--}var a=Math.floor(Math.random()*this.NumOfErrors);if(a==this.NumOfErrors){a--}var c=this.Errors[d];this.Errors[d]=this.Errors[a];this.Errors[a]=c}};this.GetError=function(){var a;for(a=0;a<this.NumOfErrors;a++){if(this.BErrorUsed[a]==false){this.BErrorUsed[a]=true;return this.Errors[a]}}for(a=1;a<this.NumOfErrors;a++){this.BErrorUsed[a]=false}return this.Errors[0]};this.GetErrors=function(){return this.Errors}}function TKeyboardInfo(){this.BResponseReceived=false;this.BRequested=false;this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested}}function TRatingInfo(){this.BResponseReceived=false;this.BRequested=false;this.NumOfPages=0;this.UserPage=0;this.UserId=new Array("","","","","","","","","","");this.User=new Array("","","","","","","","","","");this.Attempts=new Array("","","","","","","","","","");this.AvarageSpeed=new Array("","","","","","","","","","");this.Number=new Array(0,0,0,0,0,0,0,0,0,0);this.Errors=new Array("","","","","","","","","","");this.Rating=new Array("","","","","","","","","","");this.Active=new Array("","","","","","","","","","");this.NumOfElemenents=0;this.Reset=function(){this.BResponseReceived=false;this.BRequested=false};this.IsResponseReceived=function(){return this.BResponseReceived};this.IsRequested=function(){return this.BRequested}}var RequestAnswer={};RequestAnswer.SpeedTestRepeat=function(xml){if(Environment.IsOnline()){var xmlDoc=xml.documentElement;SpeedTestInfo.Text=FormatToStrings(GetXMLElement(xmlDoc,"text"),40);try{SpeedTestInfo.UserName=GetXMLElement(xmlDoc,"user-name")}catch(e){}BUserLogin=(SpeedTestInfo.UserName!="");SpeedTestInfo.ID=GetXMLElement(xmlDoc,"text_id");commonInfo.CourseID=GetXMLElement(xmlDoc,"course_id");ExerciseText=FormatToStrings(SpeedTestInfo.Text,40)}else{with(SpeedTestInfo){Text=speedTest.getRandomText();UserName=scormWrapper.getLearnerName();ID=speedTest.id;Language=_offlineParams.language}}SpeedTestInfo.BResponseReceived=true;BUserLogin=(SpeedTestInfo.UserName!="");ExerciseText=SpeedTestInfo.Text;ExerciseText=FormatToStrings(SpeedTestInfo.Text,40);SpeedTestInfo.BResponseReceived=true};RequestAnswer.Errors=function(c){var a;var d;if(Environment.IsOnline()){var a;var d;var e=c.documentElement;for(d=0;d<ErrorsInfo.MaxNumOfErrors;d++){a=GetXMLElement(e,"text",d);if(a!=""){ErrorsInfo.Errors.push(a);ErrorsInfo.BErrorUsed.push(false)}else{break}}}else{for(var d=0,b=0;errors[b]!=undefined;d++){ErrorsInfo.Errors.push(errors[b]);ErrorsInfo.BErrorUsed.push(false);b+=_specMath.rand(1,Math.floor(ErrorsInfo.MaxNumOfErrors/ErrorsInfo.ErrorsDivider))}}ErrorsInfo.NumOfErrors=d;ErrorsInfo.MixErrors();ErrorsInfo.BResponseReceived=true};RequestAnswer.Rating=function(a){if(Environment.IsOnline()){var c=a.documentElement;var b=ResultPage.getNumPageUsers();for(i=0;i<b;i++){RatingInfo.User[i]="";RatingInfo.UserId[i]="";RatingInfo.Attempts[i]="";RatingInfo.AvarageSpeed[i]="";RatingInfo.Number[i]=0;RatingInfo.Errors[i]="";RatingInfo.Rating[i]=""}RatingInfo.NumOfPages=GetXMLElement(c,"pages");RatingInfo.UserPage=GetXMLElement(c,"page");if(RatingInfo.UserPage!=""){ResultPage.SetCurPage(parseInt(RatingInfo.UserPage)-1);try{ResultPage.CurPage=parseInt(RatingInfo.UserPage)-1;ResultPage.NumOfPages=parseInt(RatingInfo.NumOfPages);document.getElementById("IDResLsnSel").innerHTML=ResultPage.ResultPageSelector()}catch(f){}}var b=ResultPage.getNumPageUsers();for(i=0;i<b;i++){RatingInfo.Number[i]=GetXMLElement(c,"no",i);if(RatingInfo.Number[i]==""){break}RatingInfo.UserId[i]=GetXMLElement(c,"auser_id",i);RatingInfo.User[i]=GetXMLElement(c,"auser_name",i);RatingInfo.Attempts[i]=GetXMLElement(c,"attempts",i);RatingInfo.Errors[i]=GetXMLElement(c,"errors",i);RatingInfo.AvarageSpeed[i]=GetXMLElement(c,"avg_speed",i);RatingInfo.Rating[i]=GetXMLElement(c,"rating",i);RatingInfo.Active[i]=GetXMLElement(c,"active",i);var d=RatingInfo.Active[i]=="1"?true:false;if(d){commonInfo.setDefaultSpeed(RatingInfo.AvarageSpeed[i])}}RatingInfo.NumOfElemenents=i;ShowResultInnerByOption(RESULT_RATING_TABLE);ResultPage.UpdateUserTable()}RatingInfo.BResponseReceived=true};RequestAnswer.TodayResult=function(xml){if(Environment.IsOnline()){var stat=$(xml).find("stat");TodayResultInfo.NumAttempts=$(stat).find("attempts").text();TodayResultInfo.AvarageSpeed=$(stat).find("avg_speed").text();TodayResultInfo.SymbolsTyped=$(stat).find("length").text();TodayResultInfo.NumOfErrors=$(stat).find("errors").text();TodayResultInfo.BResponseReceived=true}else{with(TodayResultInfo){NumAttempts=_interface.sSkipData;AvarageSpeed=_interface.sSkipData;SymbolsTyped=_interface.sSkipData;NumOfErrors=_interface.sSkipData}}TodayResultInfo.BResponseReceived=true};RequestAnswer.CiteResult=function(xml){if(Environment.IsOnline()){var cite=$(xml).find("cite");CiteInfo.Text=$(cite).find("text").text();CiteInfo.Author=$(cite).find("author").text();CiteInfo.AuthorInfo=$(cite).find("author-info").text()}else{with(CiteInfo){var cNum=_specMath.rand(0,quotation.length-1);Text=quotation[cNum].text;Author=quotation[cNum].author;AuthorInfo=quotation[cNum].author_info}}CiteInfo.BResponseReceived=true};RequestAnswer.CiteUpdate=function(xml){if(Environment.IsOnline()){var cite=$(xml).find("cite");CiteInfo.Text=$(cite).find("text").text();CiteInfo.Author=$(cite).find("author").text();CiteInfo.AuthorInfo=$(cite).find("author-info").text()}else{with(CiteInfo){var cNum=_specMath.rand(0,quotation.length-1);Text=quotation[cNum].text;Author=quotation[cNum].author;AuthorInfo=quotation[cNum].author_info}}SetExerciseCite(CiteInfo);CiteInfo.BResponseReceived=true;if(GetExType()==32&&exerciseInfo.isExam==false){RequestSpeedRepeat()}else{if(exerciseInfo.isExam){SetExerciseText(FormatToStrings(ExamInfo.Text,40))}}};RequestAnswer.ExerciseResult=function(c){if(Environment.IsOnline()){var d=$(c).find("exercise");exerciseInfo.SortID=$(d).find("sort-id").text();exerciseInfo.LessonNumber=$(d).find("lesson-no").text();exerciseInfo.ExerciseNumber=$(d).find("exercise-no").text();exerciseInfo.MaxNumOfMistakes=$(d).find("errors").text();commonInfo.TypeOfExercise=parseInt($(d).find("type").text());exerciseInfo.RegWarning=$(d).find("regwarning").text();exerciseInfo.HighSpeed=$(d).find("highspeed").text();exerciseInfo.Difficulty=$(d).find("difficulty").text();exerciseInfo.Text=$(d).find("text").text();exerciseInfo.Redirect=$(d).find("redirect").text();exerciseInfo.Text2=$(d).find("text2").text();commonInfo.CourseID=$(d).find("course_id").text();commonInfo.iteration=$(d).find("iteration").text();exerciseInfo.UserName=$(d).find("user-name").text();exerciseInfo.RefToNext=$(d).find("next").text();exerciseInfo.PhotoCaption=$(d).find("photo-caption").text()}else{if(exerciseInfo.ID!=undefined){var d=exercises[exerciseInfo.ID];var b=exerciseInfo.ID.indexOf(".");exerciseInfo.LessonNumber=exerciseInfo.ID.substring(0,b);exerciseInfo.ExerciseNumber=exerciseInfo.ID.substring(b+1,exerciseInfo.ID.length);for(var a=1;exercises[exerciseInfo.LessonNumber+"."+String(a)]!=undefined;a++){}exerciseInfo.scorm.lastExercise=a-1;scormExchange.setNLastExercise(exerciseInfo.scorm.lastExercise);exerciseInfo.MaxNumOfMistakes=d.max_errors;commonInfo.TypeOfExercise=d.type;exerciseInfo.Text=d.text;exerciseInfo.Text2=d.text2;commonInfo.Language="1";commonInfo.CourseID=Environment.defaultCourse.offline}ExerciseInfo.UserName=scormWrapper.getLearnerName()}exerciseInfo.BResponseReceived=true};RequestAnswer.SpeedTest=function(xml){if(Environment.IsOnline()){var test=$(xml).find("test");SpeedTestInfo.Text=FormatToStrings($(test).find("text").text(),40);try{SpeedTestInfo.UserName=$(test).find("user-name").text()}catch(e){}SpeedTestInfo.ID=$(test).find("text_id").text();commonInfo.CourseID=$(test).find("course_id").text()}else{with(SpeedTestInfo){Text=FormatToStrings(speedTest.getRandomText(),40);UserName=scormWrapper.getLearnerName();BUserLogin=(UserName!="")}commonInfo.CourseID=Environment.defaultCourse.offline}SetExerciseUser(SpeedTestInfo.UserName);SpeedTestInfo.BResponseReceived=true;commonInfo.TypeOfExercise=32};RequestAnswer.ExamGot=function(){with(ExamInfo){Text=FormatToStrings(exam.text,40);UserName=scormWrapper.getLearnerName();BUserLogin=(UserName!="")}commonInfo.Language="Russian";commonInfo.CourseID=Environment.defaultCourse.offline;SetExerciseUser(ExamInfo.UserName);commonInfo.TypeOfExercise=32;exerciseInfo.IsExam=true};RequestAnswer.Result=function(xml){if(Environment.IsOnline()){var result=$(xml).find("result");ResultInfo.Rating=$(result).find("rating").text();ResultInfo.Header=$(result).find("header").text();ResultInfo.Text=$(result).find("text").text();with(ResultPage){RegRes=RegExRes}if(ResultPage.IsSetRefToNext()==false){ResultInfo.RefToNext=$(result).find("next_lesson").text();ResultPage.RefToNextHasSet(true)}ResultInfo.IDAdd=$(result).find("add_id").text();ResultInfo.IDRemove=$(result).find("remove_id").text();ResultInfo.IDNext=$(result).find("next_id").text();ResultInfo.IDMax=$(result).find("max_id").text();ResultInfo.TextRepeat=$(result).find("repeat").text();ResultInfo.RefToLast=$(result).find("last_lesson").text();ResultInfo.NextLessonNo=$(result).find("next_lesson_no").text();ResultInfo.NextLessonNoVirtual=$(result).find("next_lesson_no_virtual").text();ResultInfo.NextExerciseNo=$(result).find("next_exercise_no").text();ResultInfo.FreeAttempts=$(result).find("free_attempts").text()}else{var mark=scormUtils.mark.calculate(exerciseUserStatus.getNumErrors(),exerciseInfo.MaxNumOfMistakes);var lenHeader=resultTexts[mark]["header"].length;var headerArray=resultTexts[mark]["header"];ResultInfo.Header=headerArray[_specMath.rand(0,headerArray.length-1)];var textArray=resultTexts[mark]["text"];ResultInfo.Text=textArray[_specMath.rand(0,textArray.length-1)];with(ResultPage){RegRes=RegExRes}}handleChangeLesson();ResultInfo.BResponseReceived=true};RequestAnswer.ResultSpeedTest=function(xml){if(Environment.IsOnline()){var xmlDoc=xml.documentElement;ResultSpeedTestInfo.Header=GetXMLElement(xmlDoc,"header");ResultSpeedTestInfo.Text=GetXMLElement(xmlDoc,"text");ResultSpeedTestInfo.RefToLast=GetXMLElement(xmlDoc,"last_lesson");ResultSpeedTestInfo.Speed=GetXMLElement(xmlDoc,"current_speed");ResultSpeedTestInfo.SpeedNotation=GetXMLElement(xmlDoc,"current_speed_notation");ResultSpeedTestInfo.Errors=GetXMLElement(xmlDoc,"current_errors");ResultSpeedTestInfo.ErrorsNotation=GetXMLElement(xmlDoc,"current_errors_notation");ResultSpeedTestInfo.Attempts=pageUpdater.speedTest.getAttemptsByNumberAndLocaleId(parseInt(GetXMLElement(xmlDoc,"attempts")),params.locale_id);ResultSpeedTestInfo.AttemptsNotation=GetXMLElement(xmlDoc,"attempts_notation");if(IsUserLogin()){pageUpdater.speedTest.update(commonInfo.CourseID,parseInt(ResultSpeedTestInfo.Speed),ResultSpeedTestInfo.SpeedNotation,ResultSpeedTestInfo.Attempts,ResultSpeedTestInfo.AttemptsNotation)}with(ResultPage){RegRes=RegSpdRes}if(IsUserLogin()){with(ResultPage){NumOfPages=parseInt(GetXMLElement(xmlDoc,"pages"));CurPage=parseInt(GetXMLElement(xmlDoc,"page"))}var d=new Date();for(var i=0;i<ResultSpeedTestInfo.nFlds;i++){with(ResultSpeedTestInfo){APos[i]=GetXMLElement(xmlDoc,"num",i);try{ADate[i]=GetXMLElement(xmlDoc,"dt",i)}catch(e){ADate[i]=""}AAvgSpeed[i]=GetXMLElement(xmlDoc,"avg_speed",i);AErrors[i]=GetXMLElement(xmlDoc,"errors",i)}}}}else{ResultSpeedTestInfo.Header=_interface.sNoData;ResultSpeedTestInfo.Text=speedTestResultTexts[scormUtils.markSpeed.getIndexByErrors(exerciseUserStatus.getNumErrors())][scormUtils.markSpeed.getIndexBySpeed(Speed.GetTotalSpeed())]["header"];for(var i=0;i<ResultSpeedTestInfo.nFlds;i++){with(ResultSpeedTestInfo){APos[i]=_interface.sSkipData;ADate[i]=_interface.sSkipData;AAvgSpeed[i]=_interface.sSkipData;AErrors[i]=_interface.sSkipData}}}ShowResultInnerByOption(RESULT_NONE);document.getElementById("IDResSpeedSel").innerHTML=ResultPage.ResultPageSelector();ResultSpeedTestInfo.BResponseReceived=true;for(var j in ResultSpeedTestInfo.ADate){with(ResultSpeedTestInfo){if(isNaN(parseInt(APos[j]))){ResultPage.SetTabSpeedRowVis(j,false)}else{ResultPage.SetTabSpeedRowVis(j,true);ResultPage.SetResSpeedPos(j,String(parseInt(APos[j])));ResultPage.SetResSpeedDate(j,ADate[j]);ResultPage.SetResSpeedErrors(j,AErrors[j]);ResultPage.SetResSpeedSpeed(j,AAvgSpeed[j])}}}commonInfo.setDefaultSpeed(ResultSpeedTestInfo.AAvgSpeed[0])};RequestAnswer.KeyboardLayoutGot=function(b){if(Environment.IsOnline()){var a=$(b).find("keyboard");KeyboardInfo.Layout=$(a).find("layout").text()}else{KeyboardInfo.Layout=_offlineParams.layout}KeyboardInfo.BResponseReceived=true};RequestAnswer.KeyboardParamsGot=function(c){if(Environment.IsOnline()){var a=$(c).find("keyboard");var e=$(a).find("layout").text();var d=$(a).find("next_key").text();var f=$(a).find("show_chars").text();var b=$(a).find("keyboard_colored").text();if(e==""){KeyboardInfo.Layout=commonInfo.getDefaultLayout()}else{KeyboardInfo.Layout=e}if(d==""){KeyboardInfo.bNextKey=true}else{KeyboardInfo.bNextKey=d}if(f==""){KeyboardInfo.bShowChars=true}else{KeyboardInfo.bShowChars=f}if(b==""){KeyboardInfo.bColored=true}else{KeyboardInfo.bColored=b}}else{KeyboardInfo.Layout=_offlineParams.layout;KeyboardInfo.bNextKey=_offlineParams.bNextKey;KeyboardInfo.bShowChars=_offlineParams.bShowChars;KeyboardInfo.bColored=_offlineParams.bColored}SetCurKeyboardKey();KeyboardInfo.BResponseReceived=true};var SpeedTestInfo=new TSpeedTestInfo();var ExamInfo=new TExamInfo();var CiteInfo=new TCiteInfo();var ResultInfo=new TResultInfo();var ResultSpeedTestInfo=new TResultSpeedTestInfo();var RatingInfo=new TRatingInfo();var ErrorsInfo=new TErrorsInfo();var TodayResultInfo=new TTodayResultInfo();var KeyboardInfo=new TKeyboardInfo();var TimeoutAJAX=250;var ajaxData={rating:{url:"/study/exercise_rating.tmpl",callbackSuccess:RequestAnswer.Rating,responseFlag:RatingInfo.BResponseReceived},speedTest:{url:"/test/get_text.tmpl",callbackSuccess:RequestAnswer.SpeedTest,responseFlag:SpeedTestInfo.BResponseReceived},speedTestRepeat:{url:"/test/get_text.tmpl",callbackSuccess:RequestAnswer.SpeedTestRepeat,responseFlag:SpeedTestInfo.BResponseReceived},cite:{url:"/study/cite.tmpl",callbackSuccess:RequestAnswer.CiteResult,responseFlag:CiteInfo.BResponseReceived},citeupdate:{url:"/study/cite.tmpl",callbackSuccess:RequestAnswer.CiteUpdate,responseFlag:null},exercise:{url:"/study/get_exercise.tmpl",callbackSuccess:RequestAnswer.ExerciseResult,responseFlag:exerciseInfo.BResponseReceived},result:{url:"/study/result.tmpl",callbackSuccess:RequestAnswer.Result,responseFlag:ResultInfo.BResponseReceived},resultSpeedTest:{url:"/test/get_result.tmpl",callbackSuccess:RequestAnswer.ResultSpeedTest,responseFlag:ResultSpeedTestInfo.BResponseReceived},todayResult:{url:"/study/get_today_stat.tmpl",callbackSuccess:RequestAnswer.TodayResult,responseFlag:TodayResultInfo.BResponseReceived},errors:{url:"/study/error.tmpl",callbackSuccess:RequestAnswer.Errors,responseFlag:ErrorsInfo.BResponseReceived},getLayout:{url:"/study/keyboard.tmpl",callbackSuccess:RequestAnswer.KeyboardLayoutGot},getKeybParams:{url:"/study/keyboard.tmpl",callbackSuccess:RequestAnswer.KeyboardParamsGot},saveParam:{url:"/study/keyboard.tmpl",callbackSuccess:function(a){},responseFlag:null}};function ReqError(f,e,d){var b="\n\n";var c="";for(var a in f){c+="xhr["+String(a)+"]='"+String(f[a])+"'"}errorWindow.add(Locale.errorWindowThisIsError+b+Locale.errorWindowErrorCode+f.status+" ("+d+")")}function empty(){alert("in empty")}function Request(d,c){var g=ajaxData[d];var b=g.callbackSuccess;if(Environment.IsOnline()){var a=g.url;var e=g.callbackError;var f=g.responseFlag;if(!e){e=ReqError}if(f){f=false}sendAjaxRequest({url:a,parameters:c,dataType:"xml",callbackSuccess:b,callbackError:e,secure:true})}else{b()}}function GetXMLElementHTML(c,b,a){if(a==undefined){if(c.getElementsByTagName(b)[0]!=null){return c.getElementsByTagName(b)[0]}else{return""}}}function GetXMLElement(c,b,a){if(a==undefined){if(c.getElementsByTagName(b)[0]!=null){if(c.getElementsByTagName(b)[0].firstChild!=null){return c.getElementsByTagName(b)[0].firstChild.nodeValue}else{return""}}else{return""}}else{if(c.getElementsByTagName(b)[a]==undefined){return""}if(c.getElementsByTagName(b)[a].firstChild!=null){return c.getElementsByTagName(b)[a].firstChild.nodeValue}else{return""}}}function RequestSpeedRepeat(){var a={course:courseId};Request("speedTestRepeat",a)}function RequestRatingTableUser(b,a){var c={sort_id:b,count:ResultPage.getNumPageUsers(),course:a};Request("rating",c);RatingInfo.BRequested=true}function RequestRatingTablePage(d,c,a,b){var e={sort_id:d,page:c,order:a,count:ResultPage.getNumPageUsers(),course:b};Request("rating",e);RatingInfo.BRequested=true}function RequestSpeedTest(b){var a={course:b};Request("speedTest",a);SpeedTestInfo.BRequested=true}function RequestCite(a){Request("cite");CiteInfo.BRequested=true}function RequestCiteSpeedUpdate(){Request("citeupdate")}function RequestExercise(a,c,b){var d={sort_id:a,course:c,iteration:b};Request("exercise",d);exerciseInfo.BRequested=true}var SupposeSpeed_=200;var SupposeDuration_=60;function RequestResult(g,a,f,e,h,c){var j=a;var b=e;if(Environment.IsOnline()){if(b==0){b=SupposeDuration_}var d={sort_id:g,avg_speed:j,errors:f,duration:e,course:h,num_chars:NumOfTypedChars,iteration:c}}else{}Request("result",d);ResultInfo.BRequested=true}function RequestSpeedTestResult(avgSpeed,attempts,numOfErrors,duration){var params={};if(Environment.IsOnline()){if(avgSpeed!=undefined){if(avgSpeed==Infinity){avgSpeed=SupposeSpeed_}params={avg_speed:avgSpeed,attempts:attempts,errors:numOfErrors,duration:duration,text_id:SpeedTestInfo.ID,bfin:1,num_chars:NumOfTypedChars}}with(ResultSpeedTestInfo){params.course=commonInfo.CourseID;params.count=nFlds;params.sort=sCrits[nCrit];params.page=nPage}params.num_chars=NumOfTypedChars}else{}Request("resultSpeedTest",params);ResultSpeedTestInfo.BRequested=true}function RequestTodayResult(){var a={course_id:commonInfo.CourseID};Request("todayResult",a);TodayResultInfo.BRequested=true}function RequestErrors(){Request("errors");ErrorsInfo.BRequested=true}function RequestLayout(){Request("getLayout")}function RequestKeyboardParams(){var a={course_id:commonInfo.CourseID};Request("getKeybParams",a)}function RequestSaveKeyboardParam(c,b){var a={course_id:commonInfo.CourseID,paramName:c,val:String(b)};switch(c){case"keyboard_colored":KeyboardInfo.bColored=b;break;case"next_key":KeyboardInfo.bNextKey=b;break;case"show_chars":KeyboardInfo.bShowChars=b;case"layout":KeyboardInfo.Layout=b;break;default:}Request("saveParam",a)}function ShowExistsObject(a){this.id=a;this.getId=function(){return this.id};this.show=function(c){var b=document.getElementById(this.id);if(c){b.style.display=""}else{b.style.display="none"}};this.exists=function(){return document.getElementById(this.id)!=null};return this}function TableCell(a){this.id=a;this._getObj=function(){return document.getElementById(this.id)};this._alignInnerVertical=function(b){this._getObj().style.verticalAlign=b};this._alignInnerHorizontal=function(b){this._getObj().style.horizontalAlign=b};this.alignInnerTop=function(){this._alignInnerVertical("top")};this.alignInnerMiddle=function(){this._alignInnerVertical("middle")};this.alignInnerBottom=function(){this._alignInnerVertical("bottom")};this.alignInnerLeft=function(){this._alignInnerHorizontal("left")};this.alignInnerRight=function(){this._alignInnerHorizontal("right")};this.alignInnerCenter=function(){this._alignInnerHorizontal("center")}}function TestResultPage(c){if(c==undefined){alert("Can't test result page. Obj is undefined");return}var b=ResultPage.getNumPageUsers();for(var a=0;a<b;a++){c.UsersTableSetUser(a,a+1,"User"+String(a+1),String((a+1)*100),String(a+2),String((a+1)*1000))}c.UsersTableSetActiveField(0);ResultPage.SetNumOfPages(30)}function ClickResultUserTableTyper(){ResultPage.UsersTableSetActiveField(1);ResultPage.SetCrit(0);ResultPage.RequestUserTable()}function ClickResultUserTableSpeed(){ResultPage.UsersTableSetActiveField(2);ResultPage.SetCrit(1);ResultPage.RequestUserTable()}function ClickResultUserNumOfErrors(){ResultPage.UsersTableSetActiveField(3);ResultPage.SetCrit(2);ResultPage.RequestUserTable()}function ClickResultUserTableRating(){ResultPage.UsersTableSetActiveField(4);ResultPage.SetCrit(3);ResultPage.RequestUserTable()}function UpdatePageNumber(pageNum,bUpdate){ResultPage.SetCurPage(pageNum);with(ResultPage){if(RegRes==RegExRes){if(commonInfo.TypeOfExercise==1||commonInfo.TypeOfExercise==6){RequestUserTable()}else{show()}}else{try{ResultSpeedTestInfo.nPage=pageNum;RequestSpeedTestResult()}catch(e){alert("UpdatePageNumber(): "+e.description)}}}}function UpdatePage(){if((commonInfo.TypeOfExercise==1||commonInfo.TypeOfExercise==6)&&UserStates.isAdept()){RequestRatingTableUser(exerciseInfo.ID,commonInfo.CourseID)}else{ResultPage.show()}}function TResultPage(a,c){this.BlockName=a;this.ExerciseBlockName=c;this.contentAndFarActionsTable={getHeightByExerciseType:function(f){if(f==32){return"0px"}return"310px"}};this.Set=d;this.NumOfPages=0;this.CurPage=0;this.CritTyper="Typer";this.CritSpeed="Speed";this.CritNumOfMistakes="NumOfMistakes";this.CritRating="Rating";this.CurCrit=this.CritPosition;var e=5;var b=8;this.ExerciseID=1;this.bSet=false;this.UserProfilePath="/profile/";this.ResultMessageEmptyField=new TEmptyField("default","white");this.RegExRes=0;this.RegSpdRes=1;this.RegRes=this.RegExRes;this.getNumPageUsers=function(){var f;if(screenResolution.isLow()){f=e}else{f=b}return f};this.SetGrammarResult=function(j,n){var g="";var f="";var k=false;var p=false;var l=String(",.;:-");var m=StrArrayDeleteSymbols(j,l);var o=StrArrayDeleteSymbols(n,l);for(var h=0;h<o.length;h++){if(m[h]==o[h]){if(k){g+=", "}g+=o[h];k=true}else{if(p){f+=", "}f+="<i>"+o[h]+"</i> &ndash; "+m[h];p=true}}if(g!=""){document.getElementById("IDCorrectWords").innerHTML=g+"."}if(f!=""){document.getElementById("IDIncorrectWords").innerHTML=f+"."}};this.RatingTableSpanId="IDRatingTableSpan";this.MiksanatikBlockId="IDResultMiksanatik";this.RatingTableId="IDRatingTable";this.PleaseWaitId="IDPleaseWait";this.ratingFillYourProfileId="ratingFillYourProfileId";this.resultInnerTdId="resultInnerTdId";this.resultInnerTd=new TableCell(this.resultInnerTdId);this.ratingTable=new ShowExistsObject(this.RatingTableSpanId);this.miksanatik=new ShowExistsObject(this.MiksanatikBlockId);this.pleaseWait=new ShowExistsObject(this.PleaseWaitId);this.ratingFillYourProfile=ShowExistsObject(this.ratingFillYourProfileId);this.contentAndFarActionsTableId="contentAndFarActionsTable";this.ShowRatingTable=function(){this.pleaseWait.show(false);this.resultInnerTd.alignInnerBottom();this.ratingFillYourProfile.show(false);if(!Environment.IsOnline()){if(this.ratingTable.exists()){this.ratingTable.show(false)}}else{if(this.ratingTable.exists()){this.ratingTable.show(true)}}if(this.miksanatik.exists()){this.miksanatik.show(false)}};this.ShowMiksanatik=function(){this.pleaseWait.show(false);this.resultInnerTd.alignInnerBottom();if(this.ratingTable.exists()){this.ratingTable.show(false)}if(this.miksanatik.exists()){this.miksanatik.show(true)}this.ShowRating(false)};this.HideMain=function(){this.pleaseWait.show(false);this.resultInnerTd.alignInnerBottom();if(this.ratingTable.exists()){this.ratingTable.show(false)}if(this.miksanatik.exists()){this.miksanatik.show(false)}};this.IsSet=function(){return this.bSet};this.SetExerciseID=function(f){this.ExerciseID=f};this.SetWindowTop=function(f){this.WindowTop=f};this.SetWindowLeft=function(f){this.WindowLeft=f};this.SetLessonExercise=function(f,h){try{document.getElementById("IDTaskNumber").innerHTML=f+"."+h}catch(g){}};this.SetPanelSpeed=function(f){document.getElementById("resultPanelSpeed").innerHTML=f};this.UpdatePanelFullTime=function(){var f=document.getElementById("IDResultTimeElapsed");f.innerHTML=GetActiveExTime()};this.SetPanelNumOfErrors=function(f){document.getElementById("resultPanelNumOfErrors").innerHTML=f};this.SetHeader=function(f){document.getElementById("IDResultHeader").innerHTML=f};this.SetPanelRating=function(f){document.getElementById("resultPanelRating").innerHTML=f};this.SetPanelTextTyped=function(f){try{document.getElementById("resultPanelTextTyped").innerHTML=f}catch(g){}};this.SetPanelTotalNumOfErrors=function(f){document.getElementById("resultPanelTotalNumOfErrors").innerHTML=f};this.SetNumOfAttempts=function(g){try{document.getElementById("resultPanelNumAttempts").innerHTML=g}catch(f){alert("in resultPage.js")}};this.SetAvarageSpeed=function(g){try{document.getElementById("resultPanelAvarageSpeed").innerHTML=g}catch(f){}};this.SetNumOfSymbolsTyped=function(g){try{document.getElementById("resultPanelTextTyped").innerHTML=g}catch(f){}};this.SetNumOfErrors=function(g){try{document.getElementById("resultTotalNumOfErrors").innerHTML=g}catch(f){}};this.UserTableHeadFieldsIds=new Array("resultUserTablePosition","resultUserTableTyper","resultUserTableSpeed","resultUserTableNumOfErrors","resultUserTableRating");this.UserTableHeadFieldsNames=new Array(Locale.position,Locale.soloist,Locale.speed,Locale.errors,Locale.rating);this.PrevTableHeadIndex=0;this.UsersTableSetActiveField=function(f){if(this.PrevTableHeadIndex==f){return}if(this.PrevTableHeadIndex!=0){document.getElementById(this.UserTableHeadFieldsIds[this.PrevTableHeadIndex]).innerHTML="<font class='resultUserTableHeadDashed'>"+this.UserTableHeadFieldsNames[this.PrevTableHeadIndex]+"</font>"}document.getElementById(this.UserTableHeadFieldsIds[f]).innerHTML="<font class='resultUserTableHeadWithoutDashed'>"+this.UserTableHeadFieldsNames[f]+"</font>";this.PrevTableHeadIndex=f};this.PrevTableRowIndex=0;this.UsersTableSetActiveRow=function(f){var h=document.getElementById("resultUserTableRow"+String(f));var g=document.getElementById("resultUserTableRow"+String(this.PrevTableRowIndex));if(this.PrevTableRowIndex==f){return}if(f!=-1){h.style.background="#D1EDBB"}if(this.PrevTableRowIndex!=-1){if(this.PrevTableRowIndex%2){g.style.background="rgb(238,238,238)"}else{g.style.background="rgb(255,255,255)"}}this.PrevTableRowIndex=f};this.UsersTableSetRowDisplay=function(f,g){if(g){document.getElementById("resultUserTableRow"+String(f)).style.visibility="visible";if(window.navigator.appName=="Microsoft Internet Explorer"){document.getElementById("IDRatingTableSpeedBPre"+String(f)).style.visibility="visible";document.getElementById("IDRatingTableSpeedBPost"+String(f)).style.visibility="visible";document.getElementById("IDRatingTableErrorsBPre"+String(f)).style.visibility="visible";document.getElementById("IDRatingTableErrorsBPost"+String(f)).style.visibility="visible";document.getElementById("IDRatingTableRatingBPre"+String(f)).style.visibility="visible";document.getElementById("IDRatingTableRatingBPost"+String(f)).style.visibility="visible"}}else{document.getElementById("resultUserTableRow"+String(f)).style.visibility="hidden";if(window.navigator.appName=="Microsoft Internet Explorer"){document.getElementById("IDRatingTableSpeedBPre"+String(f)).style.visibility="hidden";document.getElementById("IDRatingTableSpeedBPost"+String(f)).style.visibility="hidden";document.getElementById("IDRatingTableErrorsBPre"+String(f)).style.visibility="hidden";document.getElementById("IDRatingTableErrorsBPost"+String(f)).style.visibility="hidden";document.getElementById("IDRatingTableRatingBPre"+String(f)).style.visibility="hidden";document.getElementById("IDRatingTableRatingBPost"+String(f)).style.visibility="hidden"}}};this.TrimUserName=function(f){if(f.length>30){return f.slice(0,30)+"&hellip;"}return f};this.UsersTableSetUser=function(g,l,f,k,h,j){document.getElementById("resultUserTablePosition"+g).innerHTML=l;document.getElementById("resultUserTableUserName"+g).innerHTML='<span style="cursor: pointer" onclick="navigateNewWindowTo(\''+this.GetRatingTableRowUserRef(g)+"')\">"+this.TrimUserName(f)+"</span>";document.getElementById("resultUserTableSpeed"+g).innerHTML=k;document.getElementById("resultUserTableNumOfErrors"+g).innerHTML=h;document.getElementById("resultUserTableRating"+g).innerHTML=j};this.SetResultMessage=function(f){var g="";if(PhotoInfo.IsHint(exerciseInfo.LessonNumber,commonInfo.TypeOfExercise,exerciseUserStatus.getNumErrors())){g="<span style='font-weight: bold; font-size: 10pt'>"+Locale.onPhoto+": "+exerciseInfo.PhotoCaption+"</span><br/><br/><br/><br/>"}document.getElementById("resultMessage").innerHTML=g+f.replace(/\n/g,"<div class='resultAddSpace'> </div>")};this.SetNumOfPages=function(f){this.NumOfPages=f};this.SetCurPage=function(f){this.CurPage=f};this.GetCurPage=function(){return this.CurPage};this.SetCrit=function(f){switch(f){case 0:this.CurCrit=this.CritTyper;break;case 1:this.CurCrit=this.CritSpeed;break;case 2:this.CurCrit=this.CritNumOfMistakes;break;case 3:this.CurCrit=this.CritRating;break;default:alert("Exception: SetCrit() : wrong criterion '"+f+"' was specified")}this.UsersTableSetActiveField(f+1)};this.UpdateUserTable=function(){this.UsersTableSetActiveRow(-1);var g=this.getNumPageUsers();for(var f=0;f<g;f++){this.UsersTableSetUser(f,f+1+g*this.GetCurPage(),RatingInfo.User[f],RatingInfo.AvarageSpeed[f],RatingInfo.Errors[f],RatingInfo.Rating[f]);if(RatingInfo.User[f]!=""){this.UsersTableSetRowDisplay(f,true)}else{this.UsersTableSetRowDisplay(f,false)}if(RatingInfo.Active[f]=="1"){this.UsersTableSetActiveRow(f)}}this.SetNumOfPages(RatingInfo.NumOfPages)};this.RequestUserTable=function(){if(this.CurCrit==this.CritTyper){RequestRatingTablePage(this.ExerciseID,this.CurPage+1,"name",commonInfo.CourseID)}else{if(this.CurCrit==this.CritSpeed){RequestRatingTablePage(this.ExerciseID,this.CurPage+1,"avg_speed",commonInfo.CourseID)}else{if(this.CurCrit==this.CritNumOfMistakes){RequestRatingTablePage(this.ExerciseID,this.CurPage+1,"errors",commonInfo.CourseID)}else{if(this.CurCrit==this.CritRating){RequestRatingTablePage(this.ExerciseID,this.CurPage+1,"rating",commonInfo.CourseID)}else{alert("Exception: UpdateUserTable() : object has wrong .CurCrit");return}}}}};this.Selector={black:function(f){return"<FONT COLOR='black'>"+f+"</FONT>&nbsp;"},blue:function(g,f){return"<FONT COLOR='#3B91D3'><span onclick='UpdatePageNumber("+g+");' style='cursor: pointer'><U>"+f+"</U></span></FONT>&nbsp;"}};this.ResultPageSelector=function(){var k="";var h;if(this.NumOfPages<2){return""}var f=USelector.Get(this.CurPage,this.NumOfPages,10);var l="";for(var h=0;h<f.length;h++){l+=f[h]+" "}var g=USelector.Min;if(USelector.Min>0){k+=this.Selector.blue(0,"1")}for(var h=0;h<f.length;h++){if(g==this.CurPage){k+=this.Selector.black(f[h])}else{k+=this.Selector.blue(g,f[h])}g++}if(g<=USelector.MaxPg){if(g==this.CurPage){k+=this.Selector.black(String(USelector.MaxPg+1))}else{k+=this.Selector.blue(USelector.MaxPg,String(USelector.MaxPg+1))}}return k};this.SetErrorsCritical=function(o){var k=document.getElementById("IDResultHeader");var p=document.getElementById("resultMessage");var f=document.getElementById("IDTdResultMessageCornerTopLeft");var q=document.getElementById("IDTdResultMessageBkTop");var l=document.getElementById("IDTdResultMessageCornerTopRight");var h=document.getElementById("IDTdResultMessageBkLeft");var g=document.getElementById("IDTdResultMessageBkRight");var m=document.getElementById("IDTdResultMessageCornerBottomLeft");var j=document.getElementById("IDTdResultMessageBkBottom");var n=document.getElementById("IDTdResultMessageCornerBottomRight");if(o){p.className="ClassResultTextRed";k.style.color="#D00000";f.className="exResultMessageCornerTopLeftRed";q.className="exResultMessageBkTopRed";l.className="exResultMessageCornerTopRightRed";h.className="exResultMessageBkLeftRed";g.className="exResultMessageBkRightRed";m.className="exResultMessageCornerBottomLeftRed";j.className="exResultMessageBkBottomRed";n.className="exResultMessageCornerBottomRightRed"}else{p.className="ClassResultText";k.style.color="#5FAC20";f.className="exResultMessageCornerTopLeft";q.className="exResultMessageBkTop";l.className="exResultMessageCornerTopRight";h.className="exResultMessageBkLeft";g.className="exResultMessageBkRight";m.className="exResultMessageCornerBottomLeft";j.className="exResultMessageBkBottom";n.className="exResultMessageCornerBottomRight"}};this.ShowGoToLessonList=function(g){var f=document.getElementById("IDResPGoToLessonList");if(g){f.style.display=""}else{f.style.display="none"}};this.oGotoLessonListReference={id:"IDResPGoToLessonList",get:function(){return document.getElementById(this.id)},assignGoToLessonList:function(){this.get().innerHTML='<a onclick="'+ResultPage.resultActions.getOverviewReference()+'"><nobr>'+ResultPage.resultActions.getOverviewCaption()+"</nobr></a>"},assignRepeatExercise:function(){this.get().innerHTML='<a onclick="RepeatExercise()"><nobr>'+Locale.repeatExercise+"</nobr></a>"},assignNone:function(){this.get().innerHTML=""},show:function(f){if(f){this.get().style.display=""}else{this.get().style.display="none"}}};this.ShowContinue=function(g){var f=document.getElementById("IDResPContinue");if(g){f.style.display=""}else{f.style.display="none"}};this.hideTodayResult=function(){document.getElementById("IDResultToday").style.display="none"};function d(f){ShowMainWindow(false);var g=document.getElementById(this.BlockName);var h=this.GetContent(f);g.innerHTML=h;switch(GetExType()){case 0:case 4:this.SetRatingTableDisplay(false);this.SetPanelRatingDisplay(false,Environment.IsOnline());this.SetPanelErrorsDisplay(false);this.SetMiksanatikDisplay(true);this.SetLessonSelectorDisplay(false);this.ShowRating(false);this.ShowToday(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;case 5:this.SetRatingTableDisplay(false);this.SetPanelRatingDisplay(false,Environment.IsOnline());this.SetPanelErrorsDisplay(false);this.SetMiksanatikDisplay(false);this.SetLessonSelectorDisplay(false);this.ShowRating(false);this.SetLessonSelectorDisplay(false);this.ShowToday(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;case 32:this.SetRatingTableDisplay(false);this.SetPanelRatingDisplay(false,Environment.IsOnline());this.SetPanelErrorsDisplay(true);this.SetMiksanatikDisplay(true);this.SetLessonSelectorDisplay(false);this.ShowRating(false);this.ShowToday(false);this.FillResSpeedSpan();if(IsUserLogin()){this.ShowResSpeedSpan(true,Environment.IsOnline())}else{this.ShowResSpeedSpan(false,Environment.IsOnline())}break;case 2:this.SetPanelSpeedDisplay(false);this.SetRatingTableDisplay(true);this.SetPanelRatingDisplay(true,Environment.IsOnline());this.SetPanelErrorsDisplay(false);this.SetMiksanatikDisplay(false);this.SetLessonSelectorDisplay(true);this.ShowRating(true);this.ShowToday(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;case 3:this.SetRatingTableDisplay(true);this.SetPanelRatingDisplay(true,Environment.IsOnline());this.SetPanelErrorsDisplay(false);this.SetMiksanatikDisplay(false);this.SetLessonSelectorDisplay(true);this.ShowRating(true);this.ShowToday(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;case 6:this.SetRatingTableDisplay(true);this.SetPanelRatingDisplay(true,Environment.IsOnline());this.SetPanelErrorsDisplay(false);this.SetMiksanatikDisplay(false);this.SetLessonSelectorDisplay(true);this.ShowRating(true);this.ShowToday(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;case 7:this.SetRatingTableDisplay(true);this.SetPanelRatingDisplay(true,Environment.IsOnline());this.SetPanelErrorsDisplay(false);this.SetMiksanatikDisplay(false);this.SetLessonSelectorDisplay(false);this.ShowRating(true);this.ShowToday(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;case 8:this.SetRatingTableDisplay(true);this.SetPanelRatingDisplay(true,Environment.IsOnline());this.SetPanelErrorsDisplay(true);this.SetLessonSelectorDisplay(false);this.ShowResSpeedSpan(false,Environment.IsOnline());if(screenResolution.isLow()){this.hideTodayResult()}break;default:this.SetRatingTableDisplay(true);this.SetPanelRatingDisplay(true,Environment.IsOnline());this.SetPanelErrorsDisplay(true);this.ShowResSpeedSpan(false,Environment.IsOnline());if(exerciseUserStatus.getNumErrors()>exerciseInfo.MaxNumOfMistakes){this.SetErrorsCritical(true)}else{this.SetErrorsCritical(false)}this.SetMiksanatikDisplay(false);this.SetLessonSelectorDisplay(true);this.ShowRating(true);this.ShowToday(true);if(screenResolution.isLow()){this.hideTodayResult()}}this.HideResultPanelIfEmpty();g.style.top=windowSys.mainWindow.getTop();g.style.left=windowSys.mainWindow.getLeft();g.style.display="";document.getElementById(this.ExerciseBlockName).style.display="none";ResultImg.Update(exerciseInfo.LessonNumber,commonInfo.TypeOfExercise,exerciseUserStatus.getNumErrors());this.oGotoLessonListReference.show(IsUserLogin());if(Environment.IsOnline()){this.oGotoLessonListReference.assignGoToLessonList()}else{if(exerciseInfo.isExam){this.oGotoLessonListReference.assignNone()}else{this.oGotoLessonListReference.assignRepeatExercise()}}this.ShowContinue(IsUserLogin());this.bSet=true}this.ShowRefToLast=function(f){var g=document.getElementById("IDRefToLast");if(f){g.style.visibility="visible"}else{g.style.visibility="hidden"}};this.SetRefToLast=function(f){var g=document.getElementById("IDRefToLast");g.innerHTML="<a onclick='UnsetResultPageClose(\""+f+"\")'><nobr>"+Locale.toLastAvailable+"</nobr></a>"};this.IsResultPanelSpeedDisplay=function(){if(document.getElementById("IDResultPanelSpeed").style.display=="none"){return false}return true};this.IsResultPanelErrorsDisplay=function(){if(document.getElementById("IDResultPanelErrors").style.display=="none"){return false}return true};this.IsResultPanelRatingDisplay=function(){if(document.getElementById("IDResultPanelRating").style.display=="none"){return false}return true};this.ShowResultPanel=function(g){var f=document.getElementById("IDResultPanel");if(g){f.style.display=""}else{f.style.display="none"}};this.HideResultPanelIfEmpty=function(){if(this.IsResultPanelSpeedDisplay()==false&&this.IsResultPanelErrorsDisplay()==false){this.ShowResultPanel(false)}};this.Unset=function(){this.ShowResBottomCaptions(false);document.getElementById(this.BlockName).style.display="none";document.getElementById(this.ExerciseBlockName).style.display="";this.bSet=false;if(!isIe6()){}CloseRedoObjRes.Show(false);ResetBegTime()};this.BSetRefToNext=false;this.SetRefToNextExercise=function(f){ResultInfo.RefToNext=f;var g=document.getElementById("IDToNextExercise");if(this.BSetRefToNext==false){g.innerHTML='<a style="cursor: pointer" onclick="CloseOrGoToPage();"><font color="#5FAC20"><U><b><i>'+Locale.goNext+"</i></b></U></font></a>";this.BSetRefToNext=true}};this.RefToNextHasSet=function(f){this.BSetRefToNext=f};this.IsSetRefToNext=function(){return this.BSetRefToNext};this.ShowRating=function(g){try{if(g){document.getElementById(this.RatingTableId).style.display="";document.getElementById("IDStrTaskRating").style.display="inline";document.getElementById("IDTaskNumber").style.display="inline";if(!UserStates.isAdept()){this.ratingFillYourProfile.show(true);this.pleaseWait.show(false)}}else{this.ratingFillYourProfile.show(false);document.getElementById(this.RatingTableId).style.display="none";document.getElementById("IDStrTaskRating").style.display="none";document.getElementById("IDTaskNumber").style.display="none"}}catch(f){}};this.SetLessonSelectorDisplay=function(g){try{if(g){document.getElementById("IDResLsnSel").style.display="inline"}else{document.getElementById("IDResLsnSel").style.display="none"}}catch(f){}};this.SetMiksanatikDisplay=function(f){};this.SetPanelErrorsDisplay=function(f){if(f){document.getElementById("IDResultPanelErrors").style.display=""}else{document.getElementById("IDResultPanelErrors").style.display="none"}};this.SetResultPanelDisplay=function(f){if(f){document.getElementById("IDResultPanel").style.display=""}else{document.getElementById("IDResultPanel").style.display="none"}};this.SetPanelSpeedDisplay=function(f){if(f){document.getElementById("IDResultPanelSpeed").style.display=""}else{document.getElementById("IDResultPanelSpeed").style.display="none"}};this.SetPanelRatingDisplay=function(h,f){var g=document.getElementById("IDResultPanelRating");if(!f){g.style.display="none";return}if(h){g.style.display=""}else{g.style.display="none"}};this.SetRatingTableDisplay=function(f){if(f){document.getElementById(this.RatingTableId).style.display="inline"}else{document.getElementById(this.RatingTableId).style.display="none"}};this.SetSpeedTestRegisterEnterTrDisplay=function(f){if(f){document.getElementById("IDSpeedTestRegisterEnterTr").style.display=""}else{document.getElementById("IDSpeedTestRegisterEnterTr").style.display="none"}};this.show=function(){ShowMainWindow(true);CloseRedoObjRes.Show(true);this.ShowResBottomCaptions(true);if(commonInfo.TypeOfExercise==32){if(ResultSpeedTestInfo.RefToLast!=""){ResultPage.SetRefToLast(ResultSpeedTestInfo.RefToLast)}}else{if(ResultInfo.RefToLast!=""){ResultPage.SetRefToLast(ResultInfo.RefToLast)}}};this.GetUserProfilePath=function(){return this.UserProfilePath};this.GetRatingTableRowUserRef=function(f){return this.GetUserProfilePath()+RatingInfo.UserId[f]+"/"};this.GetRatingTableRow=function(f){var g="";if((f%2)==1){g="class='bkGray'"}return"				<TR VALIGN=CENTER "+g+' id="resultUserTableRow'+f+'">					<TD WIDTH=20% align="center">						<FONT Size=2><B><span id="resultUserTablePosition'+f+'"></span></B></FONT></TD>					<TD WIDTH=20% align="CENTER">						<FONT Size=2><U><nobr><span id="resultUserTableUserName'+f+'"></span></nobr></U></FONT></TD>					<TD WIDTH=20% align="CENTER">											<table><tr><td><b class="classGreenB" id="IDRatingTableSpeedBPre'+f+'"></b>            <div display="inline" class="classGreenDiv"><FONT Size=2><span id="resultUserTableSpeed'+f+'">000</span></FONT></div>            <b class="classGreenB" id="IDRatingTableSpeedBPost'+f+'"></b></td></tr></table></TD>					<TD WIDTH=20% align="center">						<table><tr><td><b class="classRedB" id="IDRatingTableErrorsBPre'+f+'"></b>            <div display="inline" class="classRedDiv"><FONT Size=2><span id="resultUserTableNumOfErrors'+f+'">121</span></FONT></div>            <b class="classRedB" id="IDRatingTableErrorsBPost'+f+'"></b></td></tr></table></TD>					<TD WIDTH=20% align="center">						<table><tr><td><b class="classBlueB" id="IDRatingTableRatingBPre'+f+'"></b>            <div display="inline" class="classBlueDiv"><FONT Size=2><span id="resultUserTableRating'+f+'">80</span></FONT></div>            <b class="classBlueB" id="IDRatingTableRatingBPost'+f+'"></b></td></tr></table></TD>				</TR>'};this.TabSpeedTable=function(){return'<table width="100%" height="100%" border="0" cellpadding="1" cellspacing="0" id="IDTableSpeedRes" class="noWrap">'};this.TabSpeedUntable=function(){return"</table>"};this.TabSpeedHead=function(){return'<tr style="text-align: left;" valign="bottom"><td>&nbsp;</td><td class="GreenGeorgia" colspan="4"><div style="margin-top: 0px">'+Locale.statistics+'</div></td></tr><tr><td colspan="5" id="IDResSpeedSel">... 1 2 ...</td></tr>'};this.TabSpeedHead2=function(){numPageUsers=this.getNumPageUsers();return'<tr valign="middle" style="font-size: 14pt; text-align: center"><td rowspan="'+String(numPageUsers+1)+'" valign="bottom"><div class="margRight10">'+this.Tables.Today()+'</div></td><td width="15%"></td><td width="35%"><div class="marginTopBottom5"><span id="IDResHeadDate" onclick="ResultPage.ResSpdTabClck(this.id)" class="resultUserTableHeadWithoutDashed">'+Locale.dateAndTime+'</span></div></td><td width="25%"><div class="marginTopBottom5"><span id="IDResHeadSpeed" class="resultUserTableHeadDashed" onclick="ResultPage.ResSpdTabClck(this.id)">'+Locale.speed+'</span></div></td><td width="25%"><div class="marginTopBottom5"><span id="IDResHeadErrors" class="resultUserTableHeadDashed" onclick="ResultPage.ResSpdTabClck(this.id)">'+Locale.numErrors+"</span></div></td></tr>"};this.ResSpdIds=new Array("IDResHeadDate","IDResHeadSpeed","IDResHeadErrors");this.ResSpdTabClck=function(h){var f=0;for(i in this.ResSpdIds){var g=document.getElementById(this.ResSpdIds[i]);if(h==this.ResSpdIds[i]){g.className="resultUserTableHeadWithoutDashed";ResultSpeedTestInfo.nCrit=f}else{g.className="resultUserTableHeadDashed"}f++}UpdatePageNumber(ResultSpeedTestInfo.nPage)};this.GetIDResSpeedPos=function(f){return"IDResSpeedPos"+String(f)};this.GetIDResSpeedDate=function(f){return"IDResSpeedDate"+String(f)};this.GetIDResSpeedSpeed=function(f){return"IDResSpeedSpeed"+String(f)};this.GetIDResSpeedErrors=function(f){return"IDResSpeedErrors"+String(f)};this.GetIDTabSpeedRow=function(f){return"IDResTabSpeedRow"+String(f)};this.ResSpeedPos=function(f){return document.getElementById(this.GetIDResSpeedPos(f))};this.ResSpeedDate=function(f){return document.getElementById(this.GetIDResSpeedDate(f))};this.ResSpeedSpeed=function(f){return document.getElementById(this.GetIDResSpeedSpeed(f))};this.ResSpeedErrors=function(f){return document.getElementById(this.GetIDResSpeedErrors(f))};this.SetResSpeedPos=function(g,f){this.ResSpeedPos(g).innerHTML=f};this.TabSpeedVisArr=new Array(true,true,true,true,true,true,true,true);this.SetTabSpeedRowVis=function(g,f){try{if(f==this.TabSpeedVisArr[g]){return}if(f){document.getElementById(this.GetIDTabSpeedRow(g)).style.visibility="visible";this.TabSpeedVisArr[g]=true}else{document.getElementById(this.GetIDTabSpeedRow(g)).style.visibility="hidden";this.TabSpeedVisArr[g]=false}}catch(h){}};this.SetResSpeedDate=function(g,f){try{this.ResSpeedDate(g).innerHTML=f}catch(h){alert("this.ResSpeedDate="+this.ResSpeedDate)}};this.SetResSpeedSpeed=function(g,f){this.ResSpeedSpeed(g).innerHTML=f};this.SetResSpeedErrors=function(g,f){this.ResSpeedErrors(g).innerHTML=f};this.TabSpeedBody=function(){var j="";var f="class='bkGray'";var h=this.getNumPageUsers();for(var g=0;g<h;g++){if((g%2)==1){scls=f}else{scls=""}j+="<tr "+scls+' id="'+this.GetIDTabSpeedRow(g)+'"><td align="left">'+this.TabSpeedColPos(g)+'</td><td align="center">'+this.TabSpeedCol(this.GetIDResSpeedDate(g))+'</td><td align="center">'+this.TabSpeedCol(this.GetIDResSpeedSpeed(g),"green")+'</td><td align="center">'+this.TabSpeedCol(this.GetIDResSpeedErrors(g),"red")+"</td></tr>"}return j};this.TabSpeedColPos=function(f){return'<b><div class="leftLitMarg" id="'+this.GetIDResSpeedPos(f)+'"></div></b>'};this.TabSpeedCol=function(l,k){if(k==undefined){var j='<b><span id="'+l+'"></span></b>';return j}var f="classGreen";if(k=="blue"){f="classBlue"}else{if(k=="red"){f="classRed"}}var h=f+"B";var g=f+"Div";var j='<table><tr><td><b class="'+h+'"></b><div id="'+l+'" class="'+g+'"></div><b class="'+h+'"></b></td></tr></table>';return j};this.TabSpeed=function(){return this.TabSpeedTable()+this.TabSpeedHead()+this.TabSpeedHead2()+this.TabSpeedBody()+this.TabSpeedUntable()};this.FillResSpeedSpan=function(){document.getElementById("IDResSpeedTable").innerHTML=this.TabSpeed()};this.ShowResSpeedSpan=function(g,f){var h=document.getElementById("IDResSpeedTable");if(f==false){h.style.display="none";return}if(g){h.style.display=""}else{h.style.display="none"}};this.FormRatingTableRows=function(){var h="";var g=this.getNumPageUsers();for(var f=0;f<g;f++){h+=this.GetRatingTableRow(f)}return h};this.ShowToday=function(f){if(f){document.getElementById("IDResultToday").style.display=""}else{document.getElementById("IDResultToday").style.display="none"}};this.ShowRepeat=function(f){if(f){document.getElementById("IDResultRepeat").style.display=""}else{document.getElementById("IDResultRepeat").style.display="none"}};this.SetRepeatSpan=function(f){document.getElementById("IDResultRepeat").innerHTML=f};this.ScreenResFragment2=function(){if(window.navigator.appName=="Microsoft Internet Explorer"||screenResolution.isHigh()){return'<TR>		<TD COLSPAN=4 valign="middle"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td VALIGN="middle" ALIGN="center">			<FONT FACE="Georgia"><I><span style="font-size: 20pt; color: #5FAC20" id="IDResultHeader">'+Locale.congratulations+'</span></I></FONT></td><td align="right" width="91px">'+CloseRedoObjRes.Generate()+"</td></tr></table></TD>	</TR>"}else{return'<TR>		<TD COLSPAN=4 valign="middle"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td VALIGN="middle" ALIGN="center">			<FONT FACE="Georgia"><FONT SIZE=6><I><span style="font-size: 20pt; color: #5FAC20" id="IDResultHeader">'+Locale.congratulations+'</span></I></FONT></td><td align="right" width="91px">'+CloseRedoObjRes.Generate()+"</td></tr></table></TD>	</TR>"}};this.SetResultMessageHeight=function(g){var f=document.getElementById("resultMessage");if(f!=null){f.style.height=g}this.ResultMessageHeight=g};this.GetResultMessageHeight=function(){return this.ResultMessageHeight};this.SetResultPageContinueRef=function(f){document.getElementById("IDResultPageContinueRef").innerHTML=f};this.ShowResBottomCaptions=function(f){var g=document.getElementById("IDResBottomCaptions");if(f){g.style.visibility="visible"}else{g.style.visibility="hidden"}if(ResultInfo.RefToLast!=""&&Environment.IsOnline()){ResultPage.ShowRefToLast(true)}else{ResultPage.ShowRefToLast(false)}};this.ExTable={Show:function(){document.getElementById("IDResExTable").style.display=""},Hide:function(){document.getElementById("IDResExTable").style.display="none"}};this.Tables={Today:function(){return'		<span id="IDResultToday"><table style="width: 231px; table-layout: fixed; margin-top: 5px;" border="0" cellpadding="0" cellspacing="0">		<tr height="18">			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_0.png)" width="4"/>			<td width="64" style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_1.png) no-repeat"/><div style="font-size: 11px; color: #3B91D3; display: block; margin-left: 3px;">'+Locale.ResultPageTodayBlockTitle+'</div>			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_2.png) repeat-x"/>			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_4.png)" width="4"/>		</tr><tr>			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_5.png)"/>			<td colspan="2">				<table border="0" width="100%">        <tr><td width="64" align="left">				<span class="classSmallGrayPanelFont"><nobr>'+Locale.attemptsCompleted+'</nobr></span>				</td><td  align="right">				<div id="resultSpeed"><table><tr><td><b class="classBlueB"></b>            <div display="inline" class="classBlueDiv"><FONT Size=2><span id="resultPanelNumAttempts">121</span></FONT></div>            <b class="classBlueB"></b></td></tr></table></div>			</td></tr>			  <tr><td width="64" align="left">				<span class="classSmallGrayPanelFont"><nobr>'+Locale.averageSpeed+'</nobr></span>				</td><td  align="right">				<div id="resultSpeed"><table><tr><td><b class="classGreenB"></b>            <div display="inline" class="classGreenDiv"><FONT Size=2><span id="resultPanelAvarageSpeed">121</span></FONT></div>            <b class="classGreenB"></b></td></tr></table></div>			</td></tr>			<tr><td width="64" align="left">				<span class="classSmallGrayPanelFont"><nobr>'+Locale.totalTyped+'</nobr></span>				</td><td  align="right">				<div id="resultSpeed"><table><tr><td><b class="classBlueB"></b>            <div display="inline" class="classBlueDiv"><FONT Size=2><span id="resultPanelTextTyped">121</span></FONT></div>            <b class="classBlueB"></b></td></tr></table></div>			</td></tr>			<tr><td width="64" align="left">				<span class="classSmallGrayPanelFont"><nobr>'+Locale.totalErrors+'</nobr></span>				</td><td align="right">				<div id="resultSpeed"><table><tr><td><b class="classRedB"></b>            <div display="inline" class="classRedDiv"><FONT Size=2><span id="resultTotalNumOfErrors">121</span></FONT></div>            <b class="classRedB"></b></td></tr></table></div>			</td></tr>      </table>	  	</td>			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_9.png)"/>		</tr><tr height="4">			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_15.png)"/>			<td colspan="2" style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_17.png)"/>			<td style="background: url('+Environment.getResourceDirectory()+'img/TodayField/today_19.png)"/>		</tr></table></span> '}};this.elements={showRowResSpeedTable:function(g){var f="";if(g==false){f="none"}document.getElementById("IDTrResSpeedTable").style.display=f}};this.resultActions={getOverviewCaption:function(){if(GetExType()==32){return Locale.toLearning}else{return Locale.toLessonList}},getOverviewReference:function(){if(GetExType()==32){return"document.location.href = '/study/';"}else{return"document.location.href = '/study/"+commonInfo.CourseID+"/#"+exerciseInfo.LessonNumber+"';"}}};this.GetContent=function(h){var j="";var g="display: none";var k={ratingTable:g,pleaseWait:j,miksanatik:g};if(h!=null){if(h.doShowMiksanatikNow==true){k.ratingTable=g;k.pleaseWait=g;k.miksanatik=j}}var f='<TABLE WIDTH=900 CELLPADDING=4 CELLSPACING=0  style="cursor: default;" id="IDMainResultTable">	<COL WIDTH=73*>	<COL WIDTH=73*>	<COL WIDTH=37*>	<COL WIDTH=73*>'+this.ScreenResFragment2()+'	<TR><td colspan="4"><table border="0"><tr><td style="width:330px; height: 222px; vertical-align: top; background: url('+Environment.getResourceDirectory()+'img/Result/frame.PNG) top left no-repeat"><img id="IDResultImg" style="position: relative; left: 9px; top: 9px; width: 297px; height: 202px" src="'+Environment.getResourceDirectory()+'img/Result/201.jpg"></td><td style="vertical-align: top"><FONT COLOR="#333333">'+this.ResultMessageEmptyField.HTMLPreResultMessageField()+'<div id="resultMessage" class="ClassResultText"></div></FONT>'+this.ResultMessageEmptyField.HTMLPostResultMessageField()+'</td></tr></table></td>	</TR>	<TR id="IDTrResSpeedTable" height="30px">  <td colspan="4"><span id="IDResSpeedTable"></span><span id="IDResExTable"><table style="margin-top: 10px" width="100%" height="100%" cellpadding="0px" cellspacing="0px" border="0px"> <tr valign="bottom"> <td width="265px"></td><TD WIDTH="29%" align="left" valign="bottom">			<FONT COLOR="#5FAC20"><FONT FACE="Georgia"><FONT SIZE="5"><I><nobr><span id="IDStrTaskRating">'+Locale.exerciseRating+'</span>&nbsp;<span id="IDTaskNumber"></span></nobr></I></FONT></FONT></FONT></TD>		<TD COLSPAN=2 align="right" valign="middle">			<span id="IDResLsnSel" class="FntSlctor"></span></TD> </tr> </table> </span> </td>	</TR>	<TR>		<TD WIDTH=29% valign="top">		<table id="IDResultPanel" style="width: 231px; table-layout: fixed; margin-top: 5px;" border="0" cellpadding="0" cellspacing="0">		<tr height="18">			<td background="'+Environment.getResourceDirectory()+'img/ResultField/result_0.png" width="4"/>			<td width="64" style="background: url('+Environment.getResourceDirectory()+'img/ResultField/result_1.png) no-repeat"/><div style="font-size: 11px; color: #3B91D3; display: block; margin-left: 3px;">'+Locale.ResultPageResultBlockTitle+'</div>			<td style="background: url('+Environment.getResourceDirectory()+'img/ResultField/result_2.png) repeat-x"/>			<td background="'+Environment.getResourceDirectory()+'img/ResultField/result_4.png" width="4"/>		</tr><tr id="IDResultPanelSpeed">			<td background="'+Environment.getResourceDirectory()+'img/ResultField/result_5.png"/>			<td colspan="2">				<table width="100%"><tr><td width="64">				<span class="classSmallGrayPanelFont">'+Locale.speed+'</span>				</td><td align="right">				<div id="resultSpeed"><table><tr><td><b class="classGreenB"></b>            <div display="inline" class="classGreenDiv"><FONT Size=2><span id="resultPanelSpeed">000</span></FONT></div>            <b class="classGreenB"></b></td></tr></table></div>			</td></tr><tr><td width="64">				<span class="classSmallGrayPanelFont">'+Locale.timeSpent+'</span>				</td><td align="right">				<div id="resultTimeElapsed"><table><tr><td><b class="classBlueB"></b>            <div display="inline" class="classBlueDiv"><FONT Size=2><span id="IDResultTimeElapsed">&nbsp;</span></FONT></div>            <b class="classBlueB"></b></td></tr></table></div>			</td></tr>      <tr id="IDResultPanelErrors"><td width="64">				<span class="classSmallGrayPanelFont">'+Locale.numErrors+'</span>				</td><td align="right">				<div id="resultNumOfMistakes"><table><tr><td><b class="classRedB"></b>            <div display="inline" class="classRedDiv"><FONT Size=2><span id="resultPanelNumOfErrors">121</span></FONT></div>            <b class="classRedB"></b></td></tr></table></div>			</td></tr>			<tr id="IDResultPanelRating"><td width="64" align="left">				<span class="classSmallGrayPanelFont">'+Locale.rating+'</span>				</td><td  align="right">				<div id="resultRating"><table><tr><td><b class="classBlueB"></b>            <div display="inline" class="classBlueDiv"><FONT Size=2><span id="resultPanelRating">121</span></FONT></div>            <b class="classBlueB"></b></td></tr></table></div>			</td></tr>      </table>	  	</td>			<td background="'+Environment.getResourceDirectory()+'img/ResultField/result_9.png"/>		</tr><tr height="4">			<td background="'+Environment.getResourceDirectory()+'img/ResultField/result_15.png"/>			<td colspan="2" background="'+Environment.getResourceDirectory()+'img/ResultField/result_17.png"/>			<td background="'+Environment.getResourceDirectory()+'img/ResultField/result_19.png"/>		</tr></table>     		</TD>		<TD id="'+this.resultInnerTdId+'" ROWSPAN=2 COLSPAN=3 WIDTH=71% align="center"><table cellpadding="4px" cellspacing="0px" border="0px" style="width: 100%; height:'+this.contentAndFarActionsTable.getHeightByExerciseType(GetExType())+'"><tr><td style="height: 100%; text-align: center"><div><div style="margin-bottom: 70px" id="'+this.PleaseWaitId+'" style="'+k.pleaseWait+'">'+componentsInHTML.pleaseWait+'</div><div style="background: #E2E2E2; height: 310px; color: #4E4E4E; font-size: 12px; display: none" id="'+this.ratingFillYourProfileId+'"><table style="width: 100%; height: 100%"><tr><td style="text-align: center; vertical-align: middle">'+Locale.ratingFillYourProfile+'</td></tr></table></div><span id="'+this.RatingTableSpanId+'" style="'+k.ratingTable+'"><TABLE WIDTH="100%" HEIGTH="100%" BORDER=0 CELLPADDING=1 CELLSPACING=0 id="'+this.RatingTableId+'"><TR VALIGN=TOP height="25px"><TD WIDTH=22% align="center"><FONT SIZE=4><span id="resultUserTablePosition" style="cursor: pointer">'+Locale.position+'</span></FONT></p></TD><TD WIDTH=42% align="center"><FONT SIZE=4><span id="resultUserTableTyper">'+Locale.soloist+'</span></FONT></p></TD><TD WIDTH=12% align="center"><FONT SIZE=4><span id="resultUserTableSpeed" onclick="ClickResultUserTableSpeed();" style="cursor: pointer"><FONT class="resultUserTableHeadDashed">'+Locale.speed+'</FONT></span></FONT></p></TD><TD WIDTH=12% align="center"><FONT SIZE=4><span id="resultUserTableNumOfErrors" onclick="ClickResultUserNumOfErrors();" style="cursor: pointer"><FONT class="resultUserTableHeadDashed">'+Locale.numErrors+'</FONT></span></FONT></p></TD><TD WIDTH=12% align="center"><FONT SIZE=4><span id="resultUserTableRating" onclick="ClickResultUserTableRating();" style="cursor: pointer"><FONT class="resultUserTableHeadDashed">'+Locale.rating+"</FONT></span></FONT></p></TD></TR>"+this.FormRatingTableRows()+'</TABLE></span><img style="margin: 50px;'+k.miksanatik+'" id="'+this.MiksanatikBlockId+'" src="'+Environment.getResourceDirectory()+'img/Miksanatik/bigMainMiksanatik.PNG"></div></td></tr><tr><td style="vertical-align: bottom"><span id="IDResBottomCaptions" style="visibility: hidden"><table width="100%" height="30px" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="bottom"><span style="visibility: hidden" id="IDRefToLast" class="ResultPageBotCaptRed"></span></td><td align="right" valign="bottom" width="33%"><span id="IDResPGoToLessonList" class="ResultPageBotCaptBlue"><a onclick="'+this.resultActions.getOverviewReference()+'"><nobr>'+this.resultActions.getOverviewCaption()+'</nobr></a></span></td><td align="right" valign="bottom" width="33%"><span id="IDResPContinue" class="ResultPageBotCaptGreen"><a id="IDResultPageContinueRef" onclick="CloseOrGoToPage()"></a></span></tr></table></span></td></tr></table>		</TD>	</TR>	<TR VALIGN=top>		<TD WIDTH=29%>'+this.Tables.Today()+'		</TD>	</TR>	<TR id="IDSpeedTestRegisterEnterTr" VALIGN="bottom">		<TD colspan="4" align="left"><span id="IDSpeedTestRegisterLabel">'+Locale.loginRegister+"</span></TD></TR></TABLE>";return f}}function FormatToStrings(f,a){var g="";for(var e=0;e<f.length;e++){var c=e+a;if(c>f.length){c=f.length}else{for(;f.charAt(c)!=" ";c--){}}var d=f.substr(e,c-e);var b=d.search("\n");if(b!=-1){c-=d.length-b;d=d.substr(0,b)}g+=d+"\n";e=c}return g}var BOpened=false;var references={flashPlayerInstall:function(){return"http://get.adobe.com/flashplayer"}};screenResolution=commonUtils.ScreenResolution({vertLowLimit:1024});var messages={errors:{getFlashPlayerNotInstalled:function(){return"<p>"+Locale.noFlash+"</p><p><br><nobr><a href='"+references.flashPlayerInstall()+"'>"+Locale.installFlash+"</a></nobr></p>"}}};var pageUpdater={speedTest:{idTestBlockAttempts:"idTestBlockAttempts",idTestBlockSpeed:"idTestBlockSpeed",idTestAttempts:"idTestAttempts",idTestBestSpeed:"idTestBestSpeed",idTestAttemptsCaption:"idTestAttemptsCaption",idTestBestSpeedCaption:"idTestBestSpeedCaption",_getNextAttempts:function(c){var a;var d=$("#"+this.idTestAttempts+c).html();try{numCurAttempts=parseInt(d);if(isNaN(numCurAttempts)){throw"error"}a=String(numCurAttempts+1)}catch(b){if(d=="once"){a="2"}else{if(d=="twice"){a="3"}else{a="1"}}}return a},getNextAttempts:function(a){return this._getNextAttempts(a)},getAttemptsByNumberAndLocaleId:function(a,b){if(b==2){if(a==1){result="once"}else{if(a==2){result="twice"}else{result=String(a)}}}else{result=String(a)}return result},getAttemptsByCourseIdAndLocaleId:function(c,b){var a;var d=this._getNextAttempts(c);a=this.getAttemptsByNumberAndLocaleId(d,b);return a},getNumAttemptsNotationByLocaleId:function(c,b,d){var a;if(d==1){a=b}else{if(c>2){a="times"}else{a=""}}return a},update:function(g,c,f,b,a){try{$("#"+this.idTestBlockAttempts+g).show();$("#"+this.idTestBlockSpeed+g).show();try{testAttemptsVal=parseInt($("#"+this.idTestAttempts+g).html());testBestSpeedVal=parseInt($("#"+this.idTestBestSpeed+g).html());if(isNaN(testAttemptsVal)||isNaN(testBestSpeedVal)){throw"error"}}catch(d){testAttemptsVal=0;testBestSpeedVal=0}if(c>testBestSpeedVal){testBestSpeedVal=c;$("#"+this.idTestBestSpeed+g).html(String(c));$("#"+this.idTestBestSpeedCaption+g).html(f)}$("#"+this.idTestAttempts+g).html(String(b));$("#"+this.idTestAttemptsCaption+g).html(this.getNumAttemptsNotationByLocaleId(b,a,params.locale_id))}catch(d){}}}};var ie={flashPlayerNotInstalled:{id:"ieFlashPlayerNotInstalled",getDiv:function(){return"<div class='flashPlayerNotInstalledMessage' id='"+this.id+"'>"+messages.errors.getFlashPlayerNotInstalled()+"</div>"},hideDiv:function(){document.getElementById(this.id).style.display="none"}}};var mainWindow={innerId:"IDFlashTypeContainer",message:{flash:{notInstalled:function(){var a=document.getElementById(mainWindow.innerId);a.className="flashPlayerNotInstalledMessage";a.innerHTML=messages.errors.getFlashPlayerNotInstalled()},wrongVersion:function(a,b){var c=document.getElementById(mainWindow.innerId);c.className="flashPlayerNotInstalledMessage";c.innerHTML="<p>"+Locale.flashPlayerOldVersion0+a+Locale.flashPlayerOldVersion1+b+".</p><p>"+Locale.flashPlayerOldVersion2+"<a href='http://get.adobe.com/flashplayer'>http://get.adobe.com/flashplayer</a>.</p>"}}}};function SetWindowOpened(a){BOpened=a}function GetWindowOpened(){return BOpened}var siteUserList={enable:function(){userQueueIntervalId=setInterval(updatePage,10000)},disable:function(){clearInterval(userQueueIntervalId)}};var IsDebug=false;var IsModeShowResult=true;var IDUserCite="IDCite";var IDUserInput="IDUserInput";var IDUserInput2="IDUserInput2";var CaretPos=0;var ExerciseText="";var ExerciseText2="";var bSymbolTyped=false;function TimerSymbolTyped(){bSymbolTyped=true}var CurTime=0;var LastKeyTime=0;var TypingTimeout=1000;var CloseRedoObjRes=new TCloseRedoObj("CloseRedoObjRes","CloseDontGoToPage","RepeatExercise",Locale.close,Locale.repeat);var IDFingerZones="IDFingerZones";var IDFingerZonesTd="IDFingerZonesTd";var UserName="";var UserCaption=new TUserCaption(UserName);var TaskNum="10.2";var TaskCaption=new TTaskCaption(TaskNum);var Miksanatik=new TMiksanatik();function TTime(){this.Time=0;this.GetTimeSec=function(){return _specMath.floor(this.Time/1000,2)};this.SetTime=function(a){this.Time=a};this.IncTypingTime=function(a){this.Time+=a};this.GetTime=function(){return this.Time}}var Time=new TTime();function TSpeed(){this.Speed=0;this.MaxSpeed=1000;this.MinSpeed=20;this.Update=Update;this.SpeedSum=0;this.SpeedSumCnt=0;this.bInited=false;this.SetSpeed=function(a){if(a>this.MinSpeed){this.Speed=a}else{this.Speed=0}this.UpdateSpeedSum(this.Speed)};this.ClearSpeedSum=function(){this.SpeedSum=0;this.SpeedSumCnt=0};this.UpdateSpeedSum=function(a){this.SpeedSum+=a;this.SpeedSumCnt++};this.GetTotalSpeed=function(){var a=_specMath.round(60*NumOfTypedChars/Time.GetTimeSec(),2);if(a==Infinity){a=SupposeSpeed_}return a}}this.GetSpeed=function(){return this.Speed};var Speed=new TSpeed();var IDCiteInputTable="CiteInputTable";var IDCloseRedoFingersTable="CloseRedoFingersTable";var InputField;var InputField2;var WindowTop=0;var WindowLeft=0;var BHighXYRatio=false;var ResultPage=new TResultPage("ResultContent","ExerciseContent");var ResultImg=new TResultImg("IDResultImg",Environment.getResourceDirectory()+"img/Result/",".jpg");var RESULT_RATING_TABLE=0;var RESULT_LITERACY=1;var RESULT_MIKSANATIK=2;var RESULT_NONE=3;var flash={};var styles={message:function(div){with(div.style){background="#FCCA00";fontSize="16px";textAlign="center";color="black";fontWeight="bold"}},overflowY:{_style:"overflow-y",enableScroll:function(a){$("#"+a).css(this._style,"scroll")}}};flash.outdatedFlashPlayer=function(){var exDiv=document.getElementById("exercise");var opDiv=document.createElement("div");styles.message(opDiv);with(opDiv.style){position="relative";top="-"+String(exDiv.offsetHeight+18)+"px"}opDiv.innerHTML=Locale.updateFlash+": <nobr><a href='"+references.flashPlayerInstall()+"'>"+references.flashPlayerInstall()+"</a>.</nobr>";exDiv.appendChild(opDiv);opDiv.appendChild(opText)};exerciseUserStatus={numErrors:0,getNumErrors:function(){return this.numErrors},setNumErrors:function(a){this.numErrors=a}};function GetCaretProgress(){return 100*(CaretPos+1)/ExerciseText.length}function ExNumOfLines(){var b,a;for(a=0,b=ExerciseText.indexOf("\n",b)+1;b!=0;a++,b=ExerciseText.indexOf("\n",b)+1){}return a}var BUserLogin=false;function IsUserLogin(){return(exerciseInfo.UserName!=""||SpeedTestInfo.UserName!="")}function getScrollY(){return document.documentElement.scrollTop}var BAutoTyping=false;function GoToLastAvailable(){navigateTo("/study/10/#10.1")}function GoToLessonList(a){navigateTo("/study/"+commonInfo.CourseID+"/#"+exerciseInfo.LessonNumber)}var closeOrGoToPage={handleSpeedType:function(a){if(a==32){UnsetResultPageThenClose();return true}return false},handleGoToExerciseCurrentLesson:function(a){if(a!=""){return true}return false},goToExerciseCurrentLesson:function(a,c){var b=".";if(a!=""&&c!=""){document.location.href=commonUtils.linkConstructor.replaceParagraph(commonUtils.getCurrentURL(),a+"."+c)}},handleGoToNextLesson:function(a){navigateTo(a)}};var URLUtils={getCurrentLessonNum:function(){var a=/\d+\/(\d+)/;currentURL=commonUtils.getCurrentURL();currentLessonNumArr=currentURL.match(a);return parseInt(currentLessonNumArr[1])}};function handleChangeLesson(){if(lessonChanger.exercise.canChange()){var e=ResultInfo.NextLessonNo;var d=ResultInfo.NextExerciseNo;if(ResultInfo.IDNext!=""){var b=ResultInfo.IDNext.split(" ");if(b.length>0){lessonChanger.exercise.activateLast(b[b.length-1])}if(b.length>1){for(var a=0;a<b.length-1;++a){lessonChanger.exercise.activate(b[a])}}}if(ResultInfo.IDMax!=""){if(ResultInfo.IDNext!=""&&parseInt(ResultInfo.IDMax)<parseInt(ResultInfo.IDNext)){lessonChanger.exercise.activate(ResultInfo.IDMax)}else{lessonChanger.exercise.activateLast(ResultInfo.IDMax)}}if(e!=""&&d!=""){var f=document.getElementsByName("inaccessibleExerciseHint");for(var a=0;a<f.length;++a){f[a].innerHTML=Locale.firstDoExercise+" "+ResultInfo.NextLessonNo+"."+ResultInfo.NextExerciseNo}}if(ResultInfo.IDRemove!=""){var g=document.getElementById("repeat"+ResultInfo.IDRemove);g.style.display="none"}if(ResultInfo.IDAdd!=""){var g=document.getElementById("repeat"+ResultInfo.IDAdd);var c=document.getElementById("repeat_text"+ResultInfo.IDAdd);g.style.display="";c.innerHTML=ResultInfo.TextRepeat}if(ResultInfo.FreeAttempts!=""&&ResultInfo.FreeAttempts==0){if(document.getElementById("IDExercisesLeft")!=null){document.getElementById("IDExercisesLeft").innerHTML=Locale.noFreeAttempts}}}lessonChanger.exercise.changed()}function handleChangeLocation(){if(!closeOrGoToPage.handleSpeedType(GetExType())){var a=ResultInfo.NextLessonNoVirtual;if(closeOrGoToPage.handleGoToExerciseCurrentLesson(ResultInfo.RefToLast)){if(a!=String(URLUtils.getCurrentLessonNum())){closeOrGoToPage.handleGoToNextLesson(ResultInfo.RefToNext)}}else{if(ResultInfo.RefToNext!=""){closeOrGoToPage.handleGoToNextLesson(ResultInfo.RefToNext)}}}}function CloseOrGoToPage(){handleChangeLocation();UnsetResultPageThenClose()}function CloseDontGoToPage(){UnsetResultPageThenClose()}var CorrectWords=new Array();function FillCorrectWords(a){var c=Array();for(var b=0;b<a.length;b++){if(a.charAt(b)!=" "&&a.charAt(b)!="\n"){c+=a.charAt(b)}else{CorrectWords.push(c);c=""}}}window.onblur=function(){};function IsWindows(){return navigator.appVersion.indexOf("Windows")!=-1}function onTypeFlashLoaded(){var exType=GetExType();if(isIe()){soloTypeFlash.init()}with(soloTypeFlash){hidePleaseWait();setResourceDirectory(Environment.getResourceDirectory());setCite(CiteInfo.Text);setCiteAuthor(CiteInfo.Author);setWrongLayoutMessage(Locale.wrongLayout);setStartMessage(Locale.start);setCloseMessage(Locale.close);setInsteadMessage(Locale.insteadOf);setYouTypedMessage(Locale.youTyped);setRussianLayoutHintMessage(Locale.russianLayoutHint);setUkrainianLayoutHintMessage(Locale.ukrainianLayoutHint);setGermanLayoutHintMessage(Locale.germanLayoutHint);setFrenchLayoutHintMessage(Locale.frenchLayoutHint);setItalianLayoutHintMessage(Locale.italianLayoutHint);setChangeLayoutHintMessage(Locale.changeLayoutHint);setToggleColoredHintMessage(Locale.toggleColoredHint);setToggleShowCharsHintMessage(Locale.toggleShowCharsHint);setToggleShowNextKeyHintMessage(Locale.toggleShowNextKeyHint);setSpeedTestMessage(Locale.speedTest);setStartExamMessage(Locale.startExam);setEndExamMessage(Locale.endExam);setExerciseMessage(Locale.exercise);setTypeFieldsTitle(Locale.toTypeClickHere)}if(exType==32){if(Environment.IsOnline()){info=SpeedTestInfo}else{if(exerciseInfo.IsExam){info=ExamInfo}else{info=SpeedTestInfo}}}else{info=exerciseInfo}soloTypeFlash.setErrorTexts(ErrorsInfo.GetErrors().join("#"));soloTypeFlash.setLastErrorTexts(Locale.lastErrors.join("#"));if(exType==32){switch(exerciseInfo.typeExam){case"startExam":soloTypeFlash.setTypeTest("startExam");break;case"finalExam":soloTypeFlash.setTypeTest("endExam");break;default:soloTypeFlash.setTypeTest("speedTest")}soloTypeFlash.setExerciseType("2")}else{soloTypeFlash.setExerciseType(commonInfo.TypeOfExercise)}if(exType==7){soloTypeFlash.setText1(info.Text);soloTypeFlash.setText2(info.Text2)}else{soloTypeFlash.setText(info.Text)}soloTypeFlash.beginExercise();soloTypeFlash.setMaxErrors(exerciseInfo.MaxNumOfMistakes);soloTypeFlash.setUser(info.UserName);if(exType!=32){soloTypeFlash.setLessonExercise(exerciseInfo.LessonNumber+"."+exerciseInfo.ExerciseNumber)}soloTypeFlash.setCourse(courseUtilities.getFlashNameById(commonInfo.CourseID));with(KeyboardInfo){soloTypeFlash.setKeyboardParameters(Layout,bNextKey,bShowChars,bColored)}with(soloTypeFlash){setErrorsIndicatorTexts(Locale.errorsIndicatorHeaderStaticText,Locale.errorsStaticText);setSpeedIndicatorTexts(Locale.speedIndicatorHeaderStaticText,Locale.speedStaticText);setTimeIndicatorTexts(Locale.timeIndicatorHeaderStaticText,Locale.timeStaticText0,Locale.timeStaticText1);setProgressIndicatorTexts(Locale.progressIndicatorHeaderStaticText,Locale.progressStaticText);setFingersTexts(Locale.fingersHeaderStaticText,Locale.littleFingerStaticText,Locale.ringFingerStaticText,Locale.middleFingerStaticText,Locale.leftForefingerStaticText,Locale.rightForefingerStaticText,Locale.thumbStaticText)}soloTypeFlash.setLayoutTexts(Locale[commonInfo.getLayoutText()])}function fInputLoaded(){if(!FlashInput.IsFlashLoaded()){setTimeout(fInputLoaded,500);if(Environment.IsOnline()){FlashInput.GenerateOnloadMessage()}return}FlashInput.InitOS();FlashInput.OnFlashLoaded();fSetRegime(GetExType())}function flashKeyboardChangeLayout(a){if(IsUserLogin()){RequestSaveKeyboardParam("layout",a)}KeyboardInfo.Layout=a;soloTypeFlash.layoutChanged()}function flashKeyboardChangeShowNextKey(a){RequestSaveKeyboardParam("next_key",a)}function flashKeyboardChangeColored(a){RequestSaveKeyboardParam("keyboard_colored",a)}function flashKeyboardChangeShowChars(a){RequestSaveKeyboardParam("show_chars",a)}function flashShowAboutLayout(){window.open("/study/")}function flashFastError(){ExerciseError(false)}function flashError(c,b,a){Context.SetError(true);ExerciseError(IsWrongLayout(c));CaretPos=parseInt(b)}var NumOfTypedChars=0;function IsTypChError(a){if(a==String(null)){return false}else{return true}}function flashMiksErrFixed(){CiteField.Restore();CiteField.Render();CiteField.Update()}function fFinishExercise(){PrepareResult()}function flashFinishExercise(c,a,b){exerciseUserStatus.setNumErrors(parseInt(c));NumOfTypedChars=a;Time.SetTime(parseInt(b));fFinishExercise();setTimeout(function(){FinishExercise()},0)}function fSetRegime(a){switch(a){case 0:case 2:return;case 32:return;case 1:case 6:case 8:return;case 3:return;case 4:return;case 7:return}}function IsExFinished(){return(CaretPos==ExerciseText.length)}function GetExType(){return commonInfo.TypeOfExercise}function SetExerciseText(b,a){var d,c;if(GetExType()!=32){c=a}d=b;switch(GetExType()){case 5:TextFragmentsData.SetBlockingWords(d);d=StrDeleteSymbols(d,"«»");c=StrDeleteSymbols(c,"«»");FillCorrectWords(c);break;case 7:d=StrDeleteSymbols(d,"«»");break;default:}ExerciseText=d}function SetExerciseNumberCaption(a){TaskCaption.SetTaskCaption(a)}function SetStartExamCaption(){TaskCaption.SetStartExamCaption()}function SetFinalExamCaption(){TaskCaption.SetFinalExamCaption()}function SetSpeedTestCaption(){TaskCaption.SetSpeedTestCaption()}function SetExerciseUser(a){if(a!=""){BUserLogin=true}else{BUserLogin=false}UserCaption.Set(a)}function TMouse(){this.X=-1;this.Y=-1;this.PrevX=-1;this.PrevY=-1;this.GetX=function(){return this.X};this.GetY=function(){return this.Y};this.BChangeWndPos=false;this.Capture=function(){this.BChangeWndPos=true};this.Release=function(){this.BChangeWndPos=false;soloTypeFlash.killFocus()};this.IsCaptured=function(){return this.BChangeWndPos}}var Mouse=new TMouse();function SetExercsiePos(c,b){var a=document.getElementById("exercise");a.style.left=String(c)+"px";a.style.top=String(b)+"px"}$(window).resize(function(a){if(windowSys.mainWindow.isInitialized()){var c=windowSys.mainWindow.getLeft();var b=windowSys.mainWindow.getTop();if(b<0||c<0){windowSys.mainWindow.center()}}});function MouseMove(d){if(window.navigator.appName=="Microsoft Internet Explorer"){Mouse.X=event.clientX;Mouse.Y=event.clientY}else{Mouse.X=d.pageX;Mouse.Y=d.pageY}if(Mouse.X<0){Mouse.X=0}if(Mouse.Y<0){Mouse.Y=0}if(Mouse.IsCaptured()){var a=Mouse.X-Mouse.PrevX;var f=Mouse.Y-Mouse.PrevY;var c=getPxNumber(windowSys.mainWindow.obj.style.left);var b=getPxNumber(windowSys.mainWindow.obj.style.top);windowSys.mainWindow.obj.style.left=String(c+a)+"px";windowSys.mainWindow.obj.style.top=String(b+f)+"px"}Mouse.PrevX=Mouse.X;Mouse.PrevY=Mouse.Y;return true}InitMouse();function InitMouse(){if(window.navigator.appName!="Microsoft Internet Explorer"){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=MouseMove}var PrevText="";var ReturnSpecChar=" ";var DbgTypeCntr=0;function TypeDebug(){if(IsDebug==false){return false}if(DbgTypeCntr==2){setTimeout("FinishExercise()",0);ShowResult()}else{ExerciseStepForward();UpdatePanels()}DbgTypeCntr++;return true}function PrepareResult(){CaretPos=0;ResultSpeedTestInfo.Reset();if(Environment.IsOnline()){ShowResult(commonInfo.TypeOfExercise)}else{if(commonInfo.TypeOfExercise==32){if(exerciseInfo.isExam==false){scormExchange.setSpeedTestFinished(scormUtils.markSpeed.isSpeedTestPassed(exerciseUserStatus.getNumErrors(),Speed.GetTotalSpeed()),Speed.GetTotalSpeed(),exerciseUserStatus.getNumErrors())}else{var a=(exerciseInfo.examType=="finalExam");scormExchange.setExamFinished(true,a,Speed.GetTotalSpeed(),exerciseUserStatus.getNumErrors())}}else{if(ErrorObj.isAllowableMistakes()){scormExchange.setExerciseFinished(exerciseInfo.ExerciseNumber)}}ShowResult(commonInfo.TypeOfExercise)}}function UpdatePanels(a){if(a==true){if(progress>100){progress=100}}}function IsSymbolCorrect(b,a){return((b==a)||(b=="\n"&&a==" "))}function DoBuffersMatch(){}var IntervalFirstKeyboardKeyID="";function SetCurKeyboardKey(){clearInterval(IntervalFirstKeyboardKeyID)}function ExerciseInit(){CaretPos=0;Speed.SetSpeed(0);UpdatePrevText(ExerciseText.slice(0,CaretPos));switch(GetExType()){case 0:case 5:break;default:}NumOfTypedChars=0}function StrReplaceAll(e,b,d){var a=e;var c="";while(a!=c){c=a;a=c.replace(b,d)}return a}var BErrorMovieFinished=false;function UpdateKey(){var a=ExerciseText.charAt(CaretPos);if(a=="\n"){a=" "}if(IsKeyboard){try{}catch(b){}}}function ExerciseStepForward(a){switch(GetExType()){case 7:CaretPos++;break;case 5:if(a){CaretPos++;return}else{return}break;default:CaretPos++}UpdateKey();if(a==undefined||a==true){iSymbolsTypedOneSecond++}}function ExercisePos(a){CaretPos=a}function UpdatePrevText(b){var a=document.getElementById("typer");PrevText=StrReplaceAll(b,"\n"," ")}function ShowResult(a){var b=new Object();if(a==0){b.doShowMiksanatikNow=true}ResultPage.Set(b)}function ShowResultInnerByOption(a){switch(a){case RESULT_MIKSANATIK:ResultPage.ShowMiksanatik();break;case RESULT_LITERACY:ResultPage.ShowGrammarResult();break;case RESULT_NONE:ResultPage.HideMain();break;default:ResultPage.ShowRatingTable()}}function FinishExercise(){if(GetExType()==32){if(ResultExtPage!=""){navigateTo(ResultExtPage+"?speed="+Speed.GetTotalSpeed()+"&errors="+exerciseUserStatus.getNumErrors());return}if(ResultSpeedTestInfo.IsResponseReceived()==false){if(ResultSpeedTestInfo.IsRequested()==false){var speed=Speed.GetTotalSpeed();RequestSpeedTestResult(speed,pageUpdater.speedTest.getNextAttempts(commonInfo.CourseID),exerciseUserStatus.getNumErrors(),Time.GetTimeSec(),commonInfo.CourseID)}setTimeout("FinishExercise()",TimeoutAJAX);return}}else{if(ResultInfo.IsResponseReceived()==false){if(ResultInfo.IsRequested()==false){RequestResult(exerciseInfo.SortID,Speed.GetTotalSpeed(),exerciseUserStatus.getNumErrors(),Time.GetTimeSec(),commonInfo.CourseID,commonInfo.iteration)}setTimeout("FinishExercise()",TimeoutAJAX);return}}if(TodayResultInfo.IsResponseReceived()==false){if(TodayResultInfo.IsRequested()==false){RequestTodayResult()}setTimeout("FinishExercise()",TimeoutAJAX);return}ResultSpeedTestInfo.Reset();ResultInfo.Reset();TodayResultInfo.Reset();ResultPage.show();if(GetExType()==32){with(ResultPage){UpdatePanelFullTime()}ResultPage.SetHeader(Locale.yourResult+": "+ResultSpeedTestInfo.Speed+" "+ResultSpeedTestInfo.SpeedNotation+", "+ResultSpeedTestInfo.Errors+" "+ResultSpeedTestInfo.ErrorsNotation);with(ResultPage){SetResultMessage(ResultSpeedTestInfo.Text);SetResultPanelDisplay(false)}with(ResultPage){SetNumOfAttempts(TodayResultInfo.NumAttempts);SetAvarageSpeed(TodayResultInfo.AvarageSpeed);SetNumOfSymbolsTyped(TodayResultInfo.SymbolsTyped);SetNumOfErrors(TodayResultInfo.NumOfErrors);if(IsUserLogin()||!Environment.IsOnline()){SetSpeedTestRegisterEnterTrDisplay(false)}else{SetSpeedTestRegisterEnterTrDisplay(true)}SetCrit(3);SetResultPageContinueRef(Locale.close);ExTable.Hide()}}else{with(ResultPage){SetPanelSpeed(Speed.GetTotalSpeed());UpdatePanelFullTime();SetPanelNumOfErrors(exerciseUserStatus.getNumErrors());SetPanelRating(Math.floor(ResultInfo.Rating*100)/100);SetHeader(ResultInfo.Header);SetResultMessage(ResultInfo.Text);SetLessonExercise(exerciseInfo.LessonNumber,exerciseInfo.ExerciseNumber);SetNumOfAttempts(TodayResultInfo.NumAttempts);SetAvarageSpeed(TodayResultInfo.AvarageSpeed);SetNumOfSymbolsTyped(TodayResultInfo.SymbolsTyped);SetNumOfErrors(TodayResultInfo.NumOfErrors);SetSpeedTestRegisterEnterTrDisplay(false);SetCrit(3);SetExerciseID(exerciseInfo.ID);if(Environment.IsOnline()){ExTable.Show()}ResultPage.elements.showRowResSpeedTable(Environment.IsOnline())}UpdatePage();ResultPage.SetResultPageContinueRef(Locale.goNext)}var exType=GetExType();if(exType==0||exType==3||exType==4||exType==7||exType==8){ShowResultInnerByOption(RESULT_MIKSANATIK)}}var SymbolsTyped=new Array(0,0,0);var iSymbolsTypedOneSecond=0;function getCurTime(){var a=new Date();return a.getTime()}function TimerGetElapse(){var a=getCurTime();var b=a-PrevTime;PrevTime=a;return b}var BTimerWasStopped=true;var PrevTime;function LeftSideError(){var a="";TableBuilder.ResetT();TableBuilder.ResetT();TableBuilder.SetTHeight("100%");TableBuilder.SetTWidth(WidthLeftSideTyping);a+=TableBuilder.BeginTable();TableBuilder.SetTHeight(String(CiteField.GetEmptyField().GetRowHeight()));a+=TableBuilder.BeginTr();TableBuilder.SetTValign("top");a+=TableBuilder.BeginTd();a+=TableBuilder.EndTd();a+=TableBuilder.EndTr();a+=TableBuilder.BeginTr();TableBuilder.SetTValign("top");TableBuilder.SetTAlign("right");a+=TableBuilder.BeginTd();a+=Locale.insteadOf;a+=TableBuilder.EndTd();a+=TableBuilder.EndTr();TableBuilder.ResetT();a+=TableBuilder.BeginTr();TableBuilder.SetTValign("top");TableBuilder.SetTAlign("right");a+=TableBuilder.BeginTd();a+=Locale.youTyped;a+=TableBuilder.EndTd();a+=TableBuilder.EndTr();a+=TableBuilder.EndTable();return a}function SetLeftSideTyping(){document.getElementById(FingerZonesObj.GetID()).innerHTML=FingerZonesObj.Insert()}var WidthLeftSideTyping=0;function SetLeftSideError(){document.getElementById("IDTimeLowResolution").style.display="none";var b="font-family: Arial; font-size: 14pt; color: #555555;";var c=h;var g=document.getElementById(IDFingerZonesTd).offsetWidth;var a=document.getElementById("IDTdInput").offsetHeight/2;var j=document.getElementById("IDTdInput").offsetHeight/2;var d=0;var h=a+j+d;var f=a+d;var e=h-f;document.getElementById(FingerZonesObj.GetID()).innerHTML="<table height="+c+" width="+g+" cellspacing=0 cellpadding=0 border=0><tr height='"+f+"px'><td align='right' valign='top'><font style='"+b+"'>"+Locale.insteadOf+"</font></td></tr><tr height='"+e+"px'><td align=right valign=top><font style='"+b+"'>"+Locale.youTyped+"</font></td></tr></table>"}function PlaceInitInputCntrl(){var a="";a="hiderRadioOtherBrowsers";Write("<input id='IDInputRadio' type='text' class='"+a+"' onKeyPress='Type(event);' onblur='SetInputFocus_();'>");InitKeyPress()}function ShowTdUser(a){if(a==false){document.getElementById("IDTdUser").style.display="none"}else{document.getElementById("IDTdUser").style.display=""}}function ShowTdFingerZones(a){if(a==false){document.getElementById("IDTdLeft").style.display="none"}else{document.getElementById("IDTdLeft").style.display=""}}function SetMainTypingTableWidth(a){document.getElementById("IDMainTypingTable").style.width=String(a)+"px"}function GenerateExercise(){var a="";a+="<table border=0 cellspacing=0 cellpadding=0>";a+="<tr height='10px'><td width='10px'  class='bevelTopLeft'></td><td style='background: white' onmousedown='Mouse.Capture()'></td><td width='10px'  class='bevelTopRight'></td></tr>";a+="<tr><td style='background: white'></td><td style='background: white'>";a+=BeginSpan("id","ExerciseContent");a+="<span id='"+soloTypeFlash.getContainerId()+"'></span>";a+=EndSpan();a+=BeginSpan("id","ResultContent")+EndSpan();a+="</td><td style='background: white'></td><tr height='10px'><td class='bevelBottomLeft'></td><td valign='bottom' style='background: white'></td><td class='bevelBottomRight'></td></tr></table>";a+="<div id='IDResultPage'></div>";return a}var IsDebugActivated=false;function DebugOut(a){var b=document.getElementById("IDDebug");if(IsDebugActivated==false){document.getElementById("IDDebugTd").style.display="";IsDebugActivated=true}b.innerHTML=a}function UpdatePageIfSkipMode(){if(exerciseInfo.RefToNext!=""){CloseOrGoToPage()}}function UnsetResultPageThenClose(){ResultPage.Unset();Close()}function hide(){windowSys.body.restoreScroll();document.getElementById("exercise_background").style.display="none";document.getElementById("exercise_wrapper").style.display="none"}function Close(){try{SetWindowOpened(false);Context.SetError(false);soloTypeFlash.deinit();if(!isIe6()&&IsWindows()){soloTypeFlash.hide()}UpdatePageIfSkipMode();stickoutWindows.show()}catch(a){alert("error: "+a.message)}if(IsWindows()){hide()}else{setTimeout(hide,400)}if(commonInfo.afterCloseFunction!=null){commonInfo.afterCloseFunction()}lessonChanger.exercise.reset()}function UnsetResultPageClose(a){ResultPage.Unset();Close();if(a!=undefined){navigateTo(a)}}var OpacityCounter=0;var stickoutWindows={ids:Array("videoblock","gameblock"),changeVisible:function(d){for(var b in this.ids){for(var a=1;;a++){try{document.getElementById(this.ids[b]+String(a)).style.visibility=d}catch(c){break}}}},hide:function(){this.changeVisible("hidden")},show:function(){this.changeVisible("visible")}};var ResultExtPage="";var IsKeyboard=true;function ShowSpeedTest(b){var a=document.getElementById("IDExtSpeedTestResultPage");if(a!=null){ResultExtPage=a.value;IsKeyboard=false;ShowTdUser(false);ShowTdFingerZones(false);SetMainTypingTableWidth(600);SetExercsiePos(2,2)}b.type="speedTest";commonInfo.afterCloseFunction=b.afterCloseFunction;ShowExercise(b)}var TimeBegEx=0;function ResetBegTime(){var a=new Date();TimeBegEx=a.getTime()}function GetFullExTime(){var c=new Date();c.setTime(c.getTime()-TimeBegEx);var a=String(c.getMinutes());var b=String(c.getSeconds());if(a.length<2){a="0"+a}if(b.length<2){b="0"+b}return a+":"+b}function GetActiveExTime(){var a=Time.GetTimeSec();var d=String(Math.floor(a/60));var b=String(Math.floor(a-d*60));var c=_specMath.stringDecimals(a,2);if(d.length<2){d="0"+d}if(b.length<2){b="0"+b}if(c.lenght<2){c+="0"+c}return d+":"+b+"."+c}function Redirect(a){navigateTo(a)}var windowSys={topLimit:40,topIndent:40,body:{_el:"body",removeScroll:function(){$(this._el).css("overflow","hidden")},restoreScroll:function(){$(this._el).css("overflow","auto")}},mainWindow:{obj:null,bk:null,init:function(){this.bk=document.getElementById("exercise_background");this.obj=document.getElementById("exercise")},isInitialized:function(){return this.obj!=null},center:function(a){$(this.obj).center()},getLeft:function(){return $(this.obj).position().left},getTop:function(){return $(this.obj).position().top}}};function ShowExerciseRepeat(a){var b="ShowExercise({'type':'"+a.type+"', 'sortId':"+a.sortId+", 'courseId':"+a.courseId+", 'iteration':"+a.iteration+", 'bClicked':false})";setTimeout(b,TimeoutAJAX)}var generateStatus={bGenerated:false,doGenerated:function(){this.bGenerated=true},isGenerated:function(){return this.bGenerated},idTimeout:-1,reset:function(){this.idTimeout=-1},isTimeoutSet:function(){return(this.idTimeout!=-1)},setTimeoutId:function(a){this.idTimeout=a}};function ShowExercise(initInformation){if(!generateStatus.isGenerated()){if(generateStatus.isTimeoutSet()){generateStatus.setTimeoutId(setTimeout(function(){ShowExercise(generateStatus.initInformation)},TimeoutAJAX))}else{generateStatus.setTimeoutId(setTimeout(function(){ShowExercise(initInformation)},TimeoutAJAX));generateStatus.initInformation=initInformation}return}exerciseInfo.ID=initInformation.sortId;if(Environment.IsOnline()==false&&initInformation.bClicked!=false){ExerciseInfo.scorm.initById()}if(initInformation.bOffline!=undefined&&Mode.HasSet()==false){PageSettings.Load();Mode.SetOffline(true)}if(initInformation.bClicked==undefined||initInformation.bClicked==true){if(GetWindowOpened()){return}}SetWindowOpened(true);if(initInformation.type=="speedTest"){if(SpeedTestInfo.IsResponseReceived()==false){if(SpeedTestInfo.IsRequested()==false){RequestSpeedTest(initInformation.courseId)}setTimeout("ShowExercise({'type':'speedTest', 'bClicked': false, 'courseId':"+initInformation.courseId+"})");return}}else{if(initInformation.type=="startExam"||initInformation.type=="finalExam"){exerciseInfo.isExam=true;exerciseInfo.typeExam=initInformation.type;exerciseInfo.examType=initInformation.type;RequestAnswer.ExamGot()}else{if(exerciseInfo.IsResponseReceived()==false){if(exerciseInfo.IsRequested()==false){RequestExercise(initInformation.sortId,initInformation.courseId,initInformation.iteration)}ShowExerciseRepeat(initInformation);return}else{if(exerciseInfo.Redirect!=""){Redirect(exerciseInfo.Redirect);return}}}}if(CiteInfo.IsResponseReceived()==false){if(CiteInfo.IsRequested()==false){RequestCite(initInformation.courseId)}ShowExerciseRepeat(initInformation);return}if(GetExType()!=32){if(ErrorsInfo.IsResponseReceived()==false){if(ErrorsInfo.IsRequested()==false){RequestErrors()}ShowExerciseRepeat(initInformation);return}}if(KeyboardInfo.IsResponseReceived()==false){if(KeyboardInfo.IsRequested()==false){RequestKeyboardParams()}ShowExerciseRepeat(initInformation);return}if(OpacityCounter<5){if(OpacityCounter==0){windowSys.mainWindow.init();try{if(window.navigator.appName!="Netscape"){windowSys.mainWindow.bk.style.width=document.getElementById("full-page").offsetWidth;windowSys.mainWindow.bk.style.height=document.getElementById("full-page").offsetHeight}}catch(e){}}OpacityCounter++;if(window.navigator.appName=="Microsoft Internet Explorer"){windowSys.mainWindow.bk.style.filter="alpha(opacity="+String(OpacityCounter*10)+")"}else{windowSys.mainWindow.bk.style.opacity=OpacityCounter/10}windowSys.mainWindow.bk.style.display="";ShowExerciseRepeat(initInformation);return}if(GetExType()!=32){SetExerciseNumberCaption(String(exerciseInfo.LessonNumber)+"."+String(exerciseInfo.ExerciseNumber));exerciseInfo.Reset()}SpeedTestInfo.Reset();CiteInfo.Reset();KeyboardInfo.Reset();generateStatus.reset();OpacityCounter=0;stickoutWindows.hide();ResetBegTime();document.getElementById("exercise_wrapper").style.visibility="hidden";document.getElementById("exercise_wrapper").style.display="";windowSys.body.removeScroll();if(isIe6()){document.getElementById("exercise_wrapper").style.visibility="visible"}soloTypeFlash.show();soloTypeFlash.showPleaseWait();soloTypeFlash.init();setTimeout(function(){with(commonUtils.flash){if(!commonUtils.flash.installed()){mainWindow.message.flash.notInstalled()}else{var requiredVer={major:10,minor:1};if(!isValidVersion(requiredVer)){mainWindow.message.flash.wrongVersion(formatVersion(getCurVersion()),formatVersion(requiredVer))}}}},0);if(!isIe6()){styles.overflowY.enableScroll("exercise_wrapper")}try{if(isIe6()){onTypeFlashLoaded()}}catch(e){}ExerciseInit();ResultPage.RefToNextHasSet(false);if(isIe6()){windowSys.mainWindow.center(getScrollY())}else{setTimeout(function(){document.getElementById("exercise_wrapper").style.visibility="visible";windowSys.mainWindow.center()},200)}}function ShowInaccessibleHint(a){hintId=a.hintId;document.getElementById(hintId).style.visibility="visible";var b="HideInaccessibleHint({'hintId':'"+hintId+"'})";setTimeout(b,3000)}function HideInaccessibleHint(a){hintId=a.hintId;document.getElementById(hintId).style.visibility="hidden"}function requestCiteAndText(){if(CiteInfo.IsResponseReceived()==false){if(CiteInfo.IsRequested()==false){RequestCite(commonInfo.CourseID)}return false}if(SpeedTestInfo.IsResponseReceived()==false){if(SpeedTestInfo.IsRequested()==false){if(Environment.IsOnline()){RequestSpeedTest(commonInfo.CourseID)}else{if(exerciseInfo.IsExam()){RequestAnswer.ExamGot();return true}else{RequestSpeedTest(commonInfo.CourseID)}}}return false}return true}function resetRequestCiteAndText(){CiteInfo.Reset();SpeedTestInfo.Reset()}function ClickBegExercise(){if(GetExType()==32){if(requestCiteAndText()==false){setTimeout(ClickBegExercise,TimeoutAJAX);return}resetRequestCiteAndText();soloTypeFlash.setCite(CiteInfo.Text);soloTypeFlash.setCiteAuthor(CiteInfo.Author);soloTypeFlash.reset();soloTypeFlash.setText(SpeedTestInfo.Text)}soloTypeFlash.beginExercise()}function RepeatExercise(){if(isOpera()){soloTypeFlash.showAndInit()}if(GetExType()==32){if(requestCiteAndText()==false){setTimeout(RepeatExercise,TimeoutAJAX);return}else{if(isIe()){if(!isIe6()){soloTypeFlash.show()}}}resetRequestCiteAndText()}ResultPage.Unset();if(isIe6()){ClickBegExercise()}ExerciseInit()}function ShowMainWindow(a){soloTypeFlash.deinit();if(a){document.getElementById("exercise_wrapper").style.visibility="visible"}else{document.getElementById("exercise_wrapper").style.visibility="hidden"}}var ExerciseIniter={init:function(){document.getElementById("exercise").innerHTML=GenerateExercise();generateStatus.doGenerated()}};Write("<div id='exercise_background' onmouseup='Mouse.Release()' style='width: 3000px; height: 2000px; display: none'></div><div id='exercise_wrapper' style='display: none'><div id='exercise' onmouseup='Mouse.Release()' style='top: "+WindowTop+"px;'></div></div>");function flashTrace(a){}var lessonChanger={exercise:{_isChanged:false,reset:function(){this._isChanged=false},changed:function(){this._isChanged=true},canChange:function(){return(this._isChanged==false)},activate:function(f){var d=document.getElementById("start"+f);var a=document.getElementById("start_link"+String(f));var b=document.getElementById("start_link_inactive"+String(f));try{a.style.display=""}catch(c){}try{b.style.display="none"}catch(c){}try{d.className="start-exercise"}catch(c){}},activateLast:function(f){var d=document.getElementById("start"+f);var a=document.getElementById("start_link"+String(f));var b=document.getElementById("start_link_inactive"+String(f));try{a.style.display=""}catch(c){}try{b.style.display="none"}catch(c){}try{d.className="start-last-accessible"}catch(c){}},disactivate:function(f){var d=document.getElementById("start"+f);var a=document.getElementById("start_link"+String(f));var b=document.getElementById("start_link_inactive"+String(f));try{a.style.display="none"}catch(c){}try{b.style.display=""}catch(c){}try{d.className="start-inaccessible"}catch(c){}}}};var _interface={sNoData:Locale.noData,sSkipData:"---",sManySpaces:" &nbsp".repeat(40)};var soloTypeFlash={flashContainerId:"IDFlashTypeContainer",objectId:"IDFlashType",objectEmbedId:"IDEmbedFlashType",flashCaller:{flash:"soloTypeFlash",listener:"listener.",initialize:function(){if(window.document[this.flash]){this.flashRef=window.document[this.flash]}else{this.flashRef=document[this.flash]}},call:function(c,a){try{this.flashRef.SetVariable(this.listener+c,a)}catch(b){}},_isFlashInstalled:function(){return this.flashRef.GetVariable!=null}},nWidth:911,nHeight:611,additionalWidth:30,additionalHeight:50,width:"911px",height:"611px",setSizeCoefficient:function(a){this.width=String(Math.floor(this.nWidth*a))+"px";this.height=String(Math.floor(this.nHeight*a))+"px"},_getStyleSize:function(b,d,a){var c=d-a;if(b>c){return commonUtils.format.metricValueToStyle(c)}return commonUtils.format.metricValueToStyle(b)},updateSize:function(a,b){this.width=this._getStyleSize(this.nWidth,a,this.additionalWidth);this.height=this._getStyleSize(this.nHeight,b,this.additionalHeight)},init:function(){this.flashCaller.initialize()},getContainerId:function(){return this.flashContainerId},captionPleaseWaitId:"captionPleaseWaitId",getFlash:function(){return"<div id='"+this.captionPleaseWaitId+"' style='position: fixed; z-index: 20; width: 100%; top: 0px; left:0px; display: none; font-size: 24px; height: 40px; text-align: center'><div style='display: inline; color: black; background: rgb(127,127,127);'>"+Locale.loadingPleaseWait+"</div></div><OBJECT ID='"+this.objectId+"' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0'><PARAM NAME='allowScriptAccess' VALUE='"+Environment.getScriptAccess()+"'><PARAM NAME='movie' VALUE='"+Environment.getResourceDirectory()+Environment.getSoloTypeFlash()+"'><EMBED id='"+this.objectEmbedId+"' WIDTH='"+this.width+"' HEIGHT='"+this.height+"' play='true' swliveconnect='true' name='"+this.flashCaller.flash+"' src='"+Environment.getResourceDirectory()+Environment.getSoloTypeFlash()+"' quality='high' bgcolor='#FFFFFF' allowScriptAccess='"+Environment.getScriptAccess()+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://get.adobe.com/flashplayer'></EMBED></OBJECT>"},blurEmbed:function(){try{document.getElementById(this.objectEmbedId).blur()}catch(a){}},deinit:function(){this.blurEmbed()},showPleaseWait:function(){if(isOpera()){return}document.getElementById(this.captionPleaseWaitId).style.display=""},hidePleaseWait:function(){if(isOpera()){return}document.getElementById(this.captionPleaseWaitId).style.display="none"},show:function(){document.getElementById(this.flashContainerId).innerHTML=this.getFlash()},hide:function(){document.getElementById(this.flashContainerId).innerHTML=""},showAndInit:function(){this.show();this.init()},isFlashInstalled:function(){return this.flashCaller._isFlashInstalled()},setCite:function(a){this.flashCaller.call("cite",a)},setCiteAuthor:function(a){this.flashCaller.call("citeAuthor",a)},setWrongLayoutMessage:function(a){this.flashCaller.call("wrongLayoutMessage",a)},setErrorsIndicatorTexts:function(b,a){var c=(new Array(b,a)).join("#");this.flashCaller.call("errorsIndicatorTexts",c)},setSpeedIndicatorTexts:function(b,a){var c=(new Array(b,a)).join("#");this.flashCaller.call("speedIndicatorTexts",c)},setTimeIndicatorTexts:function(a,d,c){var b=(new Array(a,d,c)).join("#");this.flashCaller.call("timeIndicatorTexts",b)},setProgressIndicatorTexts:function(a,b){var c=(new Array(a,b)).join("#");this.flashCaller.call("progressIndicatorTexts",c)},setFingersTexts:function(g,b,f,e,d,c,a){var h=(new Array(g,b,f,e,d,c,a)).join("#");this.flashCaller.call("fingersTexts",h)},setStartMessage:function(a){this.flashCaller.call("startMessage",a)},setCloseMessage:function(a){this.flashCaller.call("closeMessage",a)},setInsteadMessage:function(a){this.flashCaller.call("insteadMessage",a)},setYouTypedMessage:function(a){this.flashCaller.call("youTypedMessage",a)},setRussianLayoutHintMessage:function(a){this.flashCaller.call("russianLayoutHintMessage",a)},setUkrainianLayoutHintMessage:function(a){this.flashCaller.call("ukrainianLayoutHintMessage",a)},setGermanLayoutHintMessage:function(a){this.flashCaller.call("germanLayoutHintMessage",a)},setItalianLayoutHintMessage:function(a){this.flashCaller.call("italianLayoutHintMessage",a)},setFrenchLayoutHintMessage:function(a){this.flashCaller.call("frenchLayoutHintMessage",a)},setChangeLayoutHintMessage:function(a){this.flashCaller.call("changeLayoutHintMessage",a)},setToggleColoredHintMessage:function(a){this.flashCaller.call("toggleColoredHintMessage",a)},setToggleShowCharsHintMessage:function(a){this.flashCaller.call("toggleShowCharsHintMessage",a)},setToggleShowNextKeyHintMessage:function(a){this.flashCaller.call("toggleShowNextKeyHintMessage",a)},setSpeedTestMessage:function(a){this.flashCaller.call("speedTestMessage",a)},setStartExamMessage:function(a){this.flashCaller.call("startExamMessage",a)},setEndExamMessage:function(a){this.flashCaller.call("endExamMessage",a)},setExerciseMessage:function(a){this.flashCaller.call("exerciseMessage",a)},setText:function(a){this.flashCaller.call("text",a)},setText1:function(a){this.flashCaller.call("text1",a)},setText2:function(a){this.flashCaller.call("text2",a)},beginExercise:function(){this.flashCaller.call("action","BeginExercise")},reset:function(){this.flashCaller.call("action","Reset")},setTypeTest:function(a){this.flashCaller.call("typeTest",a)},setExerciseType:function(a){this.flashCaller.call("exerciseType",a)},setMaxErrors:function(a){this.flashCaller.call("maxErrors",a)},setUser:function(a){this.flashCaller.call("user",a)},setLessonExercise:function(a){this.flashCaller.call("lessonExercise",a)},setKeyboardParameters:function(c,b,d,a){this.flashCaller.call("keyboardParams","layout="+c+"&next_key="+b+"&show_chars="+d+"&colored="+a)},setErrorTexts:function(a){this.flashCaller.call("errorTexts",a)},setLastErrorTexts:function(a){this.flashCaller.call("lastErrorTexts",a)},layoutChanged:function(){this.flashCaller.call("keyboardLayoutChanged","")},setOperationSystem:function(a){this.flashCaller.call("operatingSystem",a)},setCourse:function(a){this.flashCaller.call("course",a)},setResourceDirectory:function(a){this.flashCaller.call("resourceDirectory",a)},killFocus:function(){this.flashCaller.call("killFocus")},setTypeFieldsTitle:function(a){this.flashCaller.call("typeFieldsTitle",a)},setLayoutTexts:function(a){this.flashCaller.call("layoutTexts",a)},test:{OK:false,failed:false,failTimeoutId:null,failTimeout:10000,tested:false,reset:function(){this.OK=false;this.failed=false;this.tested=false},setFailFunc:function(a){this.failFunc=a},setOKFunc:function(a){this.OKFunc=a},isOK:function(){return this.OK},isFailed:function(){return this.failed},callbackOK:function(){clearTimeout(this.failTimeoutId);this.OK=true;if(this.OKFunc!=null){this.OKFunc()}},callbackFail:function(){this.failed=true;if(this.failFunc!=null){this.failFunc()}},testIfNotTested:function(){if(this.tested){return}this.tested=true;this.failTimeoutId=setTimeout(function(){soloTypeFlash.test.callbackFail()},this.failTimeout)}}};function Window(a){this._id=a.id;this._name=a.name;this._captions=a.captions;this._zIndex=a.zIndex;this._opacity=a.opacity;this._idText=this._id+"_text";this._visible=false;this._css=function(d){var b="";for(var c in d){b+=c+": "+String(d[c])+";"}return b};this._style=this._css({display:"none",overflow:"auto",position:"fixed",bottom:"0px",left:"0px",width:"100%",height:"150px",color:"white",background:"black","font-size":"14pt"});if(this._zIndex!=null){this._style+=this._css({"z-index":this._zIndex})}this._styleClear=this._css({cursor:"pointer"});this._createMyPointer=function(){var b=this._id;var c=new Object();c[b]=this;if(Window.windowsPointers==null){Window.windowsPointers=new Object()}Window.windowsPointers[this._id]=this};this._createMyPointer();this.add=function(b){this._attachToPageIfNeed(this._id);if(this._visible==false){if(this._opacity==null){$("#"+this._id).show("slow")}else{$("#"+this._id).fadeTo("slow",this._opacity)}this._visible=true}b=b.replace(/</g,"&lt;");b=b.replace(/>/g,"&gt;");b=b.replace(/\n/g,"<br>");$("#"+this._idText).append(b+"<br>")};this._container=function(c){var b="Window.windowsPointers."+c+"";return"<div id='"+this._id+"' style='"+this._style+"'><p><small>"+this._name+": (<a style='"+this._styleClear+"' onclick='( function() { "+b+".clear() } ) ()'>"+this._captions.clear+"</a>, <a style='"+this._styleClear+"' onclick='( function() { "+b+".close() } ) ()'>"+this._captions.close+"</a>)</small></p><p id='"+this._idText+"'></p></div>"};this._attached=false;this._attachToPageIfNeed=function(b){if(this._attached){return}this._attached=true;this._id=b;$("body").append(this._container(b))};this.clear=function(){$("#"+this._idText).text("")};this.close=function(){if(this._opacity==null){$("#"+this._id).hide("slow")}else{$("#"+this._id).fadeOut("slow")}this._visible=false}}var debugWindow=new Window({id:"debug_window",name:"Окно отладки",zIndex:1000,captions:{clear:"Очистить",close:"Закрыть"}});var errorWindow=new Window({id:"error_window",name:"Сообщение об ошибке",zIndex:1000,opacity:0.7,captions:{clear:"Очистить",close:"Закрыть"}});var UserStates={_isAdeptId:"isAdept",_hasPhotoId:"hasPhoto",_hasMessageRightId:"hasMessageRight",isAdept:function(){if(this._isAdept==null){this._isAdept=($("#"+this._isAdeptId).val()==="true")}return this._isAdept},hasPhoto:function(){if(this._hasPhoto==null){this._hasPhoto=($("#"+this._hasPhotoId).val()==="true")}return this._hasPhoto},hasMessageRight:function(){if(this._hasMessageRight==null){this._hasMessageRight=($("#"+this._hasMessageRightId).val()==="true")}return this._hasMessageRight}};(function(O,d,q,L,l,I){var b=this;var o=Math.floor(Math.random()*10000);var r=Function.prototype;var R=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/;var S=/[\-\w]+\/\.\.\//;var G=/([^:])\/\//g;var J="";var p={};var N=O.easyXDM;var V="easyXDM_";var F;var z=false;var j;var h;function D(Y,aa){var Z=typeof Y[aa];return Z=="function"||(!!(Z=="object"&&Y[aa]))||Z=="unknown"}function v(Y,Z){return !!(typeof(Y[Z])=="object"&&Y[Z])}function s(Y){return Object.prototype.toString.call(Y)==="[object Array]"}function c(){try{var Y=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");j=Array.prototype.slice.call(Y.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1);h=parseInt(j[0],10)>9&&parseInt(j[1],10)>0;Y=null;return true}catch(Z){return false}}var w,y;if(D(O,"addEventListener")){w=function(aa,Y,Z){aa.addEventListener(Y,Z,false)};y=function(aa,Y,Z){aa.removeEventListener(Y,Z,false)}}else{if(D(O,"attachEvent")){w=function(Y,aa,Z){Y.attachEvent("on"+aa,Z)};y=function(Y,aa,Z){Y.detachEvent("on"+aa,Z)}}else{throw new Error("Browser not supported")}}var X=false,K=[],M;if("readyState" in d){M=d.readyState;X=M=="complete"||(~navigator.userAgent.indexOf("AppleWebKit/")&&(M=="loaded"||M=="interactive"))}else{X=!!d.body}function t(){if(X){return}X=true;for(var Y=0;Y<K.length;Y++){K[Y]()}K.length=0}if(!X){if(D(O,"addEventListener")){w(d,"DOMContentLoaded",t)}else{w(d,"readystatechange",function(){if(d.readyState=="complete"){t()}});if(d.documentElement.doScroll&&O===top){var g=function(){if(X){return}try{d.documentElement.doScroll("left")}catch(Y){L(g,1);return}t()};g()}}w(O,"load",t)}function H(Z,Y){if(X){Z.call(Y);return}K.push(function(){Z.call(Y)})}function n(){var aa=parent;if(J!==""){for(var Y=0,Z=J.split(".");Y<Z.length;Y++){aa=aa[Z[Y]]}}return aa.easyXDM}function e(Y){O.easyXDM=N;J=Y;if(J){V="easyXDM_"+J.replace(".","_")+"_"}return p}function A(Y){return Y.match(R)[3]}function f(Y){return Y.match(R)[4]||""}function k(aa){var Y=aa.toLowerCase().match(R);var ab=Y[2],ac=Y[3],Z=Y[4]||"";if((ab=="http:"&&Z==":80")||(ab=="https:"&&Z==":443")){Z=""}return ab+"//"+ac+Z}function C(Y){Y=Y.replace(G,"$1/");if(!Y.match(/^(http||https):\/\//)){var Z=(Y.substring(0,1)==="/")?"":q.pathname;if(Z.substring(Z.length-1)!=="/"){Z=Z.substring(0,Z.lastIndexOf("/")+1)}Y=q.protocol+"//"+q.host+Z+Y}while(S.test(Y)){Y=Y.replace(S,"")}return Y}function Q(Y,ab){var ad="",aa=Y.indexOf("#");if(aa!==-1){ad=Y.substring(aa);Y=Y.substring(0,aa)}var ac=[];for(var Z in ab){if(ab.hasOwnProperty(Z)){ac.push(Z+"="+I(ab[Z]))}}return Y+(z?"#":(Y.indexOf("?")==-1?"?":"&"))+ac.join("&")+ad}var T=(function(Y){Y=Y.substring(1).split("&");var aa={},ab,Z=Y.length;while(Z--){ab=Y[Z].split("=");aa[ab[0]]=l(ab[1])}return aa}(/xdm_e=/.test(q.search)?q.search:q.hash));function u(Y){return typeof Y==="undefined"}var P=function(){var Z={};var aa={a:[1,2,3]},Y='{"a":[1,2,3]}';if(typeof JSON!="undefined"&&typeof JSON.stringify==="function"&&JSON.stringify(aa).replace((/\s/g),"")===Y){return JSON}if(Object.toJSON){if(Object.toJSON(aa).replace((/\s/g),"")===Y){Z.stringify=Object.toJSON}}if(typeof String.prototype.evalJSON==="function"){aa=Y.evalJSON();if(aa.a&&aa.a.length===3&&aa.a[2]===3){Z.parse=function(ab){return ab.evalJSON()}}}if(Z.stringify&&Z.parse){P=function(){return Z};return Z}return null};function U(Y,Z,aa){var ac;for(var ab in Z){if(Z.hasOwnProperty(ab)){if(ab in Y){ac=Z[ab];if(typeof ac==="object"){U(Y[ab],ac,aa)}else{if(!aa){Y[ab]=Z[ab]}}}else{Y[ab]=Z[ab]}}}return Y}function a(){var Z=d.body.appendChild(d.createElement("form")),Y=Z.appendChild(d.createElement("input"));Y.name=V+"TEST"+o;F=Y!==Z.elements[Y.name];d.body.removeChild(Z)}function B(Y){if(u(F)){a()}var aa;if(F){aa=d.createElement('<iframe name="'+Y.props.name+'"/>')}else{aa=d.createElement("IFRAME");aa.name=Y.props.name}aa.id=aa.name=Y.props.name;delete Y.props.name;if(Y.onLoad){w(aa,"load",Y.onLoad)}if(typeof Y.container=="string"){Y.container=d.getElementById(Y.container)}if(!Y.container){U(aa.style,{position:"absolute",top:"-2000px"});Y.container=d.body}var Z=Y.props.src;delete Y.props.src;U(aa,Y.props);aa.border=aa.frameBorder=0;aa.allowTransparency=true;Y.container.appendChild(aa);aa.src=Z;Y.props.src=Z;return aa}function W(ab,aa){if(typeof ab=="string"){ab=[ab]}var Z,Y=ab.length;while(Y--){Z=ab[Y];Z=new RegExp(Z.substr(0,1)=="^"?Z:("^"+Z.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"));if(Z.test(aa)){return true}}return false}function m(aa){var af=aa.protocol,Z;aa.isHost=aa.isHost||u(T.xdm_p);z=aa.hash||false;if(!aa.props){aa.props={}}if(!aa.isHost){aa.channel=T.xdm_c;aa.secret=T.xdm_s;aa.remote=T.xdm_e;af=T.xdm_p;if(aa.acl&&!W(aa.acl,aa.remote)){throw new Error("Access denied for "+aa.remote)}}else{aa.remote=C(aa.remote);aa.channel=aa.channel||"default"+o++;aa.secret=Math.random().toString(16).substring(2);if(u(af)){if(k(q.href)==k(aa.remote)){af="4"}else{if(D(O,"postMessage")||D(d,"postMessage")){af="1"}else{if(aa.swf&&D(O,"ActiveXObject")&&c()){af="6"}else{if(navigator.product==="Gecko"&&"frameElement" in O&&navigator.userAgent.indexOf("WebKit")==-1){af="5"}else{if(aa.remoteHelper){aa.remoteHelper=C(aa.remoteHelper);af="2"}else{af="0"}}}}}}}aa.protocol=af;switch(af){case"0":U(aa,{interval:100,delay:2000,useResize:true,useParent:false,usePolling:false},true);if(aa.isHost){if(!aa.local){var ad=q.protocol+"//"+q.host,Y=d.body.getElementsByTagName("img"),ae;var ab=Y.length;while(ab--){ae=Y[ab];if(ae.src.substring(0,ad.length)===ad){aa.local=ae.src;break}}if(!aa.local){aa.local=O}}var ac={xdm_c:aa.channel,xdm_p:0};if(aa.local===O){aa.usePolling=true;aa.useParent=true;aa.local=q.protocol+"//"+q.host+q.pathname+q.search;ac.xdm_e=aa.local;ac.xdm_pa=1}else{ac.xdm_e=C(aa.local)}if(aa.container){aa.useResize=false;ac.xdm_po=1}aa.remote=Q(aa.remote,ac)}else{U(aa,{channel:T.xdm_c,remote:T.xdm_e,useParent:!u(T.xdm_pa),usePolling:!u(T.xdm_po),useResize:aa.useParent?false:aa.useResize})}Z=[new p.stack.HashTransport(aa),new p.stack.ReliableBehavior({}),new p.stack.QueueBehavior({encode:true,maxLength:4000-aa.remote.length}),new p.stack.VerifyBehavior({initiate:aa.isHost})];break;case"1":Z=[new p.stack.PostMessageTransport(aa)];break;case"2":Z=[new p.stack.NameTransport(aa),new p.stack.QueueBehavior(),new p.stack.VerifyBehavior({initiate:aa.isHost})];break;case"3":Z=[new p.stack.NixTransport(aa)];break;case"4":Z=[new p.stack.SameOriginTransport(aa)];break;case"5":Z=[new p.stack.FrameElementTransport(aa)];break;case"6":if(!j){c()}Z=[new p.stack.FlashTransport(aa)];break}Z.push(new p.stack.QueueBehavior({lazy:aa.lazy,remove:true}));return Z}function E(ab){var ac,aa={incoming:function(ae,ad){this.up.incoming(ae,ad)},outgoing:function(ad,ae){this.down.outgoing(ad,ae)},callback:function(ad){this.up.callback(ad)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}};for(var Z=0,Y=ab.length;Z<Y;Z++){ac=ab[Z];U(ac,aa,true);if(Z!==0){ac.down=ab[Z-1]}if(Z!==Y-1){ac.up=ab[Z+1]}}return ac}function x(Y){Y.up.down=Y.down;Y.down.up=Y.up;Y.up=Y.down=null}U(p,{version:"2.4.15.118",query:T,stack:{},apply:U,getJSONObject:P,whenReady:H,noConflict:e});p.DomHelper={on:w,un:y,requiresJSON:function(Y){if(!v(O,"JSON")){d.write('<script type="text/javascript" src="'+Y+'"><\/script>')}}};(function(){var Y={};p.Fn={set:function(Z,aa){Y[Z]=aa},get:function(aa,Z){var ab=Y[aa];if(Z){delete Y[aa]}return ab}}}());p.Socket=function(Z){var Y=E(m(Z).concat([{incoming:function(ac,ab){Z.onMessage(ac,ab)},callback:function(ab){if(Z.onReady){Z.onReady(ab)}}}])),aa=k(Z.remote);this.origin=k(Z.remote);this.destroy=function(){Y.destroy()};this.postMessage=function(ab){Y.outgoing(ab,aa)};Y.init()};p.Rpc=function(aa,Z){if(Z.local){for(var ac in Z.local){if(Z.local.hasOwnProperty(ac)){var ab=Z.local[ac];if(typeof ab==="function"){Z.local[ac]={method:ab}}}}}var Y=E(m(aa).concat([new p.stack.RpcBehavior(this,Z),{callback:function(ad){if(aa.onReady){aa.onReady(ad)}}}]));this.origin=k(aa.remote);this.destroy=function(){Y.destroy()};Y.init()};p.stack.SameOriginTransport=function(Z){var aa,ac,ab,Y;return(aa={outgoing:function(ae,af,ad){ab(ae);if(ad){ad()}},destroy:function(){if(ac){ac.parentNode.removeChild(ac);ac=null}},onDOMReady:function(){Y=k(Z.remote);if(Z.isHost){U(Z.props,{src:Q(Z.remote,{xdm_e:q.protocol+"//"+q.host+q.pathname,xdm_c:Z.channel,xdm_p:4}),name:V+Z.channel+"_provider"});ac=B(Z);p.Fn.set(Z.channel,function(ad){ab=ad;L(function(){aa.up.callback(true)},0);return function(ae){aa.up.incoming(ae,Y)}})}else{ab=n().Fn.get(Z.channel,true)(function(ad){aa.up.incoming(ad,Y)});L(function(){aa.up.callback(true)},0)}},init:function(){H(aa.onDOMReady,aa)}})};p.stack.FlashTransport=function(ab){var ad,Y,ac,ae,Z,af;function ag(ai,ah){L(function(){ad.up.incoming(ai,ae)},0)}function aa(ai){var ah=ab.swf+"?host="+ab.isHost;var ak="easyXDM_swf_"+Math.floor(Math.random()*10000);p.Fn.set("flash_loaded"+ai.replace(/[\-.]/g,"_"),function(){p.stack.FlashTransport[ai].swf=Z=af.firstChild;var al=p.stack.FlashTransport[ai].queue;for(var am=0;am<al.length;am++){al[am]()}al.length=0});if(ab.swfContainer){af=(typeof ab.swfContainer=="string")?d.getElementById(ab.swfContainer):ab.swfContainer}else{af=d.createElement("div");U(af.style,h&&ab.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0});d.body.appendChild(af)}var aj="callback=flash_loaded"+ai.replace(/[\-.]/g,"_")+"&proto="+b.location.protocol+"&domain="+A(b.location.href)+"&port="+f(b.location.href)+"&ns="+J;af.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+ak+"' data='"+ah+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+ah+"'></param><param name='flashvars' value='"+aj+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+aj+"' allowScriptAccess='always' wmode='transparent' src='"+ah+"' height='1' width='1'></embed></object>"}return(ad={outgoing:function(ai,aj,ah){Z.postMessage(ab.channel,ai.toString());if(ah){ah()}},destroy:function(){try{Z.destroyChannel(ab.channel)}catch(ah){}Z=null;if(Y){Y.parentNode.removeChild(Y);Y=null}},onDOMReady:function(){ae=ab.remote;p.Fn.set("flash_"+ab.channel+"_init",function(){L(function(){ad.up.callback(true)})});p.Fn.set("flash_"+ab.channel+"_onMessage",ag);ab.swf=C(ab.swf);var ai=A(ab.swf);var ah=function(){p.stack.FlashTransport[ai].init=true;Z=p.stack.FlashTransport[ai].swf;Z.createChannel(ab.channel,ab.secret,k(ab.remote),ab.isHost);if(ab.isHost){if(h&&ab.swfNoThrottle){U(ab.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"})}U(ab.props,{src:Q(ab.remote,{xdm_e:k(q.href),xdm_c:ab.channel,xdm_p:6,xdm_s:ab.secret}),name:V+ab.channel+"_provider"});Y=B(ab)}};if(p.stack.FlashTransport[ai]&&p.stack.FlashTransport[ai].init){ah()}else{if(!p.stack.FlashTransport[ai]){p.stack.FlashTransport[ai]={queue:[ah]};aa(ai)}else{p.stack.FlashTransport[ai].queue.push(ah)}}},init:function(){H(ad.onDOMReady,ad)}})};p.stack.PostMessageTransport=function(ab){var ad,ae,Z,aa;function Y(af){if(af.origin){return k(af.origin)}if(af.uri){return k(af.uri)}if(af.domain){return q.protocol+"//"+af.domain}throw"Unable to retrieve the origin of the event"}function ac(ag){var af=Y(ag);if(af==aa&&ag.data.substring(0,ab.channel.length+1)==ab.channel+" "){ad.up.incoming(ag.data.substring(ab.channel.length+1),af)}}return(ad={outgoing:function(ag,ah,af){Z.postMessage(ab.channel+" "+ag,ah||aa);if(af){af()}},destroy:function(){y(O,"message",ac);if(ae){Z=null;ae.parentNode.removeChild(ae);ae=null}},onDOMReady:function(){aa=k(ab.remote);if(ab.isHost){var af=function(ag){if(ag.data==ab.channel+"-ready"){Z=("postMessage" in ae.contentWindow)?ae.contentWindow:ae.contentWindow.document;y(O,"message",af);w(O,"message",ac);L(function(){ad.up.callback(true)},0)}};w(O,"message",af);U(ab.props,{src:Q(ab.remote,{xdm_e:k(q.href),xdm_c:ab.channel,xdm_p:1}),name:V+ab.channel+"_provider"});ae=B(ab)}else{w(O,"message",ac);Z=("postMessage" in O.parent)?O.parent:O.parent.document;Z.postMessage(ab.channel+"-ready",aa);L(function(){ad.up.callback(true)},0)}},init:function(){H(ad.onDOMReady,ad)}})};p.stack.FrameElementTransport=function(Z){var aa,ac,ab,Y;return(aa={outgoing:function(ae,af,ad){ab.call(this,ae);if(ad){ad()}},destroy:function(){if(ac){ac.parentNode.removeChild(ac);ac=null}},onDOMReady:function(){Y=k(Z.remote);if(Z.isHost){U(Z.props,{src:Q(Z.remote,{xdm_e:k(q.href),xdm_c:Z.channel,xdm_p:5}),name:V+Z.channel+"_provider"});ac=B(Z);ac.fn=function(ad){delete ac.fn;ab=ad;L(function(){aa.up.callback(true)},0);return function(ae){aa.up.incoming(ae,Y)}}}else{if(d.referrer&&k(d.referrer)!=T.xdm_e){O.top.location=T.xdm_e}ab=O.frameElement.fn(function(ad){aa.up.incoming(ad,Y)});aa.up.callback(true)}},init:function(){H(aa.onDOMReady,aa)}})};p.stack.NameTransport=function(ac){var ad;var af,aj,ab,ah,ai,Z,Y;function ag(am){var al=ac.remoteHelper+(af?"#_3":"#_2")+ac.channel;aj.contentWindow.sendMessage(am,al)}function ae(){if(af){if(++ah===2||!af){ad.up.callback(true)}}else{ag("ready");ad.up.callback(true)}}function ak(al){ad.up.incoming(al,Z)}function aa(){if(ai){L(function(){ai(true)},0)}}return(ad={outgoing:function(am,an,al){ai=al;ag(am)},destroy:function(){aj.parentNode.removeChild(aj);aj=null;if(af){ab.parentNode.removeChild(ab);ab=null}},onDOMReady:function(){af=ac.isHost;ah=0;Z=k(ac.remote);ac.local=C(ac.local);if(af){p.Fn.set(ac.channel,function(am){if(af&&am==="ready"){p.Fn.set(ac.channel,ak);ae()}});Y=Q(ac.remote,{xdm_e:ac.local,xdm_c:ac.channel,xdm_p:2});U(ac.props,{src:Y+"#"+ac.channel,name:V+ac.channel+"_provider"});ab=B(ac)}else{ac.remoteHelper=ac.remote;p.Fn.set(ac.channel,ak)}aj=B({props:{src:ac.local+"#_4"+ac.channel},onLoad:function al(){var am=aj||this;y(am,"load",al);p.Fn.set(ac.channel+"_load",aa);(function an(){if(typeof am.contentWindow.sendMessage=="function"){ae()}else{L(an,50)}}())}})},init:function(){H(ad.onDOMReady,ad)}})};p.stack.HashTransport=function(aa){var ad;var ai=this,ag,ab,Y,ae,an,ac,am;var ah,Z;function al(ap){if(!am){return}var ao=aa.remote+"#"+(an++)+"_"+ap;((ag||!ah)?am.contentWindow:am).location=ao}function af(ao){ae=ao;ad.up.incoming(ae.substring(ae.indexOf("_")+1),Z)}function ak(){if(!ac){return}var ao=ac.location.href,aq="",ap=ao.indexOf("#");if(ap!=-1){aq=ao.substring(ap)}if(aq&&aq!=ae){af(aq)}}function aj(){ab=setInterval(ak,Y)}return(ad={outgoing:function(ao,ap){al(ao)},destroy:function(){O.clearInterval(ab);if(ag||!ah){am.parentNode.removeChild(am)}am=null},onDOMReady:function(){ag=aa.isHost;Y=aa.interval;ae="#"+aa.channel;an=0;ah=aa.useParent;Z=k(aa.remote);if(ag){aa.props={src:aa.remote,name:V+aa.channel+"_provider"};if(ah){aa.onLoad=function(){ac=O;aj();ad.up.callback(true)}}else{var aq=0,ao=aa.delay/50;(function ap(){if(++aq>ao){throw new Error("Unable to reference listenerwindow")}try{ac=am.contentWindow.frames[V+aa.channel+"_consumer"]}catch(ar){}if(ac){aj();ad.up.callback(true)}else{L(ap,50)}}())}am=B(aa)}else{ac=O;aj();if(ah){am=parent;ad.up.callback(true)}else{U(aa,{props:{src:aa.remote+"#"+aa.channel+new Date(),name:V+aa.channel+"_consumer"},onLoad:function(){ad.up.callback(true)}});am=B(aa)}}},init:function(){H(ad.onDOMReady,ad)}})};p.stack.ReliableBehavior=function(Z){var ab,ad;var ac=0,Y=0,aa="";return(ab={incoming:function(ag,ae){var af=ag.indexOf("_"),ah=ag.substring(0,af).split(",");ag=ag.substring(af+1);if(ah[0]==ac){aa="";if(ad){ad(true)}}if(ag.length>0){ab.down.outgoing(ah[1]+","+ac+"_"+aa,ae);if(Y!=ah[1]){Y=ah[1];ab.up.incoming(ag,ae)}}},outgoing:function(ag,ae,af){aa=ag;ad=af;ab.down.outgoing(Y+","+(++ac)+"_"+ag,ae)}})};p.stack.QueueBehavior=function(aa){var ad,ae=[],ah=true,ab="",ag,Y=0,Z=false,ac=false;function af(){if(aa.remove&&ae.length===0){x(ad);return}if(ah||ae.length===0||ag){return}ah=true;var ai=ae.shift();ad.down.outgoing(ai.data,ai.origin,function(aj){ah=false;if(ai.callback){L(function(){ai.callback(aj)},0)}af()})}return(ad={init:function(){if(u(aa)){aa={}}if(aa.maxLength){Y=aa.maxLength;ac=true}if(aa.lazy){Z=true}else{ad.down.init()}},callback:function(aj){ah=false;var ai=ad.up;af();ai.callback(aj)},incoming:function(al,aj){if(ac){var ak=al.indexOf("_"),ai=parseInt(al.substring(0,ak),10);ab+=al.substring(ak+1);if(ai===0){if(aa.encode){ab=l(ab)}ad.up.incoming(ab,aj);ab=""}}else{ad.up.incoming(al,aj)}},outgoing:function(am,aj,al){if(aa.encode){am=I(am)}var ai=[],ak;if(ac){while(am.length!==0){ak=am.substring(0,Y);am=am.substring(ak.length);ai.push(ak)}while((ak=ai.shift())){ae.push({data:ai.length+"_"+ak,origin:aj,callback:ai.length===0?al:null})}}else{ae.push({data:am,origin:aj,callback:al})}if(Z){ad.down.init()}else{af()}},destroy:function(){ag=true;ad.down.destroy()}})};p.stack.VerifyBehavior=function(ac){var ad,ab,Z,aa=false;function Y(){ab=Math.random().toString(16).substring(2);ad.down.outgoing(ab)}return(ad={incoming:function(ag,ae){var af=ag.indexOf("_");if(af===-1){if(ag===ab){ad.up.callback(true)}else{if(!Z){Z=ag;if(!ac.initiate){Y()}ad.down.outgoing(ag)}}}else{if(ag.substring(0,af)===Z){ad.up.incoming(ag.substring(af+1),ae)}}},outgoing:function(ag,ae,af){ad.down.outgoing(ab+"_"+ag,ae,af)},callback:function(ae){if(ac.initiate){Y()}}})};p.stack.RpcBehavior=function(ae,Z){var ab,ag=Z.serializer||P();var af=0,ad={};function Y(ah){ah.jsonrpc="2.0";ab.down.outgoing(ag.stringify(ah))}function ac(ah,aj){var ai=Array.prototype.slice;return function(){var ak=arguments.length,am,al={method:aj};if(ak>0&&typeof arguments[ak-1]==="function"){if(ak>1&&typeof arguments[ak-2]==="function"){am={success:arguments[ak-2],error:arguments[ak-1]};al.params=ai.call(arguments,0,ak-2)}else{am={success:arguments[ak-1]};al.params=ai.call(arguments,0,ak-1)}ad[""+(++af)]=am;al.id=af}else{al.params=ai.call(arguments,0)}if(ah.namedParams&&al.params.length===1){al.params=al.params[0]}Y(al)}}function aa(ao,an,aj,am){if(!aj){if(an){Y({id:an,error:{code:-32601,message:"Procedure not found."}})}return}var al,ai;if(an){al=function(ap){al=r;Y({id:an,result:ap})};ai=function(ap,aq){ai=r;var ar={id:an,error:{code:-32099,message:ap}};if(aq){ar.error.data=aq}Y(ar)}}else{al=ai=r}if(!s(am)){am=[am]}try{var ah=aj.method.apply(aj.scope,am.concat([al,ai]));if(!u(ah)){al(ah)}}catch(ak){ai(ak.message)}}return(ab={incoming:function(ai,ah){var aj=ag.parse(ai);if(aj.method){if(Z.handle){Z.handle(aj,Y)}else{aa(aj.method,aj.id,Z.local[aj.method],aj.params)}}else{var ak=ad[aj.id];if(aj.error){if(ak.error){ak.error(aj.error)}}else{if(ak.success){ak.success(aj.result)}}delete ad[aj.id]}},init:function(){if(Z.remote){for(var ah in Z.remote){if(Z.remote.hasOwnProperty(ah)){ae[ah]=ac(Z.remote[ah],ah)}}}ab.down.init()},destroy:function(){for(var ah in Z.remote){if(Z.remote.hasOwnProperty(ah)&&ae.hasOwnProperty(ah)){delete ae[ah]}}ab.down.destroy()}})};b.easyXDM=p})(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent);var AddToLentaLinkState={notLoggedOn:{href:"/photo-queue.tmpl?link="+window.location.pathname,"background-position":"0 0",title:Locale.needLogonForMordolenta},inPhotoQueue:{"background-position":"0 -70px",title:Locale.alreadyInMordolenta},noAdeptRights:{href:"/profile/edit/","background-position":"0 0",title:Locale.fillProfileForMordolenta},noPhoto:{href:"/profile/edit/","background-position":"0 0",title:Locale.needPhotoForMordolenta},noMessageRight:{"background-position":"0 -70px",title:Locale.noMessageRight},displayLink:{href:"/photo-queue.tmpl","background-position":"0 0",title:Locale.addToMordolenta}};function setUpTooltip(){$("img, div").each(function(){if(this.title!=""){$(this).tooltip({track:true,delay:100,showBody:"::",showURL:false,opacity:0.85})}})}function initialiseTooltip(){$(document).ready(setUpTooltip())}function updateOnlineUsers(a){var c=a.user_id;if(a!=undefined&&a.onlineUsersHeader!=undefined&&a.onlineUsers!=undefined&&a.onlineUsersFooter!=undefined){var d=a.registeredUsersHeader+"<br/><br/>"+a.onlineUsersHeader+"<br/><table>";for(var b=0;b<a.onlineUsers.length;b++){d+="<tr><td>";if(a.onlineUsers[b].status=="payed"||a.onlineUsers[b].status=="active_payed"){d+="<img src='/pics/stars/star_4.png'/>"}d+="</td><td>";if(a.onlineUsers[b].userId==c){if(a.onlineUsers[b].status=="payed"){d+="<div class='user-active-payed'>"}else{d+="<div class='user-active'>"}}else{if(a.onlineUsers[b].support==1){d+="<div class='user-support'>"}else{if(a.onlineUsers[b].status=="payed"){d+="<div class='user-payed'>"}}}d+="<div class='user-online'>";d+="<a href='/user/"+a.onlineUsers[b].userId+"' title='"+a.onlineUsers[b].title+"'>";d+=a.onlineUsers[b].name;d+="</a></div>";if(a.onlineUsers[b].status!=""||a.onlineUsers[b].support==1){d+="</div>"}d+="</td></tr>"}d+="</table><br/>";d+=a.onlineUsersFooter;callbackOnline({onlineUsers:d})}}function updatePhotoQueue(a){var d=a.user_id;var h="<table width='100%' cellpadding='0' cellspacing='0'><tr>";if(a!=undefined&&a.photoQueue!=undefined){var g=false;for(var c=0;c<a.photoQueue.length;c++){if(a.photoQueue[c]){var b=a.photoQueue[c].userId;if(b){if(d!=0&&b==d){g=true}h+="<td width='10%'><a href='/user/"+b+"' target='_top'>";var e=a.photoQueue[c].photoLink;if(e){h+="<img src='"+e+"' ";var f=a.photoQueue[c].description;if(f){h+="title='"+f+"'"}h+="/>"}h+="</a></td>"}}}h+="</tr></table>";if(d==0){displayLink="notLoggedOn"}else{if(g){displayLink="inPhotoQueue"}else{if(!UserStates.hasMessageRight()){displayLink="noMessageRight"}else{if(!UserStates.isAdept()){displayLink="noAdeptRights"}else{if(!UserStates.hasPhoto()){displayLink="noPhoto"}else{displayLink="displayLink"}}}}}callbackLenta({html:h,displayLink:displayLink})}}function updateNewMessages(a){if(a!=undefined&&a.newMessages!=undefined){var b=a.newMessages;callbackMessages({cnt:b})}}function callbackOnline(b){var a=$("#onlineUsers");a.html(b.onlineUsers);setUpTooltip()}function callbackLenta(e){var f=e.html;var b=e.displayLink;var a=$("#photo-queue-inner");if(a){a.html(f)}var d=$("#IDAddToLentaImage");var c=$("#IDAddToLentaLink");if(d){c.attr("href",AddToLentaLinkState[b]["href"]);d.css({"background-position":AddToLentaLinkState[b]["background-position"]});d.attr("title","::"+AddToLentaLinkState[b]["title"]);d.attr("alt",AddToLentaLinkState[b]["title"])}setUpTooltip()}function callbackMessages(e){var c=$("#message-envelope");var b=$("#message-menu");var a=$("#new-message-cnt");var d=e.cnt;if(d!=0){if(c){c.css("display","")}if(b){b.css("fontWeight","bold")}HTMLNewMessages=" ("+d+")";if(a){a.html(HTMLNewMessages)}}else{if(c){c.css("display","none")}if(b){b.css("fontWeight","")}if(a){a.html("")}}}function allInit(c){for(var a in onloadCallbacks){try{onloadCallbacks[a](c)}catch(b){}}}function TBehSound(){this.IsPlay=true;this.ObjIn;this.ObjA;this.ChoosePlay=function(){this.ObjIn=document.getElementById("IDPlayInact");this.ObjA=document.getElementById("IDPlayAct")};this.ChoosePause=function(){this.ObjIn=document.getElementById("IDPauseInact");this.ObjA=document.getElementById("IDPauseAct")};this.Choose=function(){if(this.IsPlay){this.ChoosePlay()}else{this.ChoosePause()}};this.MouseOut=function(){this.Choose();this.ObjA.style.visibility="hidden";this.ObjIn.style.visibility="visible"};this.MouseOver=function(){this.Choose();this.ObjA.style.visibility="visible";this.ObjIn.style.visibility="hidden"};this.FileNum=1;this.Click=function(a){this.FileNum=a;this.TogglePlay()};this.HideInact=function(){if(this.IsPlay){this.Obj1=document.getElementById("IDPauseInact");this.Obj2=document.getElementById("IDPauseAct")}else{this.Obj1=document.getElementById("IDPlayInact");this.Obj2=document.getElementById("IDPlayAct")}this.Obj1.style.visibility="hidden";this.Obj2.style.visibility="hidden"};this.ToggleBtn=function(){this.IsPlay=!this.IsPlay;this.HideInact();this.MouseOver()};this.TogglePlay=function(){this.ToggleBtn();if(this.IsPlay){this.Pause()}else{this.Play()}};this.Call=function(c,a){try{if(window.document.flashSound){window.document.flashSound.SetVariable(c,a)}else{document.flashSound.SetVariable(c,a)}}catch(b){}};this.Play=function(){this.Call("listener.play","true");if(this.FileNum!=undefined){var a="/profile/listen_sound.tmpl";var b={file:this.FileNum};sendAjaxRequest({url:a,parameters:b,callbackSuccess:RatingUpdate})}};this.Pause=function(){this.Call("listener.play","false")}}var BehSnd=new TBehSound();function checkboxClicked(){var c=$("#dont_show_again");if(c.is(":checked")==true){dont_show_again="True"}else{dont_show_again="False"}var a="/interface_changed/ajax.tmpl";var b={dont_show_again:dont_show_again};sendAjaxRequest({url:a,parameters:b})};
