/*
* Copyright © basement.nl, 2011. All rights reserved.
* Op deze code is auteursrecht van toepassing.
*/
var FXmlHttp;var FTextAreaHeight=0;function btnNewClick(){if(confirm("weet je zeker dat je de vragen wilt wissen?")){document.frmMain.list_plain.value="";}document.frmMain.list_plain.focus();}function btnOpenClick(){document.frmMain.action="open.php";document.frmMain.submit();}function btnSaveClick(){var a=document.frmMain.action;document.frmMain.action="action/process_save_to_teach.php";document.frmMain.submit();document.frmMain.action=a;}function btnOpenInWrtsClick(){var a=document.frmMain.action;document.frmMain.action="action/process_save_to_wrts.php";document.frmMain.target="_blank";document.frmMain.submit();document.frmMain.target="_self";document.frmMain.action=a;}function btnHelpClick(){document.frmMain.action="help.php";document.frmMain.submit();}function btnPrintClick(){LWindow=window.open("","LWinPrint","width=600,height=300,scrollbars=1,resizable=1");var a=document.frmMain.action;document.frmMain.action="print.php";document.frmMain.target="LWinPrint";document.frmMain.submit();document.frmMain.target="_self";document.frmMain.action=a;}function btnSymbolClick(){InitSymbolTable();}function btnTestClick(){var a=document.frmMain.list_plain.value;a=a.replace(/^\s*|\s*$/g,"");if(a===""){alert("geen vragen ingevuld.");document.frmMain.list_plain.focus();}else{if(a.indexOf("=")==-1){alert("om de vraag van het antwoord te onderscheiden is het =-teken noodzakelijk.");document.frmMain.list_plain.focus();}else{document.frmMain.submit();}}}function AjaxCallbackVote(b){var a=[];if(b!==""){a=b.split("|");if(parseInt(a[1],10)<3){$("idVote").innerHTML="nog niet genoeg stemmen voor waardering";}else{$("idVote").innerHTML="waardering "+a[2]+" (aantal stemmen: "+a[1]+")";}$("idVoteResult").innerHTML=a[0];}}function btnVoteClick(b,a){AjaxRequest("action/process_vote.php?chapter="+encodeURIComponent(b)+"&vote="+encodeURIComponent(a),null,AjaxCallbackVote);}function btnUpdateClick(){if(confirm("de wijzigingen opslaan?")){document.frmMain.action="action/process_list_update.php";document.frmMain.submit();}}function btnDeleteClick(){if(confirm("deze lijst verwijderen?")){document.frmMain.action="action/process_list_delete.php";document.frmMain.submit();}}function btnEnlargeListClick(){if(FTextAreaHeight===0){FTextAreaHeight=400;}else{FTextAreaHeight+=100;}document.frmMain.list_plain.style.height=FTextAreaHeight+"px";}function EditableContentClick(e,f,c,d,b){var a="";$(f).onclick=null;$(f).className="";if(e===false){a=$(f).innerHTML;}if(d=="input"){$(f).innerHTML='<input class="'+b+'" name="'+c+'" value="'+a+'" size="100" maxlength="100" type="text">';}else{$(f).innerHTML='<textarea class="'+b+'" name="'+c+'">'+a+"</textarea>";}document.getElementsByName(c)[0].select();document.getElementsByName(c)[0].focus();}function AjaxCallbackAddFavorite(a){$("idFavorite").innerHTML='<a class="ico_favorite_undo" href="javascript:btnRemoveFavoriteClick('+a+');" title="verwijder deze lijst uit je favorieten">&nbsp;</a>';alert("deze lijst is toegevoegd aan je favorieten.");}function AjaxCallbackRemoveFavorite(a){$("idFavorite").innerHTML='<a class="ico_favorite" href="javascript:btnAddFavoriteClick('+a+');" title="markeer als favoriet">&nbsp;</a>';alert("deze lijst is uit je favorieten verwijderd.");}function btnAddFavoriteClick(a){AjaxRequest("action/process_favorite.php?chapter="+encodeURIComponent(a)+"&add=Y",null,AjaxCallbackAddFavorite);}function btnRemoveFavoriteClick(a){AjaxRequest("action/process_favorite.php?chapter="+encodeURIComponent(a)+"&add=N",null,AjaxCallbackRemoveFavorite);}function btnEmbedClick(a){$("idEmbed").innerHTML='<br><br><input type="text" name="edPermalink" value="http://www.woordjesleren.nl/questions.php?chapter='+a+'" onClick="javascript:this.focus();this.select();" readonly="readonly"> link voor e-mail / website<br><input type="text" name="edPermalinkTest" value="http://www.woordjesleren.nl/test.php?style=embed&amp;id='+a+'" onClick="javascript:this.focus();this.select();" readonly="readonly"> link naar overhoring, zonder bewerk/reactiemogelijkheid (elo)<br><br><a href="http://twitter.com/?status=oefenen%20http%3A%2F%2Fwww.woordjesleren.nl%2Fquestions.php%3Fchapter%3D'+a+'%0D%23teach2000%20%23woordjesleren" target="_blank">twitter</a> <a href="http://www.hyves.nl/hyvesconnect/smartbutton/?type=9&title=doe%20deze%20oefening%20op%20woordjesleren.nl&body=link%20www.woordjesleren.nl%2Fquestions.php%3Fchapter%3D'+a+'" target="_blank">hyves</a><br><br>';}
