var aQ="";var aW=document.getElementsByTagName("script");for(var i=0;i<aW.length;i++){if(aW[i].src.match(/zygolib\.js$/)){aQ=aW[i].src.replace(/zygolib\.js$/,"");}}var O=aQ;var T="1px solid black";var I="white";var ah=null;var Z=null;var aj=null;var ar=null;function popConfig(cV,cM,bD){T=cV;I=cM;ah=bD;};function popShowWindow(aT,pos,html,width,height){v();var bO=document.getElementById(aT);if(!bO){ad("Attempt to position popup near non-existant element '"+aT+"'");return;}var an=o(bO);var x=0;var y=0;switch(pos){case 'right':x=an.left+an.width;y=an.top;break;case 'bottom':x=an.left;y=an.top+an.height;break;case 'over':x=an.left;y=an.top;break;default:ad("Attempt to position popup with unsupported position '"+pos+"'");return;}var div=document.createElement("div");div.style.position="absolute";div.style.left=x+"px";div.style.top=y+"px";if(width){div.style.width=width+"px";}if(height){div.style.height=height+"px";}if(I){div.style.backgroundColor=I;}if(T){div.style.border=T;}if(ah){div.className=ah;}div.onclick=function(e){e=e||event;e.cancelBubble=true;};div.innerHTML=html;document.body.appendChild(div);pos=o(div);var cJ=window.innerWidth||document.body.clientWidth;if(pos.left+pos.width>cJ){div.style.left=(cJ-pos.width)+"px";}Z=div;ar=document.body.onclick;document.body.onclick=v;};function bS(aT,pos,name,width,height){v();var bO=document.getElementById(aT);if(!bO){ad("Attempt to position popup near non-existant element '"+aT+"'");return;}var an=o(bO);var x=0;var y=0;switch(pos){case 'right':x=an.left+an.width;y=an.top;break;case 'bottom':x=an.left;y=an.top+an.height;break;case 'over':x=an.left;y=an.top;break;default:ad("Attempt to position popup with unsupported position '"+pos+"'");return;}var div=document.getElementById(name);div.style.display="block";div.style.position="absolute";div.style.left=x+"px";div.style.top=y+"px";if(width){div.style.width=width+"px";}if(height){div.style.height=height+"px";}if(I){div.style.backgroundColor=I;}if(T){div.style.border=T;}if(ah){div.className=ah;}div.onclick=function(e){e=e||event;e.cancelBubble=true;};pos=o(div);var cJ=window.innerWidth||document.body.clientWidth;if(pos.left+pos.width>cJ){div.style.left=(cJ-pos.width)+"px";}aj=name;ar=document.body.onclick;document.body.onclick=v;};function v(){if(Z){document.body.removeChild(Z);Z=null;}else if(aj){document.getElementById(aj).style.display="none";aj=null;}if(document.body.onclick==v){document.body.onclick=ar;}};if(typeof(aD)=='undefined'){var bJ=window.onload;window.onload=function(){bp();if(bJ){bJ();}};}var ak=['#ffff00','#00ff00','#00ffff','#ff00ff','#0000ff','#ff0000','#000080','#008080','#008000','#800080','#800000','#808000','#000000','#808080','#c0c0c0','#ffffff'];var aC=10;var az=10;var aU=94;var D=new Array();var V=null;var aZ;function colConfig(cols,cW,cX,cQ){ak=cols;aU=cW;aC=cX;az=cQ;};function colConvertInput(aK){var f=new Object();f.name=aK;D.push(f);};function bp(){for(var i=0;i<D.length;i++){var ct=document.getElementById(D[i].name);if(ct){D[i].input=ct;ct.style.display="none";var dr=document.createElement("img");bP(dr,ct.value,ct.id);var dh="COL_"+ct.id+"_preview";D[i].aL=dh;dr.id=dh;ct.parentNode.insertBefore(dr,ct);}else{ad("Attempt to convert non-existant control '"+D[i].name+"'");D.splice(i,1);i--;}}var bm=document.body.onclick;document.body.onclick=function(){bK();if(bm){bm();}};};function bP(g,cR,aK){g.style.border="1px solid black";g.style.width="32px";g.style.backgroundColor="#"+cR;g.style.verticalAlign='middle';g.src=O+'images/cselector.png';g.onclick=function(e){e=e||event;e.cancelBubble=true;colShowSelector(aK);};};function bb(aK){for(var i=0;i<D.length;i++){if(D[i].name==aK){return D[i];}}return null;};function colShowSelector(aK,aL,ao){if(arguments.length>1){var f=new Object();f.name=aK;var ct=document.getElementById(aK);f.input=ct;f.aL=aL;f.ao=ao;D.push(f);}var f=bb(aK);aL=f.aL;var dA=document.getElementById(aL);var pos=o(dA);var div=document.createElement("div");div.innerHTML=bR();div.style.backgroundColor="#ffffff";div.style.border="1px solid black";div.style.position="absolute";div.style.left=(pos.left+pos.width)+"px";div.style.top=pos.top+"px";document.body.appendChild(div);V=div;aZ=aK;};function bK(){if(V){document.body.removeChild(V);V=null;}};function bR(){var html="<div style='width: "+aU+"px;'>";for(var i=0;i<ak.length;i++){html+="<div style='width: "+aC+"px; height: "+az+"px; float: left; border: 1px solid black; background-color: "+ak[i]+";margin: 5px;' onmouseover='this.style.border=\"1px solid white\";' onmouseout='this.style.border=\"1px solid black\";' onclick='bN(\""+ak[i]+"\");'></div>";}html+="</div>";return html;};function bN(col){var f=bb(aZ);var aY=col.replace(/^#/,'');if(f.input){f.input.value=aY;}var pc=document.getElementById(f.aL);pc.style.backgroundColor=col;document.body.removeChild(V);V=null;if(f.ao){f.ao(aY,f.name,f.aL);}};if(typeof(aD)=='undefined'){var by=window.onload;window.onload=function(){bs();if(by){by();}};}var aw=[["<h1>","Heading 1"],["<h2>","Heading 2"],["<h3>","Heading 3"],["<p>","Normal"]];var aA=new Array();var F=new Array();var U=null;var av=new Array();var P=new Array();var ax=null;var A=new Array();var ac=null;var aa='#ff0000';var ab='#ffff00';var G;function wysConvertTextarea(name,aq,aN){var aX=new Object();aX.name=name;aX.aq=aq;if(aN)aX.aN=aN;A.push(aX);};function wysSetHeaderContent(cp){ax=cp;};function bs(){if(!cG()){return;}for(var i=0;i<A.length;i++){bv(A[i]);}};function wysAddLink(title,url){aA.push({title:title,url:url});};function wysAddImage(title,url,bc,folder){if(folder==null){F.push({title:title,url:url,bc:bc,type:'img'});}else{for(var i=0;i<F.length;i++){if(F[i].type=='folder'&&F[i].title==folder){F[i].dC.push({title:title,url:url,bc:bc,type:'img'});break;}}}};function wysAddImageFolder(title){F.push({title:title,type:'folder',dC:new Array()});};function wysUseCustomImageSelector(html){U=html;};function wysAddStyle(title,html){av.push({title:title,html:html});};function cO(title,bt,bW){P.push({title:title,start:bt,dx:bW});};function bv(f){var L=document.getElementById(f.name);if(!L){return;}f.L=L;var pos=o(L);f.width=pos.width;f.height=pos.height;be(f);var bC=f.L.form.onsubmit;f.L.form.onsubmit=function(){if(!f.designMode){document.getElementById(f.m).contentWindow.document.body.innerHTML=document.getElementById(f.ap).value;}f.dC=ay(document.getElementById(f.m).contentWindow.document.body);f.L.value=f.dC;if(bC){bC()}};f.designMode=false;window.setTimeout("ai('"+f.name+"', true);",50);};function be(f){var div=document.createElement("div");f.div=div;div.style.border="1px solid black";div.style.width=f.width+"px";div.style.height=f.height+"px";div.style.position="relative";div.style.overflow="hidden";f.aP="WYS_"+f.name+"_toolbar";var dC="<div style='margin: 1px; position: absolute; top: 0px; left: 0px; width: "+(f.width)+"px;' id='"+f.aP+"'>"+aI(f.name,false)+"</div>";f.m="WYS_"+f.name+"_iframe";dC+="<iframe frameborder='0' id='"+f.m+"'></iframe>";f.ap="WYS_"+f.name+"_source";dC+="<textarea id='"+f.ap+"' style='display: none;'></textarea>";f.ca="WYS_"+f.name+"_footbar";if(f.aq!=0){dC+="<div style='margin: 1px; position: absolute; bottom: 0px; left: 0px;' id='"+f.ca+"'>"+bU(f.name)+"</div>";}div.innerHTML=dC;f.L.parentNode.insertBefore(div,f.L);f.L.style.display="none";aJ(f);f.dC=f.L.value;document.getElementById(f.ap).value=f.dC;var R=document.getElementById(f.m).contentWindow.document;R.designMode='On';var iframe=document.getElementById(f.m);R=iframe.contentWindow.document;R.open();R.write("<html><head>");if(ax){R.write("\n"+ax+"\n");}var cF="";if(f.aN)cF=" class='"+f.aN+"'";R.write("</head><body"+cF+">");R.write(f.dC);R.write("</body></html>");R.close();f.designMode=false;window.setTimeout("ai('"+f.name+"', true);",50);};function wysRecreateControl(id){var f=C(id);f.div.parentNode.removeChild(f.div);be(f);};function cC(id){var f=C(id);var R=document.getElementById(f.m).contentWindow.document;R.designMode='On';};function cP(bX){for(var i=0;i<A.length;i++){if(bX==A[i].m){var tb=document.getElementById(A[i].aP);tb.style.display="block";aJ(A[i]);return;}}};function cS(bX){for(var i=0;i<A.length;i++){if(bX==A[i].m){var tb=document.getElementById(A[i].aP);tb.style.display="none";aJ(A[i]);return;}}};function C(name){for(var i=0;i<A.length;i++){if(A[i].name==name){return A[i];}}return null;};function ai(name,dn){var f=C(name);if(f.designMode==dn){return;}var iframe=document.getElementById(f.m);var aB=document.getElementById(f.ap);var bY=document.getElementById(f.aP);if(f.aq!=0){var cv=document.getElementById("WYS_"+name+"_deslink");var ce=document.getElementById("WYS_"+name+"_htmllink");}if(!dn){aB.value=ay(iframe.contentWindow.document.body);aB.style.display="block";iframe.style.display="none";var cl=aI(name,true);var bI=bY.firstChild;while(bI){bI.parentNode.removeChild(bI);bI=bY.firstChild;}var cY=document.createElement("div");cY.innerHTML=cl;bY.appendChild(cY);if(f.aq!=0){cv.style.border="1px solid #fff";ce.style.border="1px solid #008";}}else{if(!iframe.contentWindow.document.body){window.setTimeout("ai('"+name+"',true)",500);return;}iframe.contentWindow.document.body.innerHTML=aB.value;aB.style.display="none";iframe.style.display="block";var cl=aI(name,false);var bI=bY.firstChild;while(bI){bI.parentNode.removeChild(bI);bI=bY.firstChild;}var cY=document.createElement("div");cY.innerHTML=cl;bY.appendChild(cY);if(f.aq!=0){cv.style.border="1px solid #008";ce.style.border="1px solid #fff";}}f.designMode=dn;};function ay(bk){if(document.all){for(var i=0;i<bk.all.length;i++){var g=bk.all[i];if(g.nodeType==1){if(g.nodeName.match(/^\//)){g.parentNode.removeChild(g);i--;}else if(g.nodeName=='TBODY'){if(!g.parentNode||g.parentNode.nodeName!='TABLE'){g.parentNode.removeChild(g);}}else if(g.nodeName=='TR'){if(!g.parentNode||g.parentNode.nodeName!='TBODY'){g.parentNode.removeChild(g);}}else if(g.nodeName=='TD'||g.nodeName=='TH'){if(!g.parentNode||g.parentNode.nodeName!='TR'){g.parentNode.removeChild(g);}}}}}return bk.innerHTML;};function aS(cn){var bM={'p':['align'],'br':null,'img':['alt','src','title','style'],'h1':null,'h2':null,'h3':null,'h4':null,'ul':null,'ol':null,'li':null,'b':null,'i':null,'u':null,'a':['href','name','target'],'table':['border','width'],'tr':null,'td':['align','valign'],'th':['align','valign']};var html="";for(var i=0;i<cn.childNodes.length;i++){var g=cn.childNodes[i];if(g.nodeType==1){var cu=0;for(var e in bM){if(g.nodeName.toLowerCase()==e){html+="<"+e;if(bM[e]){for(var j=0;j<bM[e].length;j++){for(var k=0;k<g.attributes.length;k++){if(g.attributes[k].nodeName.toLowerCase()==bM[e][j]){html+=" "+bM[e][j]+"=\""+g.attributes[k].nodeValue+"\"";}}}}if(g.childNodes.length>0){html+=">";html+=aS(g);html+="</"+e+">";}else{html+=" />";}cu=1;}}if(!cu){html+=aS(g);}}else if(g.nodeType==3){html+=g.nodeValue;}}return html;};function aJ(f){var cy=o(document.getElementById(f.aP));var cj=0;if(f.aq!=0){var df=o(document.getElementById(f.ca));cj=df.height;}f.bL=(f.width-10);f.bA=(f.height-cy.height-cj-10);var iframe=document.getElementById(f.m);iframe.style.position="absolute";iframe.style.left="3px";iframe.style.top=(cy.height+2)+"px";iframe.style.border="1px inset #888";iframe.style.width=f.bL+"px";iframe.style.height=f.bA+"px";var aB=document.getElementById(f.ap);aB.style.position="absolute";aB.style.left="3px";aB.style.top=(cy.height+2)+"px";aB.style.border="1px inset #888";aB.style.width=f.bL+"px";aB.style.height=f.bA+"px";};function aI(name,disabled){var dC="";var f=C(name);if(f.aq!=0){dC+="<select style='width: 70px;' onchange='Y(this, \""+name+"\", \"formatblock\", this.options[this.selectedIndex].value); this.selectedIndex=0'";if(disabled){dC+=" disabled='true'";}dC+=">";dC+="<option value=''>Style...</option>";for(var i=0;i<aw.length;i++){dC+="<option value='"+aw[i][0]+"'>"+aw[i][1]+"</option>";}dC+="</select>&nbsp;";dC+="<select style='width: 64px' onchange='Y(this, \""+name+"\", \"fontsize\", this.options[this.selectedIndex].value); this.selectedIndex=0'";if(disabled){dC+=" disabled='true'";}dC+=">";dC+="<option value=''>Size...</option>";dC+="<option value='1'>1</option>";dC+="<option value='2'>2</option>";dC+="<option value='3'>3</option>";dC+="<option value='4'>4</option>";dC+="<option value='5'>5</option>";dC+="<option value='6'>6</option>";dC+="<option value='7'>7</option>";dC+="<option value='8'>8</option>";dC+="</select>";if(av.length>0){dC+="&nbsp;<select onchange='Y(this, \""+name+"\", \"style\", this.options[this.selectedIndex].value); this.selectedIndex=0'";if(disabled){dC+=" disabled='true'";}dC+=">";dC+="<option value=''>CSS...</option>";for(var i=0;i<av.length;i++){dC+="<option value='"+i+"'>"+av[i].title+"</option>";}dC+="</select>";}if(P.length>0){dC+="&nbsp;<select style='width: 80px' onchange='Y(this, \""+name+"\", \"custom\", this.options[this.selectedIndex].value); this.selectedIndex=0'";if(disabled){dC+=" disabled='true'";}dC+=">";dC+="<option value=''>Special...</option>";for(var i=0;i<P.length;i++){dC+="<option value='"+i+"'>"+P[i].title+"</option>";}dC+="</select>";}dC+="|";}dC+=l(name,'Bold','images/bold.png','bold','',!disabled);dC+=l(name,'Italic','images/italic.png','italic','',!disabled);dC+=l(name,'Underline','images/underline.png','underline','',!disabled);dC+="|";dC+=l(name,'Left','images/left.png','justifyleft','',!disabled);dC+=l(name,'Centre','images/centre.png','justifycenter','',!disabled);dC+=l(name,'Right','images/right.png','justifyright','',!disabled);dC+=l(name,'Full','images/full.png','justifyfull','',!disabled);dC+="|";dC+=l(name,'Numbered list','images/numberedlist.png','insertorderedlist','',!disabled);dC+=l(name,'Bulleted list','images/bulletlist.png','insertunorderedlist','',!disabled);dC+=l(name,'Indent','images/indent.png','indent','',!disabled);dC+=l(name,'Outdent','images/outdent.png','outdent','',!disabled);dC+="|";dC+=l(name,'Font colour','images/fontcol.png','applyforecolour','',!disabled);dC+=l(name,'Choose font colour','images/submenu.png','forecolour','',!disabled);dC+=l(name,'Highlight colour','images/bgcol.png','applyhilightcolour','',!disabled);dC+=l(name,'Choose highlight colour','images/submenu.png','hilightcolour','',!disabled);if(f.aq!=0){dC+="|";dC+=l(name,'Make link','images/link.png','createlink','',!disabled);dC+=l(name,'Remove link','images/nolink.png','unlink','',!disabled);dC+=l(name,'Insert table','images/table.png','inserttable','',!disabled);dC+=l(name,'Insert image','images/image.png','insertimage','',!disabled);}dC+="|";dC+=l(name,'Remove formatting','images/nostyle.png','removeformat','',!disabled);dC+=l(name,'Cleanup HTML','images/word.png','cleanhtml','',!disabled);return dC;};function l(name,title,img,n,option,enabled){var html="";if(enabled){html+="<a id='WYS_"+name+"_"+n+"_button' href='javascript:Y(this, \""+name+"\", \""+n+"\", \""+option;html+="\");'";if(n=='applyforecolour'){html+=" style='background-color: "+aa+";'";}else if(n=='applyhilightcolour'){html+=" style='background-color: "+ab+";'";}html+=">";}html+="<img alt='"+title+"' title='"+title+"' src='"+O+img+"'";html+=" style='border: 1px solid white; vertical-align: middle;";if(!enabled){html+="opacity: 0.5; filter:Alpha(Opacity=50, Style=0);";}html+="'";html+=" onmouseover='this.style.border=\"1px outset white\";' onmouseout='this.style.border=\"1px solid white\";' onmousedown='this.style.border=\"1px inset white\";'";html+=" border='0'>";if(enabled){html+="</a>";}return html;};function bU(name){var dC="";dC+="<a id='WYS_"+name+"_deslink' style='display: block; float: left;' href='javascript:ai(\""+name+"\", true);'><img src='"+O+"images/design.png' alt='Design' border='0'></a>";dC+="<a id='WYS_"+name+"_htmllink' style='display: block; float: left;' href='javascript:ai(\""+name+"\", false);'><img src='"+O+"images/html.png' alt='HTML' border='0'></a>";return dC;};function Y(link,name,n,option){var f=C(name);if(!f.designMode){return;}if(document.all){document.getElementById(f.m).contentWindow.focus();G=document.getElementById(f.m).contentWindow.document.selection.createRange();}if(n=='forecolour'){ac=f;colShowSelector(name+"_forecolour","WYS_"+name+"_applyforecolour_button",bq);return;}else if(n=='applyforecolour'){n="forecolor";option=aa;}else if(n=='hilightcolour'){ac=f;colShowSelector(name+"_backcolour","WYS_"+name+"_applyhilightcolour_button",bE);return;}else if(n=='applyhilightcolour'){n=document.all?'backcolor':'hilitecolor';option=ab;}else if(n=='inserttable'){var html="<form name='WYS_TABLE_FORM' onsubmit='this.okbutt.onclick(); return false;'><table><tr><td>Columns</td><td><input type='text' size='4' name='cols' value='2'></td></tr>";html+="<tr><td>Rows</td><td><input type='text' size='4' name='rows' value='2'></td></tr>";html+="<tr><td>Border</td><td><input type='checkbox' checked='true' name='border' value='1'></td></tr>";html+="<tr><td colspan='2' align='right'><input type='button' onclick='v()' value='Cancel'>";html+=" <input type='button' onclick='bV(\""+name+"\", this.form.cols.value, this.form.rows.value, this.form.border.checked);v();' value=' OK ' name='okbutt'></td></tr>";html+="</table></form>";popShowWindow("WYS_"+name+"_inserttable_button","bottom",html);return;}else if(n=='createlink'){var html="<form name='WYS_LINK_FORM' onsubmit='this.okbutt.onclick(); return false;'><table>";if(aA.length>0){html+="<tr><td>Page:</td><td><select name='page'>";for(var i=0;i<aA.length;i++){html+="<option value='"+i+"'>"+aA[i].title+"</option>";}html+="</select></td></tr>";}html+="<tr><td>http://</td><td><input type='text' name='url'></td></tr>";html+="<tr><td colspan='2' align='right'><input type='button' value='Cancel' onclick='v()'>";html+=" <input type='button' value=' OK ' name='okbutt' onclick='co(\""+name+"\", this.form.url.value, this.form.page ? this.form.page.selectedIndex : -1);v();'></td></tr>";html+="</table></form>";popShowWindow("WYS_"+name+"_createlink_button","bottom",html);return;}else if(n=='insertimage'){if(U){au=name;bS("WYS_"+name+"_insertimage_button","bottom",U);}else{var html="<div style='width: 600px; height: 300px; overflow: auto;'>";for(var i=0;i<F.length;i++){html+=am(F[i],name,i);if(F[i].type=='folder'){html+="<div id='IMGOPN_"+name+"_"+i+"' style='display: none;'>";for(var j=0;j<F[i].dC.length;j++){html+=am(F[i].dC[j],name,j,i);}html+="</div>";}}html+="</div>";popShowWindow("WYS_"+name+"_insertimage_button","bottom",html);}return;}else if(n=='custom'){if(option==""){return;}var index=parseInt(option);bn(f,P[index].start,P[index].dx);return;}else if(n=='style'){if(option==""){return;}var index=parseInt(option);aM(f,av[index].html);return;}else if(n=='formatblock'&&option==''){return;}else if(n=="fontsize"&&option==''){return;}else if(n=="small"){aM(f,"<span class='small'>");return;}else if(n=="cleanhtml"){var html=aS(document.getElementById(f.m).contentWindow.document.body);document.getElementById(f.m).contentWindow.document.body.innerHTML=html;return;}else if(n=="removeformat"){if(document.all){document.getElementById(f.m).contentWindow.focus();var aV=document.getElementById(f.m).contentWindow.document.selection.createRange();aV.text=aV.text;return;}}var R=document.getElementById(f.m).contentWindow.document;if(R.queryCommandEnabled(n)){R.execCommand(n,false,option);}};function am(bh,ba,bG,bB){var html="";html+="<div style='border: 1px solid black; background-color: white; height: 50px;'";if(bh.type=='img'){if(bB==null){html+=" onclick='bf(\""+ba+"\", "+bG+");v();'";}else{html+=" onclick='bf(\""+ba+"\", "+bG+", "+bB+");v();'";}}else{html+=" onclick='bo(\""+ba+"\", "+bG+");'";}html+=">";html+="<table border='0' width='570' height='50'><tr ";html+=" onmouseover='this.style.backgroundColor=\"#000080\"; this.style.color=\"#ffffff\";'";html+=" onmouseout='this.style.backgroundColor=\"#ffffff\"; this.style.color=\"#000000\";'";html+=">";if(bh.type=='img'){html+="<td valign='middle'>";html+=""+bh.title+"</td><td align='right' width='46'>";var url=bh.bc||bh.url;html+="<img src='"+url+"' style='width: 46px; height: 46px;' />";}else{html+="<td valign='middle' colspan='2'>";html+="<img src='"+O+"images/folder.gif' align='middle' /> "+bh.title;}html+="</td></tr></table></div>";return html;};function bo(ba,index){var g=document.getElementById("IMGOPN_"+ba+"_"+index);if(g){if(g.style.display=="none"){g.style.display="block";}else{g.style.display="none";}}};function bf(name,cs,ci){var f=C(name);if(document.all){G.select();}var html;if(ci==null){html="<img src='"+F[cs].url+"' alt='Image' style='border-style: none;' />";}else{html="<img src='"+F[ci].dC[cs].url+"' alt='Image' style='border-style: none;' />";}if(document.all){G.select();var cw=document.getElementById(f.m).contentWindow;cw.focus();var aV=cw.document.selection.createRange();aV.pasteHTML(html);cw.focus();}else{var cw=document.getElementById(f.m).contentWindow;cw.focus();var n="inserthtml";var R=document.getElementById(f.m).contentWindow.document;if(R.queryCommandEnabled(n)){R.execCommand(n,false,html);}cw.focus();}};var au=null;function cz(url){var f=C(au);if(!f)return;if(document.all){G.select();}var html="<img src='"+url+"' border='0'>";if(document.all){G.select();var cw=document.getElementById(f.m).contentWindow;cw.focus();var aV=cw.document.selection.createRange();aV.pasteHTML(html);cw.focus();}else{var cw=document.getElementById(f.m).contentWindow;cw.focus();var n="inserthtml";var R=document.getElementById(f.m).contentWindow.document;if(R.queryCommandEnabled(n)){R.execCommand(n,false,html);}cw.focus();}v();};function co(name,url,da){var f=C(name);if(document.all){G.select();}var option;if(url&&url.length>0){option="http://"+url;}else{option=aA[da].url;}var cw=document.getElementById(f.m).contentWindow;cw.focus();var n="createlink";var R=document.getElementById(f.m).contentWindow.document;if(R.queryCommandEnabled(n)){R.execCommand(n,false,option);}};function bV(name,cols,rows,border){var f=C(name);var html="<table border='";if(border){html+="1";}else{html+="0";}html+="'>";for(var r=0;r<rows;r++){html+="<tr>";for(var c=0;c<cols;c++){html+="<td></td>";}html+="</tr>";}html+="</table>";if(document.all){G.select();var cw=document.getElementById(f.m).contentWindow;cw.focus();var aV=cw.document.selection.createRange();aV.pasteHTML(html);cw.focus();}else{var cw=document.getElementById(f.m).contentWindow;cw.focus();var n="inserthtml";var R=document.getElementById(f.m).contentWindow.document;if(R.queryCommandEnabled(n)){R.execCommand(n,false,html);}cw.focus();}};function aM(f,ck){document.getElementById(f.m).contentWindow.focus();var cw=document.getElementById(f.m).contentWindow;try{cw.document.execCommand("useCSS",false,false);}catch(ex){}try{cw.document.execCommand("styleWithCSS",false,false);}catch(ex){}cw.document.execCommand("FontName",false,"#secret_font_name#");var fonts=cw.document.getElementsByTagName("font");for(var i=0;i<fonts.length;i++){if(fonts[i].face="#secret_font_name#"){if(document.all){fonts[i].outerHTML=ck+fonts[i].innerHTML+"</span>";}else{var g=document.createElement("div");g.innerHTML=ck+fonts[i].innerHTML+"</span>";fonts[i].parentNode.replaceChild(g.firstChild,fonts[i]);}i--;}}};function bn(f,bt,bW){document.getElementById(f.m).contentWindow.focus();if(document.all){var cw=document.getElementById(f.m).contentWindow;var tr=cw.document.selection.createRange();var cq=tr.duplicate();tr.collapse(false);tr.text="#replace_end_html#";cq.select();cq.collapse(true);cq.text="#replace_start_html#";}else{var cw=document.getElementById(f.m).contentWindow;var tr=cw.getSelection().getRangeAt(0);var cq=tr.cloneRange();tr.collapse(false);tr.insertNode(cw.document.createTextNode("#replace_end_html#"));cq.collapse(true);cq.insertNode(cw.document.createTextNode("#replace_start_html#"));}if(0){var g=cw.document.body;while(g){g=g.firstChild;if(g&&g.nodeType==3){while(g&&g.nodeType==3){if(g.nodeValue.match(/^#replace_start_html#/)){g.nodeValue=g.nodeValue.replace(/^#replace_start_html#/,"");cw.document.body.insertBefore(cw.document.createTextNode("#replace_start_html#"),cw.document.body.firstChild);break;}g=g.nextSibling;}}}var g=cw.document.body;while(g){g=g.lastChild;if(g&&g.nodeType==3){while(g&&g.nodeType==3){if(g.nodeValue.match(/#replace_end_html#$/)){g.nodeValue=g.nodeValue.replace(/#replace_end_html#$/,"");cw.document.body.appendChild(cw.document.createTextNode("#replace_end_html#"));break;}g=g.previousSibling;}}}}var bd=cw.document.body.innerHTML;bd=bd.replace(/#replace_start_html#/,bt);bd=bd.replace(/#replace_end_html#/,bW);cw.document.body.innerHTML=bd;};function bq(col){var f=ac;if(f){if(document.all){G.select();}var R=document.getElementById(f.m).contentWindow.document;aa="#"+col;if(R.queryCommandEnabled('forecolor')){R.execCommand('forecolor',false,"#"+col);}}};function bE(col){var f=ac;if(f){if(document.all){G.select();}var R=document.getElementById(f.m).contentWindow.document;var n=document.all?'backcolor':'hilitecolor';ab="#"+col;if(R.queryCommandEnabled(n)){R.execCommand(n,false,"#"+col);}}};function cG(){var cN=navigator.userAgent.toLowerCase();if(cN.indexOf("gecko")!= -1&&cN.indexOf("khtml")== -1)return true;if(cN.indexOf("msie")!= -1&&cN.indexOf("mac")== -1)return true;return false;};function cU(id){var f=C(id);if(!f.ap|| !f.m)return;if(!f.designMode){document.getElementById(f.m).contentWindow.document.body.innerHTML=document.getElementById(f.ap).value;}return ay(document.getElementById(f.m).contentWindow.document.body);};function cT(id,cp){var f=C(id);if(!f.ap|| !f.m)return;if(!f.designMode){document.getElementById(f.ap).value=cp;}else{document.getElementById(f.m).contentWindow.document.body.innerHTML=cp;}};var aF=400;var aG="border: 1px solid black; background-color: #fffbd9; font-family: arial; font-size: x-small; padding: 5px;";var aH=null;var M=null;var bj=null;var J=null;if(typeof(aD)=='undefined'){if(document.getElementById){var bH=window.onload;window.onload=function(){cD();if(bH){bH();}}}}function citeConfig(width,style,bD){aF=width;aG=style;aH=bD;};function cD(){M=document.createElement("div");M.style.visibility="hidden";document.body.appendChild(M);};function citePrep(dz){bj=dz;if(J){window.clearTimeout(J);J=null;}J=window.setTimeout("cH()",500);};function cH(){J=null;var du=bj.hash.replace(/^#/,'');var g=document.getElementById(du);if(g){var bu="<div ";if(aG){bu+="style='"+aG+"'";}if(aH){bu+="class='"+aH+"'";}bu+=">";M.innerHTML=bu+g.innerHTML+"</div>";var pos=o(bj);M.style.position="absolute";M.style.top=Math.max(pos.top-M.offsetHeight,0)+"px";var cJ=window.innerWidth||document.body.clientWidth;M.style.left=Math.min(pos.left+8,cJ-aF+20)+"px";M.style.width=aF+"px";M.style.visibility="visible";}};function citeRemove(){if(J){window.clearTimeout(J);J=null;}J=window.setTimeout("cI()",500);};function cI(){J=null;M.style.visibility="hidden";};var ae=new Object();function revealShow(X,height){var g=document.getElementById(X);if(!g)return;var di=ae[X];if(!di){ae[X]=new Object();di=ae[X];di.id=X;di.w=0;di.cg=false;}di.al=height;g.style.display="block";if(di.w==0)g.style.height=di.w+"px";g.style.overflow="hidden";window.setTimeout("bl('"+X+"');",500);};function bl(X){var di=ae[X];if(di){if(!di.cg){var cZ=(di.al-di.w)/2;if(di.al>di.w){di.w+=cZ+1;if(di.w>di.al)di.w=di.al;}else{di.w+=cZ-1;if(di.w<0)di.w=0;}var g=document.getElementById(di.id);if(g)g.style.height=di.w+"px";}if(di.w!=di.al)window.setTimeout("bl('"+X+"');",50);else if(di.w>0){g.style.height="";g.style.overflow="visible";}}};function revealHide(X){revealShow(X,0);};function revealPause(X){var di=ae[X];if(di){di.cg=true;var g=document.getElementById(X);if(g){g.style.height="";}}};function revealUnpause(X){var di=ae[X];if(di){di.cg=false;var g=document.getElementById(X);if(g){g.style.height=di.w+"px";}}};var Q=new Array();var t= -1;var B=false;var K=null;function suggestInstall(bT,cK,cr,cb){var g=document.getElementById(bT);if(g){g.onkeyup=function(e){var bz=e?e:event;aR(bz.keyCode);if(bz.keyCode!=40&&bz.keyCode!=38&&bz.keyCode!=13&&bz.keyCode!=9)bF(bz,bT);};g.onkeypress=function(e){var bz=e?e:event;aR(bz.keyCode);if(bz.keyCode==13)return false;else return true;};g.onblur=function(){window.setTimeout('aE();v();',250);};var cL;if(cr){cL=document.getElementById(cr);}var bi=new Object();bi.id=bT;bi.input=g;bi.url=cK;bi.value=cL;bi.complete=cb;bi.cx=new Object();var pos=o(bi.input);bi.width=pos.width>0?pos.width:400;Q.push(bi);}};function aO(id){for(var i=0;i<Q.length;i++){if(Q[i].id==id)break;}if(i<Q.length)return Q[i];return null;};function bF(bz,id){var ag=aO(id);if(ag){if(ag.cx[ag.input.value]){at(ag,ag.cx[ag.input.value]);}else{var url=ag.url+escape(ag.input.value);cf(url,bw,ag);}}};function aR(code){if(code==38){if(t>=0&& !B){B=true;window.setTimeout("as(-1);",150);}}else if(code==40){if(K&&t<K.length&& !B){B=true;window.setTimeout("as(1);",150);}}else if(code==13){if(!B){B=true;window.setTimeout("aE();",150);}}};function as(dw){B=false;t+=dw;if(K){for(var i=0;i<K.length;i++){var g=document.getElementById("SUGGESTDIV"+i);if(g){if(i==t){g.onmouseover();}else{g.onmouseout();}}}}};function aE(){B=false;var g=document.getElementById("SUGGESTDIV"+t);if(g){g.onclick();}};function bw(dj,ag){var cB=dj.getElementsByTagName("item");var H=new Array();for(var i=0;i<cB.length;i++){var text=cB[i].getElementsByTagName("text");var value=cB[i].getElementsByTagName("value");if(text.length>0){var dB=text[0].firstChild.data;var dk;if(value.length>0&&value[0].firstChild)dk=value[0].firstChild.data;else dk="";H.push({text:dB,value:dk});}}var cd=dj.getElementsByTagName("query");if(cd.length>0){var dq;if(cd[0].firstChild)dq=cd[0].firstChild.data;else dq="";ag.cx[dq]=H;}if(H.length>0)at(ag,H);};function at(ag,H){t= -1;K=H;var html="";var height=16;for(var i=0;i<H.length;i++){html+="<div id='SUGGESTDIV"+i+"' onclick=\"window.g_suggestCurrentOption="+i+";bQ('"+ag.id+"', '"+H[i].text+"', '"+H[i].value+"');v();\" ";html+="style=\"height: "+height+"px; overflow='hidden'; ";if(ag.complete&&i==0){html+="background-color: #00e; color: #fff;";}else{html+="background-color: #fff;";}html+="\" onmouseover=\"this.style.backgroundColor='#00e';this.style.color='#fff';\" onmouseout=\"this.style.backgroundColor='#fff';this.style.color='#000';\">";html+=H[i].text+"</div>";}if(ag.complete){t=0;}popShowWindow(ag.id,'bottom',html,ag.width,H.length*height);};function bQ(id,text,value){var ag=aO(id);if(ag){ag.input.value=text;if(ag.value){ag.value.value=value;}t= -1;if(ag.input.onchange){ag.input.onchange();}}};function ad(dy){alert(dy);};function o(g){var offsetLeft=0;var offsetTop=0;var offsetWidth=g.offsetWidth;var offsetHeight=g.offsetHeight;while(g){offsetLeft+=g.offsetLeft;offsetTop+=g.offsetTop;g=g.offsetParent;}if(navigator.userAgent.indexOf("Mac")!= -1&&typeof document.body.leftMargin!="undefined"){offsetLeft+=document.body.leftMargin;offsetTop+=document.body.topMargin;}return{left:offsetLeft,top:offsetTop,width:offsetWidth,height:offsetHeight};};function cf(url,ao,f){var af;if(window.XMLHttpRequest){af=new XMLHttpRequest();}else if(window.ActiveXObject){af=new ActiveXObject("Microsoft.XMLHTTP");}if(af){af.onreadystatechange=function(){bx(af,ao,f);};af.open("GET",url,true);if(window.XMLHttpRequest){af.send(null);}else{af.send();}}};function bx(bZ,ao,f){if(bZ.readyState==4){if(bZ.status==200){ao(bZ.responseXML,f);}}};var bg="";function dg(cp){bg+=cp.replace(/</,"&lt;").replace(/>/,"&gt;")+"<br />";var g=document.getElementById("DEBUG");if(g){g.innerHTML=bg;}};function utilValidateDate(cA,ds){var dc=document.getElementById(cA+"_day");var de=document.getElementById(cA+"_month");var db=document.getElementById(cA+"_year");if(dc&&de&&db){if(ds.value.length==0){dc.value="";de.value="";db.value="";}else{var dv=parseInt(dc.value,10);var dm=parseInt(de.value,10)-1;var dp=parseInt(db.value,10);if(isNaN(dv))dv=1;if(isNaN(dm))dm=0;if(isNaN(dp))dp=2000;var d=new Date(dp,dm,dv);dc.value=d.getDate()>9?d.getDate():"0"+d.getDate();de.value=d.getMonth()>8?(d.getMonth()+1):"0"+(d.getMonth()+1);db.value=d.getFullYear();}}};aD=1; 