/* JSCmprsd Hash:eb558225cbd4f3648b2a80e2f435ed01 */
var cp=new cpaint();cp.set_transfer_mode("post");cp.set_response_type("text");var currObj;var spellingSuggestionsDiv=null;function get_id(A){if(document.getElementById){return document.getElementById(A)}else{return document.all[A]}}if(document.onclick){var old_onclick=document.onclick;document.onclick=function(A){checkClickLocation(A);old_onclick(A)}}else{document.onclick=checkClickLocation}if(window.onload){var old_onload=window.onload;window.onload=function(A){setupSpellCheckers(A);old_onload(A)}}else{window.onload=setupSpellCheckers}function setupSpellCheckers(){var textareas=document.getElementsByTagName("textarea");var numSpellCheckers=0;var tempSpellCheckers=Array();for(var i=0;i<textareas.length;i++){if(textareas[i].getAttribute("title")=="spellcheck"||textareas[i].getAttribute("title")=="spellcheck_icons"){tempSpellCheckers[numSpellCheckers]=textareas[i];var tempWidth=tempSpellCheckers[numSpellCheckers].offsetWidth+"px";var tempHeight=tempSpellCheckers[numSpellCheckers].offsetHeight+"px";eval("spellCheckers"+numSpellCheckers+'= new activeSpell("spellCheckers'+numSpellCheckers+'", tempWidth, tempHeight, tempSpellCheckers['+numSpellCheckers+'].getAttribute("accesskey"), "spellCheckDiv'+numSpellCheckers+'", tempSpellCheckers['+numSpellCheckers+'].getAttribute("name"), tempSpellCheckers['+numSpellCheckers+"].id, tempSpellCheckers["+numSpellCheckers+"].title, tempSpellCheckers["+numSpellCheckers+"].value, true);");numSpellCheckers++}}}function activeSpell(C,J,A,H,I,G,B,E,F,D){currObj=this;currObj.config=new Array();currObj.config.varName=C;currObj.config.width=J;currObj.config.height=A;currObj.config.spellUrl=H;currObj.config.divId=I;currObj.config.name=G;currObj.config.id=B;currObj.config.title=E;currObj.config.value=F;currObj.misspellingsCount=0;if(D){currObj.config.hidecheck=D}else{currObj.config.hidecheck=false}currObj.config.imagePath=H.substring(0,H.lastIndexOf("/")+1);currObj.config.value=currObj.config.value.replace(/<br *\/?>/gi,"\n");currObj.config.useIcons=false;if(currObj.config.title=="spellcheck_icons"){currObj.config.useIcons=true}spellContainer=document.createElement("DIV");spellContainer.id=currObj.config.divId;spellContainer.className="spell_container";spellContainer.style.width=currObj.config.width;oldElement=document.getElementById(currObj.config.id);oldElement.parentNode.replaceChild(spellContainer,oldElement);currObj.controlPanelDiv=document.createElement("DIV");currObj.controlPanelDiv.className="control_panel";document.getElementById(currObj.config.divId).appendChild(currObj.controlPanelDiv);currObj.statusSpan=document.createElement("SPAN");currObj.statusSpan.className="status";currObj.statusSpan.id="status";currObj.statusSpan.innerHTML="";currObj.controlPanelDiv.appendChild(currObj.statusSpan);currObj.actionSpan=document.createElement("SPAN");currObj.actionSpan.className="action";currObj.actionSpan.id="action";if(currObj.config.useIcons){currObj.actionSpan.innerHTML='<a class="check_spelling" onclick="setCurrentObject('+currObj.config.varName+"); "+currObj.config.varName+'.spellCheck();"><img src="'+currObj.config.imagePath+'images/spellcheck.png" width="16" height="16" title="Check Spelling &amp; Preview" alt="Check Spelling &amp; Preview" border="0" /></a>'}else{if(!currObj.config.hidecheck){currObj.actionSpan.innerHTML='<a class="check_spelling" onclick="setCurrentObject('+currObj.config.varName+"); "+currObj.config.varName+'.spellCheck();">Check Spelling</a>'}}currObj.controlPanelDiv.appendChild(currObj.actionSpan);oldElement.value=currObj.config.value;document.getElementById(currObj.config.divId).appendChild(oldElement);currObj.objToCheck=document.getElementById(currObj.config.id);currObj.spellingResultsDiv=null;activeSpell.prototype.spellCheck=spellCheck;activeSpell.prototype.spellCheck_cb=spellCheck_cb;activeSpell.prototype.showSuggestions=showSuggestions;activeSpell.prototype.showSuggestions_cb=showSuggestions_cb;activeSpell.prototype.replaceWord=replaceWord;activeSpell.prototype.switchText=switchText;activeSpell.prototype.switchText_cb=switchText_cb;activeSpell.prototype.resumeEditing=resumeEditing;activeSpell.prototype.resetSpellChecker=resetSpellChecker;activeSpell.prototype.resetAction=resetAction}function setCurrentObject(A){currObj=A}function spellCheck_cb(new_data){with(currObj){}new_data=new_data.toString();currObj.misspellingsCount=new_data.substring(0,new_data.indexOf("|||||"));var isThereAMisspelling;new_data=new_data.substring(new_data.indexOf("|||||")+5);if(!currObj.spellingResultsDiv){currObj.spellingResultsDiv=document.createElement("DIV");currObj.spellingResultsDiv.className="edit_box";currObj.spellingResultsDiv.style.width=currObj.objToCheck.style.width}if($E("#"+currObj.config.divId+" textarea").getSize().y!=0){currObj.spellingResultsDiv.style.height=$E("#"+currObj.config.divId+" textarea").getSize().y+"px"}currObj.spellingResultsDiv.innerHTML=new_data;currObj.objToCheck.style.display="none";currObj.objToCheck.parentNode.insertBefore(currObj.spellingResultsDiv,currObj.objToCheck);var editbox=$E(".edit_box");var sizes=editbox.getSize();var scrollsizes=editbox.getScrollSize();var newsize=scrollsizes.y;if(newsize<sizes.y){newsize=sizes.y}editbox.setStyle("height",newsize);currObj.statusSpan.innerHTML="";if(currObj.config.useIcons){currObj.actionSpan.innerHTML='<a class="resume_editing" onclick="resetContinueButton();setCurrentObject('+currObj.config.varName+"); "+currObj.config.varName+'.resumeEditing();"><img src="'+currObj.config.imagePath+'images/page_white_edit.png" width="16" height="16" title="Resume Editing" alt="Resume Editing" border="0" /></a>'}else{currObj.actionSpan.innerHTML='<a class="resume_editing" onclick="resetContinueButton();setCurrentObject('+currObj.config.varName+"); "+currObj.config.varName+'.resumeEditing();">Resume Editing</a>'}if(currObj.misspellingsCount=="0"){isThereAMisspelling="0";if(currObj.config.useIcons){currObj.statusSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/accept.png" width="16" height="16" title="No Misspellings Found" alt="No Misspellings Found" border="0" />'}else{currObj.statusSpan.innerHTML="No Misspellings Found"}currObj.objToCheck.disabled=false}else{isThereAMisspelling="1";if(currObj.config.useIcons){currObj.statusSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/accept.png" width="16" height="16" title="'+currObj.misspellingsCount+' Misspellings Found" alt="'+currObj.misspellingsCount+' Misspellings Found" border="0" />'}else{currObj.statusSpan.innerHTML=currObj.misspellingsCount+" Misspellings Found"}currObj.objToCheck.disabled=false}}function spellCheck(){with(currObj){}var query;if(currObj.spellingResultsDiv){currObj.spellingResultsDiv.parentNode.removeChild(currObj.spellingResultsDiv);currObj.spellingResultsDiv=null}if(currObj.config.useIcons){currObj.actionSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/spellcheck.png" width="16" height="16" title="Check Spelling" alt="Check Spelling" border="0" />'}else{currObj.actionSpan.innerHTML='<a class="check_spelling">Check Spelling</a>'}if(currObj.config.useIcons){currObj.statusSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/working.gif" width="16" height="16" title="Checking..." alt="Checking..." border="0" />'}else{currObj.statusSpan.innerHTML="Checking..."}query=currObj.objToCheck.value;query=query.replace(/\r?\n/gi,"<br />");cp.call(currObj.config.spellUrl,"spellCheck",spellCheck_cb,query,currObj.config.varName)}function addWord(id){var wordToAdd=document.getElementById(id).innerHTML;with(currObj){}if(spellingSuggestionsDiv){spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);spellingSuggestionsDiv=null}if(currObj.config.useIcons){currObj.statusSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/working.gif" width="16" height="16" title="Adding Word..." alt="Adding Word..." border="0" />'}else{currObj.statusSpan.innerHTML="Adding Word..."}cp.call(currObj.config.spellUrl,"addWord",addWord_cb,wordToAdd)}function addWord_cb(returnedData){alert(returnedData);with(currObj){}currObj.statusSpan.innerHTML="";resumeEditing();spellCheck()}function checkClickLocation(B){if(spellingSuggestionsDiv){if(spellingSuggestionsDiv.ignoreNextClick){spellingSuggestionsDiv.ignoreNextClick=false}else{var A=getTarget(B);if(A!=spellingSuggestionsDiv){spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);spellingSuggestionsDiv=null}}}return true}function getTarget(B){var A;if(checkBrowser()=="ie"){A=window.event.srcElement}else{A=B.target}return A}function checkBrowser(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("msie")!=-1){if(A.indexOf("opera")!=-1){return"opera"}else{return"ie"}}else{if(A.indexOf("netscape")!=-1){return"netscape"}else{if(A.indexOf("firefox")!=-1){return"firefox"}else{if(A.indexOf("mozilla/5.0")!=-1){return"mozilla"}else{if(A.indexOf("/")!=-1){if(A.substr(0,A.indexOf("/"))!="mozilla"){return navigator.userAgent.substr(0,A.indexOf("/"))}else{return"netscape"}}else{if(A.indexOf(" ")!=-1){return navigator.userAgent.substr(0,A.indexOf(" "))}else{return navigator.userAgent}}}}}}}function showSuggestions_cb(new_data){with(currObj){}spellingSuggestionsDiv.innerHTML=new_data;spellingSuggestionsDiv.style.display="block";currObj.statusSpan.innerHTML=""}function showSuggestions(word,id){with(currObj){}if(currObj.config.useIcons){currObj.statusSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/working.gif" width="16" height="16" title="Searching..." alt="Searching..." border="0" />'}else{currObj.statusSpan.innerHTML="Searching..."}var x=findPosXById(id);var y=findPosYById(id);var scrollPos=0;if(checkBrowser()!="ie"){scrollPos=currObj.spellingResultsDiv.scrollTop}if(spellingSuggestionsDiv){spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv)}spellingSuggestionsDiv=document.createElement("DIV");spellingSuggestionsDiv.style.display="none";spellingSuggestionsDiv.className="suggestion_box";spellingSuggestionsDiv.style.position="absolute";spellingSuggestionsDiv.style.left=x+"px";spellingSuggestionsDiv.style.top=(y+16-scrollPos)+"px";spellingSuggestionsDiv.ignoreNextClick=true;document.body.appendChild(spellingSuggestionsDiv);cp.call(currObj.config.spellUrl,"showSuggestions",showSuggestions_cb,word,id)}function replaceWord(B,A){document.getElementById(B).innerHTML=trim(A);if(spellingSuggestionsDiv){spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);spellingSuggestionsDiv=null}document.getElementById(B).className="corrected_word"}function switchText(){with(currObj){}var text=currObj.spellingResultsDiv.innerHTML;text=text.replace(/<br *\/?>/gi,"~~~");text="*"+text;cp.call(currObj.config.spellUrl,"switchText",switchText_cb,text)}function switchText_cb(new_string){with(currObj){}new_string=new_string.replace(/~~~/gi,"\n");new_string=new_string.substr(1);currObj.objToCheck.style.display="none";currObj.objToCheck.value=new_string;currObj.objToCheck.disabled=false;if(currObj.spellingResultsDiv){currObj.spellingResultsDiv.parentNode.removeChild(currObj.spellingResultsDiv);currObj.spellingResultsDiv=null}currObj.objToCheck.style.display="block";currObj.resetAction()}function resumeEditing(){with(currObj){}if(currObj.config.useIcons){currObj.actionSpan.innerHTML='<a class="resume_editing"><img src="'+currObj.config.imagePath+'images/page_white_edit.png" width="16" height="16" title="Resume Editing" alt="Resume Editing" border="0" /></a>'}else{currObj.actionSpan.innerHTML='<a class="resume_editing">Resume Editing</a>'}if(currObj.config.useIcons){currObj.statusSpan.innerHTML='<img src="'+currObj.config.imagePath+'images/working.gif" width="16" height="16" title="Working..." alt="Working..." border="0" />'}else{currObj.statusSpan.innerHTML="Working..."}if(spellingSuggestionsDiv){spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);spellingSuggestionsDiv=null}currObj.switchText()}function resetAction(){with(currObj){}if(currObj.config.useIcons){currObj.actionSpan.innerHTML='<a class="check_spelling" onclick="setCurrentObject('+currObj.config.varName+"); "+currObj.config.varName+'.spellCheck();"><img src="'+currObj.config.imagePath+'images/spellcheck.png" width="16" height="16" title="Check Spelling &amp; Preview" alt="Check Spelling &amp; Preview" border="0" /></a>'}else{if(currObj.config.hidecheck){currObj.actionSpan.innerHTML=""}else{currObj.actionSpan.innerHTML='<a class="check_spelling" onclick="setCurrentObject('+currObj.config.varName+"); "+currObj.config.varName+'.spellCheck();">Check Spelling &amp; Preview</a>'}}currObj.statusSpan.innerHTML=""}function resetSpellChecker(){with(currObj){}currObj.resetAction();currObj.objToCheck.value="";currObj.objToCheck.style.display="block";currObj.objToCheck.disabled=false;if(currObj.spellingResultsDiv){currObj.spellingResultsDiv.parentNode.removeChild(currObj.spellingResultsDiv);currObj.spellingResultsDiv=null}if(spellingSuggestionsDiv){spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);spellingSuggestionsDiv=null}currObj.statusSpan.style.display="none"}function findPosXById(A){var C=0;var B=document.getElementById(A);if(B.offsetParent){while(B.offsetParent){C+=B.offsetLeft-B.scrollLeft;B=B.offsetParent}}else{if(B.x){C+=B.x}}return C}function findPosYById(A){var B=0;var B=0;var C=document.getElementById(A);if(C.offsetParent){while(C.offsetParent){B+=C.offsetTop-C.scrollTop;C=C.offsetParent}}else{if(C.y){B+=C.y}}return B}function trim(A){while(A.substring(0,1)==" "){A=A.substring(1,A.length)}while(A.substring(A.length-1,A.length)==" "){A=A.substring(0,A.length-1)}return A};