function TextareaPositioner(A){this.textareaId=A;this.positionerId="tap"+A;this.fixPosition=function(){var H=document.getElementById(this.textareaId);var C=document.getElementById(this.positionerId);var I=$j(H);var F=$j(C);var E=F.parent();var G=false;while(E.css("position")!="relative"){E=E.parent();G=true}var D=0;var B=0;if(G){D=E.offset().left;B=E.offset().top}$j(F).css("left",(I.offset().left+I.outerWidth()-D-59)+"px");$j(F).css("top",(I.offset().top-15-B)+"px")};this.resize=function(E){var C=E;if(!E){C=$j.cookie(this.getCookieName())}var B=document.getElementById(this.textareaId);var D=$j(B);if(!C){C=3}if(C==1){this.positionerRemoveClasses(D);D.addClass("big")}if(C==2){this.positionerRemoveClasses(D);D.addClass("medium")}if(C==3){this.positionerRemoveClasses(D);D.addClass("small")}$j.cookie(this.getCookieName(),C);this.fixPosition()};this.positionerRemoveClasses=function(B){B.removeClass("big");B.removeClass("medium");B.removeClass("small")};this.getCookieName=function(){return"net.supermemo.textarea.size."+this.textareaId}}function hideAllFlash(){$j("embed").hide();$j("object").hide();$j("iframe").contents().find("embed").hide();$j("iframe").contents().find("object").hide()}function showHiddenFlash(){$j("embed").show();$j("object").show();$j("iframe").contents().find("embed").show();$j("iframe").contents().find("object").show()}function makeGrid(F,C){var A=$j(F);var B=A.children();A.css("margin-left","0px");A.css("margin-right","0px");A.css("margin-top","0px");A.css("margin-bottom","0px");A.css("padding-left","0px");A.css("padding-right","0px");A.css("padding-top","0px");A.css("padding-bottom","0px");B.css("margin-left","0px");B.css("margin-right","0px");B.css("margin-top","0px");B.css("margin-bottom","0px");B.css("padding-left","0px");B.css("padding-right","0px");B.css("padding-top","0px");B.css("padding-bottom","0px");B.css("list-style-type","none");var E=A.width()/C;B.width(E);B.css("float","left");var D=0;B.each(function(){var G=$j(this).height();if(G>D){D=G}});B.height(D)}function checkUncheckAll(A,C){var D=A.form,B=0;for(B=0;B<D.length;B++){if(D[B].type=="checkbox"&&D[B].title!=C){D[B].checked=false}}};var windows=new Array();function grade_mouseOver(F,E,C,B,D){F.src=E+"/"+B;var A=F;while(A=A.previousSibling){if(A.nodeName=="IMG"){A.src=E+"/"+B}}A=F;while(A=A.nextSibling){if(A.nodeName=="IMG"){A.src=E+"/"+C}}}function grade_mouseOut(G,F,D,C){var A=G;var E=1;while(A=A.previousSibling){if(A.nodeName=="INPUT"){E=A.value;break}}var B=0;A=G;while(A=A.nextSibling){if(A.nodeName=="IMG"){if(B<E){A.src=F+"/"+C}else{A.src=F+"/"+D}B++}}}function grade_setCurrent(D,C){var A=document.getElementsByTagName("input");var B;for(i=0;i<A.length;i++){if(A[i].id.lastIndexOf(D)>-1){B=A[i];break}}B.value=C}function grade_assess(C,B){var A=getById("input",C);if(A){A.value=B}}function newButton_mouseOver(A){A.className+=" mouseOver"}function newButton_mouseOut(A){A.className=A.className.replace(/\s*mouseOver/g,"")}function newButton_mouseDown(A){A.className+=" mouseDown"}function newButton_mouseUp(A){A.className=A.className.replace(/\s*mouseDown/g,"")}var Grade={DEFAULT_GRADE:5,dir:null,marked:null,notMarked:null,stars:null,result:null,initialize:function(){this.stars=new Array();for(var A=1;A<6;A++){this.stars.push(document.getElementById("star"+A))}this.setGrade(this.DEFAULT_GRADE)},isCorrect:function(){if(this.stars==null){return false}if(this.dir==null){return false}if(this.marked==null){return false}if(this.notMarked==null){return false}if(this.result==null){return false}return true},getGrade:function(){if(!this.isCorrect()){return this.DEFAULT_GRADE}var A=getById("input",this.result);if(A){var B=A.value;if(B){return B}else{return this.DEFAULT_GRADE}}return this.DEFAULT_GRADE},setGrade:function(B){if(!this.isCorrect()){return }var A=getById("input",this.result);if(A){A.value=B}},mouseOver:function(A){if(!this.isCorrect()){return }for(var B=0;B<5;B++){if(B<A){this.stars[B].src=this.dir+"/"+this.marked}else{this.stars[B].src=this.dir+"/"+this.notMarked}}},mouseOut:function(){if(!this.isCorrect()){return }this.mouseOver(this.getGrade())},mouseClick:function(A){if(!this.isCorrect()){return }this.setGrade(A)}};function Window(id,minWidth,maxWidth){this.MINIMIZED=1;this.HIDDEN_CONTENT=2;this.id=id;this.maxWidth=maxWidth;this.minWidth=minWidth;this.onresize="";this.state=0;this.isMinimized=function(){if((this.state&this.MINIMIZED)>0){return true}return false};this.changeState=function(newState){if((newState&this.MINIMIZED)>0){this.minimize()}if((newState&this.HIDDEN_CONTENT)>0){this.hideContent()}};this.minimize=function(){if((this.state&this.MINIMIZED)==0){setWidth(this.id,this.minWidth);hide(id+"-body");hide(id+"-title");this.switchIcons("maximize"+id,"minimize"+id);this.state+=this.MINIMIZED;eval(this.onresize)}};this.maximize=function(){if((this.state&this.MINIMIZED)>0){setWidth(this.id,this.maxWidth);show(id+"-body");show(id+"-title");this.switchIcons("minimize"+id,"maximize"+id);this.state-=this.MINIMIZED;this.showContent();eval(this.onresize)}};this.hideContent=function(){if((this.state&this.HIDDEN_CONTENT)==0&&(this.state&this.MINIMIZED)==0){hide(id+"-body");this.switchIcons("show"+id+"-body","hide"+id+"-body");this.state+=this.HIDDEN_CONTENT}};this.showContent=function(){if((this.state&this.HIDDEN_CONTENT)>0&&(this.state&this.MINIMIZED)==0){show(id+"-body");this.switchIcons("hide"+id+"-body","show"+id+"-body");this.state-=this.HIDDEN_CONTENT}};this.switchIcons=function(showIconId,hideIconId){showIcon=document.getElementById(showIconId);showIcon.className="window-icon";hideIcon=document.getElementById(hideIconId);hideIcon.className="window-hiddenIcon"};hide=function(id){div=document.getElementById(id);div.style.display="none"};show=function(id){div=document.getElementById(id);div.style.display="block"};setWidth=function(id,newWidth){div=getById("div",id);div.style.width=newWidth}};var isFirefox=(navigator.userAgent.indexOf("Firefox")!=-1);var isOpera=(navigator.userAgent.indexOf("Opera")!=-1);var isIE=(navigator.userAgent.indexOf("MSIE")!=-1);var isIphone=(navigator.userAgent.indexOf("iPhone")!=-1);var isAndroid=(navigator.userAgent.indexOf("Android")!=-1);var button1,button2,button3,buttonEnter;var noFlashAlertShown=false;var lastPlayedMedia="";var aplet=null;function runAnalyzerForLastPlayedMedia(){runAnalyzer(lastPlayedMedia)}function setLastPlayedMedia(A){lastPlayedMedia=A;window.parent.updateAnalyzerVisibility()}function runAnalyzer(E){lastPlayedMedia=E;var C=E;var B="http://"+window.location.hostname+E;var A=document.getElementById("speechanalyzer");if(aplet==null){window.parent.showWaiting();aplet=new AppletObject("jakisaplet.MojJApplet","/static/java/speechanalyzer/speechAnalyzer.jar","1","1","1.5","true");aplet.domNodeID="saApplet";aplet.addParam("media",B);aplet.addParam("lang",supermemoLanguage);aplet.writeToElement("speechanalyzer");window.parent.hideWaiting()}else{try{document.getElementById("saApplet").onlyDispose()}catch(D){}aplet=null;runAnalyzer(E)}}function disableForm(C,A){if(C){for(var B=0;B<C.elements.length;B++){C.elements[B].disabled=A}}}function findFrame(A){for(j=0;j<window.frames.length;j++){frame=window.frames[j];if(frame.id==A){return frame}}return null}function singleConfirm(A){if(!confirm(A)){return false}return true}function doubleConfirm(A,B){if(!confirm(A)){return false}else{if(!confirm(B)){return false}}return true}function createSpan(A,B){span=document.createElement("span");span.className=A;span.innerText=B;span.textContent=B;return span}function createImage(A,C,B){image=document.createElement("img");image.className=A;image.alt=B;image.src=C;return image}function createAnchor(B,A,C){anchor=document.createElement("a");anchor.className=B;anchor.href=A;anchor.title=C;return anchor}function createBreak(){br=document.createElement("br");return br}function removeChildren(A){if(A==null){return }if(typeof (A)=="string"){A=document.getElementById(A)}while(A.firstChild!=null){A.removeChild(A.firstChild)}return false}function checkExists(B,A){if(B){for(i=0;i<B.elements.length;i++){if(B.elements[i].name==A){return i}}}return -1}function setFormParameter(D,C,E){var B=checkExists(D,C);if(B==-1){var A=document.createElement("input");A.name=C;A.id=C;B=D.elements.length;A.type="hidden";D.appendChild(A)}if(D){D.elements[B].value=E}}function setFocus(B,C){if(!B){return }for(var A=0;A<B.elements.length;A++){if(B.elements[A].id&&B.elements[A].id.indexOf(C)>-1){B.elements[A].focus();break}}}function getPosition(B){var C=curtop=0;if(B.offsetParent){C+=B.offsetLeft;curtop+=B.offsetTop;while(B=B.offsetParent){C+=B.offsetLeft;curtop+=B.offsetTop}}var A=new Array(C,curtop);return A}function getById(A,C){var B=document.getElementsByTagName(A);for(i=0;i<B.length;i++){if(B[i].id.lastIndexOf(C)>-1){return B[i]}}return null}function hideById(A,B){element=getById(A,B);if(element!=null){element.style.display="none"}}function showById(B,C,A){element=getById(B,C);if(element!=null){element.style.display="block";if(A!=null&&A>-1){setTimeout("hideById('"+B+"', '"+C+"')",A*1000)}}}function findForm(A){for(i=0;i<window.document.forms.length;i++){if(window.document.forms[i].id.lastIndexOf(A)>-1){return window.document.forms[i];break}}return null}function findFrameForm(A){for(j=0;j<window.frames.length;j++){var B=window.frames[j].document;for(i=0;i<B.forms.length;i++){if(B.forms[i].id.lastIndexOf(A)>-1){return B.forms[i];break}}}return null}function getInput(A,B){for(i=0;i<A.elements.length;i++){if(A.elements[i].id.lastIndexOf(B)>-1){return A.elements[i]}}return null}var Progress={show:function(){LOG.fatal("SUPREMEMO.NET -> Showing progress.");$j("#progress").show()},hide:function(){LOG.fatal("SUPREMEMO.NET -> Hiding progress.");$j("#progress").hide()}};Browser=function(){this.getWindowSize=function(){var B=0,A=0;if(typeof (window.innerWidth)=="number"){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth;A=document.body.clientHeight}}}return{width:B,height:A}};this.getScroll=function(){var B=0,A=0;if(typeof (window.pageYOffset)=="number"){A=window.pageYOffset;B=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A=document.body.scrollTop;B=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){A=document.documentElement.scrollTop;B=document.documentElement.scrollLeft}}}return{scrollX:B,scrollY:A}}};Cookie=function(A){this.name=A;this.write=function(D,E){if(E){var C=new Date();C.setTime(C.getTime()+(E*24*60*60*1000));var B="; expires="+C.toGMTString()}else{var B=""}document.cookie=this.name+"="+D+B+"; path=/"};this.read=function(){var D=this.name+"=";var B=document.cookie.split(";");for(var C=0;C<B.length;C++){var E=B[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null};this.erase=function(){this.create(this.name,"",-1)}};function addEventSimple(C,A,B){if(C.addEventListener){C.addEventListener(A,B,false)}else{if(C.attachEvent){C.attachEvent("on"+A,B)}}}function removeEventSimple(C,A,B){if(C.removeEventListener){C.removeEventListener(A,B,false)}else{if(C.detachEvent){C.detachEvent("on"+A,B)}}}dragDrop={keySpeed:10,initialMouseX:undefined,initialMouseY:undefined,startX:undefined,startY:undefined,changed:false,draggedObject:undefined,updateFunction:undefined,initElement:function(A,B){if(typeof A=="string"){A=document.getElementById(A)}A.onmousedown=dragDrop.startDragMouse;if(B!=null&&B!=undefined){dragDrop.updateFunction=B}},startDragMouse:function(B){if(!B){B=event}if(!B){B=window.frames[0].event}var A=B.target;if(!A){A=B.srcElement}if(A.nodeName=="INPUT"||A.nodeName=="A"){return }dragDrop.startDrag(this);dragDrop.initialMouseX=B.clientX;dragDrop.initialMouseY=B.clientY;addEventSimple(document,"mousemove",dragDrop.dragMouse);addEventSimple(document,"mouseup",dragDrop.releaseElement);return false},startDrag:function(B){if(dragDrop.draggedObject){dragDrop.releaseElement()}var A=new Browser();dragDrop.startX=A.getWindowSize().width-B.offsetLeft-B.offsetWidth;dragDrop.startY=A.getWindowSize().height-B.offsetTop-B.offsetHeight;dragDrop.draggedObject=B;B.className+=" dragged"},dragMouse:function(C){if(!C){C=event}if(!C){C=window.frames[0].event}var B=C.clientX-dragDrop.initialMouseX;var A=C.clientY-dragDrop.initialMouseY;dragDrop.setPosition(B,A);return false},setPosition:function(B,A){dragDrop.changed=true;var C=new Browser();r=dragDrop.startX-B;if(r<0){r=0}if(r+dragDrop.draggedObject.offsetWidth>C.getWindowSize().width){r=C.getWindowSize().width-dragDrop.draggedObject.offsetWidth}b=dragDrop.startY-A;if(b<0){b=0}if(b+dragDrop.draggedObject.offsetHeight>C.getWindowSize().height){b=C.getWindowSize().height-dragDrop.draggedObject.offsetHeight}dragDrop.draggedObject.style.right=r+"px";dragDrop.draggedObject.style.bottom=b+"px"},releaseElement:function(){removeEventSimple(document,"mousemove",dragDrop.dragMouse);removeEventSimple(document,"mouseup",dragDrop.releaseElement);dragDrop.draggedObject.className=dragDrop.draggedObject.className.replace(/dragged/,"");dragDrop.evalFunction(dragDrop.draggedObject);dragDrop.draggedObject=null},evalFunction:function(obj){if(dragDrop.changed&&dragDrop.updateFunction!=undefined){var x=obj.style.right;var dx=x.substring(0,x.indexOf("px"));var y=obj.style.bottom;var dy=y.substring(0,y.indexOf("px"));eval(dragDrop.updateFunction+"('"+dx+"','"+dy+"')")}dragDrop.changed=false}};function fixNaviPanelPosition(E){var B=document.getElementById(E);var D=B.style.right;D=D.replace(/px/,"");D=parseInt(D);var A=B.style.bottom;A=A.replace(/px/,"");A=parseInt(A);var C=new Browser();if(D<0){D=0}if(D+B.offsetWidth>C.getWindowSize().width){D=C.getWindowSize().width-B.offsetWidth}if(A<0){A=0}if(A+B.offsetHeight>C.getWindowSize().height){A=C.getWindowSize().height-B.offsetHeight}if(isIphone){B.style.position="static"}if(isAndroid){B.style.position="static"}B.style.right=D+"px";B.style.bottom=A+"px"}function formatText(D,A){el=getById("textarea",D);if(el.setSelectionRange){el.value=el.value.substring(0,el.selectionStart)+"["+A+"]"+el.value.substring(el.selectionStart,el.selectionEnd)+"[/"+A+"]"+el.value.substring(el.selectionEnd,el.value.length)}else{var C=document.selection.createRange().text;el.focus();if(C!=""){var B="["+A+"]"+C+"[/"+A+"]";document.selection.createRange().text=B}}el.focus()}function clearp(A){}function toggleMainOptions(A,B){A(".toggledOnElement").hide();A(".toggledOnElement").removeClass("toggledOnElement");A("#opt-"+B).show();A("#kgmina-"+B).show();A("#optPay1-"+B).show();A("#optPay11-"+B).show();A("#optPay2-"+B).show();A("#optPay21-"+B).show();A("#optRep-"+B).show();A("#optShow-"+B).show();A("#optHide-"+B).show();A("#opt-"+B).addClass("toggledOnElement");A("#kgmina-"+B).addClass("toggledOnElement");A("#optPay1-"+B).addClass("toggledOnElement");A("#optPay11-"+B).addClass("toggledOnElement");A("#optPay2-"+B).addClass("toggledOnElement");A("#optPay21-"+B).addClass("toggledOnElement");A("#optRep-"+B).addClass("toggledOnElement");A("#optShow-"+B).addClass("toggledOnElement");A("#optHide-"+B).addClass("toggledOnElement")}function toggleGroupStudents(A,B){A(".toToggleShow-"+B).toggle();A(".toToggleHide-"+B).toggle()}function focusInput(){try{var B=document.getElementsByTagName("*");for(i=0;i<B.length;i++){if(B[i].nodeName.toLowerCase()=="textarea"){B[i].focus();break}if(B[i].nodeName.toLowerCase()=="input"&&B[i].type!="undefined"&&B[i].type.toLowerCase()=="text"){B[i].focus();break}}}catch(A){}}function fixAccessCode(A){A=A.replace(/[-\s]/g,"");return A}function param(B){B=B.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var A="[\\?&]"+B+"=([^&#]*)";var D=new RegExp(A);var C=D.exec(window.location.href);if(C==null){return""}else{return C[1]}}function hideDomFlashes(){var A=document.getElementsByTagName("object");for(var B=0;B<A.length;B++){A[B].style.display="none"}var A=document.getElementsByTagName("embed");for(var B=0;B<A.length;B++){A[B].style.display="none"}}function showDomFlashes(){var A=document.getElementsByTagName("object");for(var B=0;B<A.length;B++){A[B].style.display="block"}var A=document.getElementsByTagName("embed");for(var B=0;B<A.length;B++){A[B].style.display="block"}}function getUrlParameter(E){var D="";var C=window.location.href;if(C.indexOf("?")>-1){var B=C.substr(C.indexOf("?")).toLowerCase();var F=B.split("&");for(var A=0;A<F.length;A++){if(F[A].indexOf(E.toLowerCase()+"=")>-1){var G=F[A].split("=");D=G[1];break}}}return unescape(D)}var elementToCutToWidth;function cutToWidth(B,A){elementToCutToWidth=A;$j(B).each(function(){if($j(this).width()>elementToCutToWidth){$j(this).html($j(this).html()+"...");while($j(this).width()>elementToCutToWidth){$j(this).html($j(this).html().substring(0,Math.max(1,$j(this).html().length-5)));$j(this).html($j(this).html()+"...")}}})}function cutToOneParentLine(A){$j(A).each(function(B){var E=20;var D=computeElementHeight($j(this).parent());while(D>18){var C=$j(this).html();C=C.substr(0,C.length-4)+"...";$j(this).html(C);E--;if(E==0){break}D=computeElementHeight($j(this).parent())}})}function computeElementHeight(A){return A.innerHeight()-(parseInt(A.css("padding-top"))||0)-(parseInt(A.css("padding-bottom"))||0)}var SM_CONFIRM_ID="sdgiu";function sm_confirm(D,F,A,G,E,B){if($j("#"+SM_CONFIRM_ID).length<=0){var H=$j("<div />",{id:SM_CONFIRM_ID});$j("body").append(H)}$j("#"+SM_CONFIRM_ID).attr("title",D);$j("#"+SM_CONFIRM_ID).html(F);$j("#"+SM_CONFIRM_ID).dialog({resizable:false,modal:true});var C=[];C[0]={text:A,click:G?G:sm_confirm_null,mouseup:sm_confirm_close};if(E){C[1]={text:E,click:B?B:sm_confirm_null,mouseup:sm_confirm_close}}$j("#"+SM_CONFIRM_ID).dialog("option","buttons",C)}function sm_confirm_close(){$j("#"+SM_CONFIRM_ID).dialog("close")}function sm_confirm_null(){}function shortenText(A,B){$j(A).each(function(D,C){if($j(this).text().length>B){$j(this).attr("title",$j(this).text().trim());$j(this).text($j(this).text().substring(0,B-3)+"...")}})}function moveCourseCallback(A,B){console.debug(A+"@"+B)}function moveCourse(E){var H=E.parentNode.className.match(/course-\d+/)[0].replace("course-","");var K=$j(E).parent().parent();var G=K.clone(true);var J=K.parent().parent();function B(N,L){$j("tr, th",J).css("visibility","hidden");N.css("visibility","visible").css("background-color",J.css("background-color"));N[0].removeAttribute("onmouseover");var M=J.clone(true);$j("tr, th",J).css("visibility","visible");N.css("visibility","hidden");M.css({"background-color":"transparent",border:"none",position:"absolute",left:J.offset().left,top:J.offset().top,width:J.outerWidth(),"z-index":L});$j("#body").append(M);return(M)}var C=B(K,3);var A;var I=J.offset().top;var D=J.offset().top;var F=J.offset().top+J.outerWidth();$j(document).bind("mousemove",function(L){if(!A){A=L.pageY}I+=(L.pageY-A);var M=I;C.css("top",M);A=L.pageY;$j("tr.toggleSummary",J).each(function(){if(this!=K[0]&&L.pageY>=$j(this).offset().top&&L.pageY<=$j(this).offset().top+$j(this).innerHeight()){var R=K.clone(true);var P=$j(this).clone(true);var O=B($j(this),2);K.replaceWith(P);var Q=$j(this).offset().top;$j(this).replaceWith(R);Q=P.offset().top-Q;K=R;P.css("visibility","hidden");var N=function(S,V,T){var U=10;if(Math.abs(V)<=U){T.css("top",T.offset().top+V);S.css("visibility","visible");T.remove()}else{U*=(V/Math.abs(V));T.css("top",T.offset().top+U);V-=U;setTimeout(N,20,S,V,T)}};setTimeout(N,20,P,Q,O)}})});$j(document).bind("mouseup",function(M){C.remove();$j(document).unbind("mousemove");$j(document).unbind("mouseup");var L=K[0].rowIndex-2;K.replaceWith(G);moveCourseCallback(H,L)})}function setCookie(A,D,B){var E=new Date();E.setDate(E.getDate()+B);var C=escape(D)+((B==null)?"":"; expires="+E.toUTCString());document.cookie=A+"="+C}function createCookie(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"}function isEverLogin(){var B,A,D,C=document.cookie.split(";");for(B=0;B<C.length;B++){A=C[B].substr(0,C[B].indexOf("="));A=A.replace(/^\s+|\s+$/g,"");if(A=="sm.net.was.logged"){return true}}return false}function loginOnce(){createCookie("sm.net.was.logged",1,365)}function clickOnEnter(B,A){if(B.keyCode==13){$j(A).click()}}function moveCourseCallback(A,B){console.debug(A+"@"+B)}function moveCourse(E){var H=E.parentNode.className.match(/course-\d+/)[0].replace("course-","");var K=$j(E).parent().parent();var G=K.clone(true);var J=K.parent().parent();function B(N,L){$j("tr, th",J).css("visibility","hidden");N.css("visibility","visible").css("background-color",J.css("background-color"));N[0].removeAttribute("onmouseover");var M=J.clone(true);$j("tr, th",J).css("visibility","visible");N.css("visibility","hidden");M.css({"background-color":"transparent",border:"none",position:"absolute",left:J.offset().left,top:J.offset().top,width:J.outerWidth(),"z-index":L});$j("#body").append(M);return(M)}var C=B(K,3);var A;var I=J.offset().top;var D=J.offset().top;var F=J.offset().top+J.outerWidth();$j(document).bind("mousemove",function(L){if(!A){A=L.pageY}I+=(L.pageY-A);var M=I;C.css("top",M);A=L.pageY;$j("tr.toggleSummary",J).each(function(){if(this!=K[0]&&L.pageY>=$j(this).offset().top&&L.pageY<=$j(this).offset().top+$j(this).innerHeight()){var R=K.clone(true);var P=$j(this).clone(true);var O=B($j(this),2);K.replaceWith(P);var Q=$j(this).offset().top;$j(this).replaceWith(R);Q=P.offset().top-Q;K=R;P.css("visibility","hidden");var N=function(S,V,T){var U=10;if(Math.abs(V)<=U){T.css("top",T.offset().top+V);S.css("visibility","visible");T.remove()}else{U*=(V/Math.abs(V));T.css("top",T.offset().top+U);V-=U;setTimeout(N,20,S,V,T)}};setTimeout(N,20,P,Q,O)}})});$j(document).bind("mouseup",function(M){C.remove();$j(document).unbind("mousemove");$j(document).unbind("mouseup");var L=K[0].rowIndex-2;K.replaceWith(G);moveCourseCallback(H,L)})};if(typeof infosoftglobal=="undefined"){var infosoftglobal=new Object()}if(typeof infosoftglobal.FusionChartsUtil=="undefined"){infosoftglobal.FusionChartsUtil=new Object()}infosoftglobal.FusionCharts=function(C,A,I,F,K,D,G,J,B,E,H){if(!document.getElementById){return }this.initialDataSet=false;this.params=new Object();this.variables=new Object();this.attributes=new Array();if(C){this.setAttribute("swf",C)}if(A){this.setAttribute("id",A)}if(I){this.setAttribute("width",I)}if(F){this.setAttribute("height",F)}if(G){this.addParam("bgcolor",G)}this.addParam("quality","high");this.addParam("allowScriptAccess","always");this.addVariable("chartWidth",I);this.addVariable("chartHeight",F);K=K?K:0;this.addVariable("debugMode",K);this.addVariable("DOMId",A);D=D?D:0;this.addVariable("registerWithJS",D);J=J?J:"noScale";this.addVariable("scaleMode",J);B=B?B:"EN";this.addVariable("lang",B);this.detectFlashVersion=E?E:1;this.autoInstallRedirect=H?H:1;this.installedVer=infosoftglobal.FusionChartsUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){infosoftglobal.FusionCharts.doPrepUnload=true}};infosoftglobal.FusionCharts.prototype={setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(A,B){this.params[A]=B},getParams:function(){return this.params},addVariable:function(A,B){this.variables[A]=B},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var A=new Array();var B;var C=this.getVariables();for(B in C){A.push(B+"="+C[B])}return A},getSWFHTML:function(){var D="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){D='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"  ';D+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var C=this.getParams();for(var A in C){D+=[A]+'="'+C[A]+'" '}var B=this.getVariablePairs().join("&");if(B.length>0){D+='flashvars="'+B+'"'}D+="/>"}else{D='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';D+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var A in C){D+='<param name="'+A+'" value="'+C[A]+'" />'}var B=this.getVariablePairs().join("&");if(B.length>0){D+='<param name="flashvars" value="'+B+'" />'}D+="</object>"}return D},setDataURL:function(A){if(this.initialDataSet==false){this.addVariable("dataURL",A);this.initialDataSet=true}else{var B=infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute("id"));B.setDataURL(A)}},setDataXML:function(A){if(this.initialDataSet==false){this.addVariable("dataXML",A);this.initialDataSet=true}else{var B=infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute("id"));B.setDataXML(A)}},render:function(A){if((this.detectFlashVersion==1)&&(this.installedVer.major<6)){if(this.autoInstallRedirect==1){fCookie=new Cookie("net.supermemo.flashAlreadyCanceled");if(!fCookie.read("net.supermemo.flashAlreadyCanceled")){var B=window.confirm(noFlashAlert);if(B){window.location="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"}else{fCookie.write("1",0);return false}}}else{return false}}else{var C=(typeof A=="string")?document.getElementById(A):A;C.innerHTML=this.getSWFHTML();if(!document.embeds[this.getAttribute("id")]&&!window[this.getAttribute("id")]){window[this.getAttribute("id")]=document.getElementById(this.getAttribute("id"))}return true}}};infosoftglobal.FusionChartsUtil.getPlayerVersion=function(){var C=new infosoftglobal.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){C=new infosoftglobal.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var D=1;var B=3;while(D){try{B++;D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new infosoftglobal.PlayerVersion([B,0,0])}catch(E){D=null}}}else{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(E){try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");C=new infosoftglobal.PlayerVersion([6,0,21]);D.AllowScriptAccess="always"}catch(E){if(C.major==6){return C}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}}if(D!=null){C=new infosoftglobal.PlayerVersion(D.GetVariable("$version").split(" ")[1].split(","))}}}return C};infosoftglobal.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};infosoftglobal.FusionChartsUtil.cleanupSWFs=function(){var C=document.getElementsByTagName("OBJECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};if(infosoftglobal.FusionCharts.doPrepUnload){if(!infosoftglobal.unloadSet){infosoftglobal.FusionChartsUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",infosoftglobal.FusionChartsUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",infosoftglobal.FusionChartsUtil.prepUnload);infosoftglobal.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}if(Array.prototype.push==null){Array.prototype.push=function(A){this[this.length]=A;return this.length}}infosoftglobal.FusionChartsUtil.getChartObject=function(B){var A=null;if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[B]){A=document.embeds[B]}else{A=window.document[B]}}else{A=window[B]}if(!A){A=document.getElementById(B)}return A};infosoftglobal.FusionChartsUtil.updateChartXML=function(C,B){var A=infosoftglobal.FusionChartsUtil.getChartObject(C);A.SetVariable("_root.dataURL","");A.SetVariable("_root.isNewData","1");A.SetVariable("_root.newData",B);A.TGotoLabel("/","JavaScriptHandler")};var getChartFromId=infosoftglobal.FusionChartsUtil.getChartObject;var updateChartXML=infosoftglobal.FusionChartsUtil.updateChartXML;var FusionCharts=infosoftglobal.FusionCharts;/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		deconcept.SWFObject.doPrepUnload = true;
	}
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs[variablePairs.length] = key +"="+ variables[key];
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		
		fCookie = new Cookie('net.supermemo.flashAlreadyCanceled');
		if(!fCookie.read('net.supermemo.flashAlreadyCanceled')){
			var installationConfirm = window.confirm(noFlashAlert);
			if (installationConfirm){
				window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
			}else{
				fCookie.write('1',0);
				return false;
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
		var axo = 1;
		var counter = 3;
		while(axo) {
			try {
				counter++;
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//				document.write("player v: "+ counter);
				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
			} catch (e) {
				axo = null;
			}
		}
	} else { // Win IE (non mobile)
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if (param == null) { return q; }
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
	if (!deconcept.unloadSet) {
		deconcept.SWFObjectUtil.prepUnload = function() {
			__flash_unloadHandler = function(){};
			__flash_savedUnloadHandler = function(){};
			window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
		}
		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
		deconcept.unloadSet = true;
	}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;


