function popupchecker(B){var A=window.open("itestwin.html","","width=1,height=1,left=0,top=0,scrollbars=no");if(A==null){alert(B)}else{A.close()}}function checkall(){var B=document.getElementsByTagName("input");for(var A=0;A<B.length;A++){if(B[A].type=="checkbox"){B[A].checked=true}}}function checknone(){var B=document.getElementsByTagName("input");for(var A=0;A<B.length;A++){if(B[A].type=="checkbox"){B[A].checked=false}}}function lockoptions(formid,master,subitems){var form=document.forms[formid];if(eval("form."+master+".checked")){for(i=0;i<subitems.length;i++){unlockoption(form,subitems[i])}}else{for(i=0;i<subitems.length;i++){lockoption(form,subitems[i])}}return(true)}function lockoption(form,item){eval("form."+item+".disabled=true");if(form.elements["h"+item]){eval("form.h"+item+".value=1")}}function unlockoption(form,item){eval("form."+item+".disabled=false");if(form.elements["h"+item]){eval("form.h"+item+".value=0")}}function lockoptionsall(formid){var form=document.forms[formid];var dependons=eval(formid+"items");var tolock=Array();for(var dependon in dependons){if(!dependons.propertyIsEnumerable(dependon)){continue}var master=form[dependon];if(master===undefined){continue}for(var condition in dependons[dependon]){for(var value in dependons[dependon][condition]){var lock;switch(condition){case"notchecked":lock=!master.checked;break;case"checked":lock=master.checked;break;case"noitemselected":lock=master.selectedIndex==-1;break;case"eq":lock=master.value==value;break;default:lock=master.value!=value;break}for(var ei in dependons[dependon][condition][value]){if(!window.webkit&&(!dependons[dependon][condition][value].propertyIsEnumerable(ei))){continue}var eltolock=dependons[dependon][condition][value][ei];if(tolock[eltolock]!=null){tolock[eltolock]=lock||tolock[eltolock]}else{tolock[eltolock]=lock}}}}}for(var el in tolock){if(!tolock.propertyIsEnumerable(el)){continue}var formelement=form[el];if((formelement===undefined)||(formelement.disabled===undefined)){continue}formelement.disabled=tolock[el]}return true}function lockoptionsallsetup(formid){var form=document.forms[formid];var dependons=eval(formid+"items");for(var dependon in dependons){if(!dependons.propertyIsEnumerable(dependon)){continue}var master=form[dependon];if(master===undefined){continue}master.formid=formid;master.onclick=function(){return lockoptionsall(this.formid)};master.onblur=function(){return lockoptionsall(this.formid)};master.onchange=function(){return lockoptionsall(this.formid)}}for(var i=0;i<form.elements.length;i++){var formelement=form.elements[i];if(formelement.type=="reset"){formelement.formid=formid;formelement.onclick=function(){this.form.reset();return lockoptionsall(this.formid)};formelement.onblur=function(){this.form.reset();return lockoptionsall(this.formid)};formelement.onchange=function(){this.form.reset();return lockoptionsall(this.formid)}}}return lockoptionsall(formid)}function submitFormById(B){var A=document.getElementById(B);if(!A){return false}if(A.tagName.toLowerCase()!="form"){return false}if(!A.onsubmit||A.onsubmit()){return A.submit()}}function select_all_in(B,E,C){var A=document.getElementsByTagName("input");A=filterByParent(A,function(F){return findParentNode(F,B,E,C)});for(var D=0;D<A.length;++D){if(A[D].type=="checkbox"||A[D].type=="radio"){A[D].checked="checked"}}}function deselect_all_in(B,E,C){var A=document.getElementsByTagName("INPUT");A=filterByParent(A,function(F){return findParentNode(F,B,E,C)});for(var D=0;D<A.length;++D){if(A[D].type=="checkbox"||A[D].type=="radio"){A[D].checked=""}}}function confirm_if(B,A){if(!B){return true}return confirm(A)}function findParentNode(B,D,C,A){while(B.nodeName.toUpperCase()!="BODY"){if((!D||B.nodeName.toUpperCase()==D)&&(!C||B.className.indexOf(C)!=-1)&&(!A||B.id==A)){break}B=B.parentNode}return B}function findChildNodes(A,F,J,I,K){var E=new Array();for(var G=0;G<A.childNodes.length;G++){var H=false;var D=A.childNodes[G];if((D.nodeType==1)&&(J&&(typeof (D.className)=="string"))){var C=D.className.split(/\s+/);for(var B in C){if(C[B]==J){H=true;break}}}if(D.nodeType==1){if((!F||D.nodeName==F)&&(!J||H)&&(!I||D.id==I)&&(!K||D.name==K)){E=E.concat(D)}else{E=E.concat(findChildNodes(D,F,J,I,K))}}}return E}function elementShowAdvanced(C,A){for(var B in C){element=C[B];element.className=element.className.replace(new RegExp(" ?hide"),"");if(!A){element.className+=" hide"}}}function showAdvancedInit(D,B,F,A,C){var E=document.createElement("input");E.type="button";E.value=F;E.name=B;E.moodle={hideLabel:A,showLabel:C};YAHOO.util.Event.addListener(E,"click",showAdvancedOnClick);el=document.getElementById(D);el.parentNode.insertBefore(E,el)}function showAdvancedOnClick(E){var C=E.target?E.target:E.srcElement;var D=findChildNodes(C.form,null,"advanced");var F="";if(C.form.elements.mform_showadvanced_last.value=="0"||C.form.elements.mform_showadvanced_last.value==""){elementShowAdvanced(D,true);F=C.moodle.hideLabel;C.form.elements.mform_showadvanced_last.value="1"}else{elementShowAdvanced(D,false);F=C.moodle.showLabel;C.form.elements.mform_showadvanced_last.value="0"}var A=C.form.elements;for(var B=0;B<A.length;B++){if(A[B]&&A[B].name&&(A[B].name=="mform_showadvanced")){A[B].value=F}}return false}function unmaskPassword(E){var A=document.getElementById(E);var D=document.getElementById(E+"unmask");try{if(D.checked){var B=document.createElement('<input type="text" name="'+A.name+'">')}else{var B=document.createElement('<input type="password" name="'+A.name+'">')}B.attributes["class"].nodeValue=A.attributes["class"].nodeValue}catch(C){var B=document.createElement("input");B.setAttribute("name",A.name);if(D.checked){B.setAttribute("type","text")}else{B.setAttribute("type","password")}B.setAttribute("class",A.getAttribute("class"))}B.id=A.id;B.size=A.size;B.onblur=A.onblur;B.onchange=A.onchange;B.value=A.value;A.parentNode.replaceChild(B,A)}function elementToggleHide(D,A,B,C,F){if(!B){var G=D;D=document.getElementById("togglehide_"+G.id)}else{var G=B(D)}if(G.className.indexOf("hidden")==-1){G.className+=" hidden";if(D.src){D.src=D.src.replace("switch_minus","switch_plus");D.alt=C;D.title=C}var E=0}else{G.className=G.className.replace(new RegExp(" ?hidden"),"");if(D.src){D.src=D.src.replace("switch_plus","switch_minus");D.alt=F;D.title=F}var E=1}if(A==true){new cookie("hide:"+G.id,1,(E?-1:356),"/").set()}}function elementCookieHide(E,B,C){var D=document.getElementById(E);var A=new cookie("hide:"+E).read();if(A!=null){elementToggleHide(D,false,null,B,C)}}function filterByParent(E,A){var D=[];for(var C=0;C<E.length;++C){var B=A(E[C]);if(B.nodeName!="BODY"){D.push(E[C])}}return D}function fix_column_widths(){var A=navigator.userAgent.toLowerCase();if((A.indexOf("msie")!=-1)&&(A.indexOf("opera")==-1)){fix_column_width("left-column");fix_column_width("right-column")}}function fix_column_width(C){if(column=document.getElementById(C)){if(!column.offsetWidth){setTimeout("fix_column_width('"+C+"')",20);return }var B=0;var A=column.childNodes;for(i=0;i<A.length;++i){if(A[i].className.indexOf("sideblock")!=-1){if(B<A[i].offsetWidth){B=A[i].offsetWidth}}}for(i=0;i<A.length;++i){if(A[i].className.indexOf("sideblock")!=-1){A[i].style.width=B+"px"}}}}function insertAtCursor(D,C){if(document.selection){D.focus();sel=document.selection.createRange();sel.text=C}else{if(D.selectionStart||D.selectionStart=="0"){var B=D.selectionStart;var A=D.selectionEnd;D.value=D.value.substring(0,B)+C+D.value.substring(A,D.value.length)}else{D.value+=C}}}function addonload(A){var B=window.onload;window.onload=function(){if(B){B()}A()}}function cookie(B,D,A,F,C,E){this.name=B;this.value=D;this.expires=A;this.path=F;this.domain=C;this.secure=E;this.read=function(){var I=document.cookie;var H=this.name+"=";var M=H.length;var G=I.length;var K=0;while(K<G){var J=K+M;if(I.substring(K,J)==H){var L=I.indexOf(";",J);if(L==-1){L=I.length}return unescape(I.substring(J,L))}K=I.indexOf(" ",K)+1;if(K==0){break}}return null};this.set=function(){expStore=this.expires;exp=new Date();base=new Date(0);skew=base.getTime();if(skew>0){exp.setTime(exp.getTime()-skew)}exp.setTime(exp.getTime()+(this.expires*24*60*60*1000));this.expires=exp;document.cookie=this.name+"="+escape(this.value)+((this.expires)?"; expires="+this.expires.toGMTString():"")+((this.path)?"; path="+this.path:"")+((this.domain)?"; domain="+this.domain:"")+((this.secure)?"; secure":"");this.expires=expStore};this.kill=function(){document.cookie=this.name+"="+((this.path)?"; path="+this.path:"")+((this.domain)?"; domain="+this.domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"};this.changeName=function(G){this.kill();this.name=G;this.set()};this.changeVal=function(G){this.kill();this.value=G;this.set()};this.changeExp=function(G){this.kill();this.expires=G;this.set()};this.changePath=function(G){this.kill();this.path=G;this.set()};this.changeDomain=function(G){this.kill();this.domain=G;this.set()};this.changeSecurity=function(G){this.kill();this.secure=G;this.set()}}var UFO={req:["movie","width","height","majorversion","build"],opt:["play","loop","menu","quality","scale","salign","wmode","bgcolor","base","flashvars","devicefont","allowscriptaccess","seamlesstabbing","allowfullscreen","allownetworking"],optAtt:["id","name","align"],optExc:["swliveconnect"],ximovie:"ufo.swf",xiwidth:"215",xiheight:"138",ua:navigator.userAgent.toLowerCase(),pluginType:"",fv:[0,0],foList:[],create:function(A,B){if(!UFO.uaHas("w3cdom")||UFO.uaHas("ieMac")){return }UFO.getFlashVersion();UFO.foList[B]=UFO.updateFO(A);UFO.createCSS("#"+B,"visibility:hidden;");UFO.domLoad(B)},updateFO:function(A){if(typeof A.xi!="undefined"&&A.xi=="true"){if(typeof A.ximovie=="undefined"){A.ximovie=UFO.ximovie}if(typeof A.xiwidth=="undefined"){A.xiwidth=UFO.xiwidth}if(typeof A.xiheight=="undefined"){A.xiheight=UFO.xiheight}}A.mainCalled=false;return A},domLoad:function(B){var A=setInterval(function(){if((document.getElementsByTagName("body")[0]!=null||document.body!=null)&&document.getElementById(B)!=null){UFO.main(B);clearInterval(A)}},250);if(typeof document.addEventListener!="undefined"){document.addEventListener("DOMContentLoaded",function(){UFO.main(B);clearInterval(A)},null)}},main:function(B){var A=UFO.foList[B];if(A.mainCalled){return }UFO.foList[B].mainCalled=true;document.getElementById(B).style.visibility="hidden";if(UFO.hasRequired(B)){if(UFO.hasFlashVersion(parseInt(A.majorversion,10),parseInt(A.build,10))){if(typeof A.setcontainercss!="undefined"&&A.setcontainercss=="true"){UFO.setContainerCSS(B)}UFO.writeSWF(B)}else{if(A.xi=="true"&&UFO.hasFlashVersion(6,65)){UFO.createDialog(B)}}}document.getElementById(B).style.visibility="visible"},createCSS:function(A,E){var D=document.getElementsByTagName("head")[0];var C=UFO.createElement("style");if(!UFO.uaHas("ieWin")){C.appendChild(document.createTextNode(A+" {"+E+"}"))}C.setAttribute("type","text/css");C.setAttribute("media","screen");D.appendChild(C);if(UFO.uaHas("ieWin")&&document.styleSheets&&document.styleSheets.length>0){var B=document.styleSheets[document.styleSheets.length-1];if(typeof B.addRule=="object"){B.addRule(A,E)}}},setContainerCSS:function(D){var C=UFO.foList[D];var A=/%/.test(C.width)?"":"px";var B=/%/.test(C.height)?"":"px";UFO.createCSS("#"+D,"width:"+C.width+A+"; height:"+C.height+B+";");if(C.width=="100%"){UFO.createCSS("body","margin-left:0; margin-right:0; padding-left:0; padding-right:0;")}if(C.height=="100%"){UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;")}},createElement:function(A){return(UFO.uaHas("xml")&&typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml",A):document.createElement(A)},createObjParam:function(B,D,C){var A=UFO.createElement("param");A.setAttribute("name",D);A.setAttribute("value",C);B.appendChild(A)},uaHas:function(E){var D=UFO.ua;switch(E){case"w3cdom":return(typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&(typeof document.createElement!="undefined"||typeof document.createElementNS!="undefined"));case"xml":var A=document.getElementsByTagName("meta");var C=A.length;for(var B=0;B<C;B++){if(/content-type/i.test(A[B].getAttribute("http-equiv"))&&/xml/i.test(A[B].getAttribute("content"))){return true}}return false;case"ieMac":return/msie/.test(D)&&!/opera/.test(D)&&/mac/.test(D);case"ieWin":return/msie/.test(D)&&!/opera/.test(D)&&/win/.test(D);case"gecko":return/gecko/.test(D)&&!/applewebkit/.test(D);case"opera":return/opera/.test(D);case"safari":return/applewebkit/.test(D);default:return false}},getFlashVersion:function(){if(UFO.fv[0]!=0){return }if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){UFO.pluginType="npapi";var A=navigator.plugins["Shockwave Flash"].description;if(typeof A!="undefined"){A=A.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var B=parseInt(A.replace(/^(.*)\..*$/,"$1"),10);var E=/r/.test(A)?parseInt(A.replace(/^.*r(.*)$/,"$1"),10):0;UFO.fv=[B,E]}}else{if(window.ActiveXObject){UFO.pluginType="ax";try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(D){try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");UFO.fv=[6,0];C.AllowScriptAccess="always"}catch(D){if(UFO.fv[0]==6){return }}try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(D){}}if(typeof C=="object"){var A=C.GetVariable("$version");if(typeof A!="undefined"){A=A.replace(/^\S+\s+(.*)$/,"$1").split(",");UFO.fv=[parseInt(A[0],10),parseInt(A[2],10)]}}}}},hasRequired:function(C){var B=UFO.req.length;for(var A=0;A<B;A++){if(typeof UFO.foList[C][UFO.req[A]]=="undefined"){return false}}return true},hasFlashVersion:function(B,A){return(UFO.fv[0]>B||(UFO.fv[0]==B&&UFO.fv[1]>=A))?true:false},writeSWF:function(D){var G=UFO.foList[D];var I=document.getElementById(D);if(UFO.pluginType=="npapi"){if(UFO.uaHas("gecko")||UFO.uaHas("xml")){while(I.hasChildNodes()){I.removeChild(I.firstChild)}var J=UFO.createElement("object");J.setAttribute("type","application/x-shockwave-flash");J.setAttribute("data",G.movie);J.setAttribute("width",G.width);J.setAttribute("height",G.height);var F=UFO.optAtt.length;for(var H=0;H<F;H++){if(typeof G[UFO.optAtt[H]]!="undefined"){J.setAttribute(UFO.optAtt[H],G[UFO.optAtt[H]])}}var E=UFO.opt.concat(UFO.optExc);var F=E.length;for(var H=0;H<F;H++){if(typeof G[E[H]]!="undefined"){UFO.createObjParam(J,E[H],G[E[H]])}}I.appendChild(J)}else{var K="";var E=UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);var F=E.length;for(var H=0;H<F;H++){if(typeof G[E[H]]!="undefined"){K+=" "+E[H]+'="'+G[E[H]]+'"'}}I.innerHTML='<embed type="application/x-shockwave-flash" src="'+G.movie+'" width="'+G.width+'" height="'+G.height+'" pluginspage="http://www.macromedia.com/go/getflashplayer"'+K+"></embed>"}}else{if(UFO.pluginType=="ax"){var C="";var F=UFO.optAtt.length;for(var H=0;H<F;H++){if(typeof G[UFO.optAtt[H]]!="undefined"){C+=" "+UFO.optAtt[H]+'="'+G[UFO.optAtt[H]]+'"'}}var A="";var F=UFO.opt.length;for(var H=0;H<F;H++){if(typeof G[UFO.opt[H]]!="undefined"){A+='<param name="'+UFO.opt[H]+'" value="'+G[UFO.opt[H]]+'" />'}}var B=window.location.protocol=="https:"?"https:":"http:";I.innerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+C+' width="'+G.width+'" height="'+G.height+'" codebase="'+B+"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+G.majorversion+",0,"+G.build+',0"><param name="movie" value="'+G.movie+'" />'+A+"</object>"}}},createDialog:function(A){var C=UFO.foList[A];UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","height:100%; overflow:hidden;");UFO.createCSS("#xi-con","position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");UFO.createCSS("#xi-dia","position:absolute; left:50%; top:50%; margin-left: -"+Math.round(parseInt(C.xiwidth,10)/2)+"px; margin-top: -"+Math.round(parseInt(C.xiheight,10)/2)+"px; width:"+C.xiwidth+"px; height:"+C.xiheight+"px;");var I=document.getElementsByTagName("body")[0];var G=UFO.createElement("div");G.setAttribute("id","xi-con");var E=UFO.createElement("div");E.setAttribute("id","xi-dia");G.appendChild(E);I.appendChild(G);var J=window.location;if(UFO.uaHas("xml")&&UFO.uaHas("safari")){var H=document.getElementsByTagName("title")[0].firstChild.nodeValue=document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0,47)+" - Flash Player Installation"}else{var H=document.title=document.title.slice(0,47)+" - Flash Player Installation"}var B=UFO.pluginType=="ax"?"ActiveX":"PlugIn";var F=typeof C.xiurlcancel!="undefined"?"&xiUrlCancel="+C.xiurlcancel:"";var D=typeof C.xiurlfailed!="undefined"?"&xiUrlFailed="+C.xiurlfailed:"";UFO.foList["xi-dia"]={movie:C.ximovie,width:C.xiwidth,height:C.xiheight,majorversion:"6",build:"65",flashvars:"MMredirectURL="+J+"&MMplayerType="+B+"&MMdoctitle="+H+F+D};UFO.writeSWF("xi-dia")},expressInstallCallback:function(){var B=document.getElementsByTagName("body")[0];var A=document.getElementById("xi-con");B.removeChild(A);UFO.createCSS("body","height:auto; overflow:auto;");UFO.createCSS("html","height:auto; overflow:auto;")},cleanupIELeaks:function(){var B=document.getElementsByTagName("object");var E=B.length;for(var D=0;D<E;D++){B[D].style.display="none";var C=0;for(var A in B[D]){C++;if(typeof B[D][A]=="function"){B[D][A]=null}if(C>1000){break}}}}};if(typeof window.attachEvent!="undefined"&&UFO.uaHas("ieWin")){window.attachEvent("onunload",UFO.cleanupIELeaks)}var select_formid;var select_targetwindow;function initSelect(C,B){select_formid=C;select_targetwindow=B;var A=document.getElementById(select_formid+"_jump");A.changed=false;selectFocussed();A.onchange=selectChanged;A.onkeydown=selectKeyed;A.onclick=selectClicked;return true}function selectChanged(B){var A;if(B&&B.value){A=B}else{A=this}if(!A.changed){return false}select_targetwindow.location=document.getElementById(select_formid).jump.options[document.getElementById(select_formid).jump.selectedIndex].value;return true}function selectClicked(){this.changed=true}function selectFocussed(){this.initValue=this.value;return true}function selectKeyed(C){var D;var E="9";var B="13";var A="27";if(C){D=C}else{D=event}if((D.keyCode==B||D.keyCode==E)&&this.value!=this.initValue){this.changed=true;selectChanged(this)}else{if(D.keyCode==A){this.value=this.initValue}else{this.changed=false}}return true};