function show_menu(a){document.getElementById(a).style.display="block"}function hide_menu(a){document.getElementById(a).style.display="none"}function closemsg(){var a=$find("modalalert");a.hide()}function SetImg(a){document.getElementById("hdnImage").value=a}function SetVideo(a){document.getElementById("hdnVideo").value=a}function onUpdated(){var a=$get("updateProgressDiv");a.style.display="none"}function onUpdating(){var b=$get("updateProgressDiv");b.style.display="";var d=$get("form1"),a=Sys.UI.DomElement.getBounds(d),c=Sys.UI.DomElement.getBounds(b),e=a.x+Math.round(a.width/2)-Math.round(c.width/2),f=a.y+Math.round(a.height/2)-Math.round(c.height/2);Sys.UI.DomElement.setLocation(b,e,300)}function ci(a){var b=document.getElementById(a).className;if(document.getElementById("chkSelect").value!="")document.getElementById(document.getElementById("chkSelect").value).className="";if(b!="active")document.getElementById(a).className="active";else document.getElementById(a).className="";document.getElementById("chkSelect").value=a}function SaveImage(a){document.getElementById("hdnImage").value=a}function ChangeImage(a){if(document.getElementById(a).style.borderStyle==null||document.getElementById(a).style.borderStyle==""){document.getElementById(a).style.borderStyle="solid";document.getElementById(a).style.borderWidth="2px";document.getElementById(a).style.borderColor="red";if(document.getElementById("hdnImage").value==null||document.getElementById("hdnImage").value=="")document.getElementById("hdnImage").value=","+document.getElementById(a).id;else document.getElementById("hdnImage").value=document.getElementById("hdnImage").value+","+document.getElementById(a).id}else{document.getElementById(a).style.borderStyle="";document.getElementById(a).style.borderWidth="";for(var f=document.getElementById("hdnImage").value,c=f.split(","),d="",b=1;b<c.length;b++){var e=document.getElementById(a).id;if(c[b]!=e)d=d+","+c[b];document.getElementById("hdnImage").value=d}}}function tag_text(){if(document.getElementById("txt_Tag").value=="Ingrese las palabras separadas por coma.")document.getElementById("txt_Tag").value=""}function tag_onblur(){if(document.getElementById("txt_Tag").value=="")document.getElementById("txt_Tag").value="Ingrese las palabras separadas por coma."}function answer_text(){if(document.getElementById("txtqesanswer").value=="Escribe tu respuesta aqu� ...")document.getElementById("txtqesanswer").value=""}function answer_onblur(){if(document.getElementById("txtqesanswer").value=="")document.getElementById("txtqesanswer").value="Escribe tu respuesta aqu� ..."}function rpt_show_hide(){if(document.getElementById("q_div_rept").style.display=="none")document.getElementById("q_div_rept").style.display="block";else document.getElementById("q_div_rept").style.display="none"}function show_hide_ans_div(){if(document.getElementById("mydiv").style.display=="none")document.getElementById("mydiv").style.display="block";else document.getElementById("mydiv").style.display="none"}function onUpdated(){var a=$get("updateProgressDiv");a.style.display="none"}function onUpdating(){var b=$get("updateProgressDiv");b.style.display="";var d=$get("form1"),a=Sys.UI.DomElement.getBounds(d),c=Sys.UI.DomElement.getBounds(b),e=a.x+Math.round(a.width/2)-Math.round(c.width/2),f=a.y+Math.round(a.height/2)-Math.round(c.height/2);Sys.UI.DomElement.setLocation(b,e,300)}this.imagePreview=function(){xOffset=90;yOffset=-20;$("a.preview").hover(function(a){this.t=this.title;this.title="";var b=this.t!=""?""+this.t:"";$("body").append("<div id='preview' class='head_tooltip'><span style='white-space:nowrap'><label>"+b+"</label></span></div>");$("#preview").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px").css("z-index",1e3).fadeIn("fast")},function(){this.title=this.t;$("#preview").remove()});$("a.preview").mousemove(function(a){$("#preview").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px")})};$(document).ready(function(){imagePreview()});this.imageTip=function(){xOffset=50;yOffset=-40;$("a.tip").hover(function(a){this.t=this.title;this.title="";var b=this.t!=""?""+this.t:"";$("body").append("<div id='imgtip' class='image_tooltip'><div class='top'></div><div class='body'>"+b+"</div><div class='bot'></div></div>");$("#imgtip").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px").css("z-index",1e3).fadeIn("fast")},function(){this.title=this.t;$("#imgtip").remove()});$("a.tip").mousemove(function(a){$("#imgtip").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px")})};$(document).ready(function(){imageTip()});this.shoppingHelp=function(){xOffset=70;yOffset=-10;$(".shptip").hover(function(a){this.t=this.title;this.title="";var b=this.t!=""?""+this.t:"";$("body").append("<div id='shophlp' class='head_tooltip'><span><label>"+b+"</label></span></div>");$("#shophlp").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px").css("z-index",1e3).fadeIn("fast")},function(){this.title=this.t;$("#shophlp").remove()});$(".shptip").mousemove(function(a){$("#shophlp").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px")})};$(document).ready(function(){shoppingHelp()});function blogtag_text(){if(document.getElementById("txttag").value=="Ingrese las palabras separadas por coma.")document.getElementById("txttag").value=""}function blogtag_onblur(){if(document.getElementById("txttag").value=="")document.getElementById("txttag").value="Ingrese las palabras separadas por coma."}function OpenFrindsmodal(){var a=$find("ModalPopupExtender_flk");a.show();return false}function OpenFrindsmodal1(){var b=$get("radbtn_close_me");if(b.checked==false){showMessage("exclamation","por favor, seleccione la opci�n de la lista de amigos","Completa los datos:");return false}else{var a=$find("ModalPopupExtender_Frnd");a.show()}return true}function blogvalidate(){var a=$get("txttitle");if(a.value==""){showMessage("exclamation","por favor, introduzca t�tulo del blog","Completa los datos:");return false}}function get_treeid(a){var c=a.srcElement||a.target,b=c;alert(b.innerHTML)}function applyFilterforBlog(){var a=getFilter(),b=String.format(pageUrl,getQuerystring("treeid"),getQuerystring("nodeid"));if(a!="")b+="&otherfilters="+a;window.location.href=b}function getFilterforBlog(){var b=$get("cbo_filter1"),c=$get("cbo_filter2"),d=$get("cbo_filter3"),a="";if(b&&b.value){if(a!="")a+=",";a+=b.value}if(c&&c.value){if(a!="")a+=",";a+=c.value}if(d&&d.value){if(a!="")a+=",";a+=d.value}return a}function active(d){for(var c=0;c<10;c++){var b="div"+c,a=document.getElementById(b);if(b==d)if(document.getElementById(b).className=="wikki_accrd")a.className="wikki_accrd_active";else a.className="wikki_accrd";else a.className="wikki_accrd"}}function active_acc(d){for(var c=0;c<10;c++){var b="div"+c,a=document.getElementById(b);if(b==d)if(document.getElementById(b).className=="faqs_box")a.className="faqs_box_active";else a.className="faqs_box";else a.className="faqs_box"}}function active_acc_ter(d){for(var c=0;c<10;c++){var b="div"+c,a=document.getElementById(b);if(b==d)if(document.getElementById(b).className=="ter_box")a.className="ter_box_active";else a.className="ter_box";else a.className="ter_box"}}function active_acc_priv(d){for(var c=0;c<10;c++){var b="div"+c,a=document.getElementById(b);if(b==d)if(document.getElementById(b).className=="priv_box")a.className="priv_box_active";else a.className="priv_box";else a.className="priv_box"}}function wikivalidate(){var b=$get("txt_title"),c=$get("txt_tag"),a=$get("chk_terms");if(b.value==""){showMessage("exclamation","Introduce el t�tulo wiki","Completa los datos:");return false}if(c.value==""){showMessage("exclamation","Por favor, introduzca etiqueta wiki","Completa los datos:");return false}if(a.checked==false){multipleShowMessage("callout=termsConditions");return false}}function OnCommentChangetop(){document.getElementById("ddl_bottom").selectedIndex=document.getElementById("ddl_top").selectedIndex}function OnCommentChangebtm(){document.getElementById("ddl_top").selectedIndex=document.getElementById("ddl_bottom").selectedIndex}function OnChange(){document.getElementById("ddl_bottom").selectedIndex=document.getElementById("ddl_top").selectedIndex}function OnChangebtm(){document.getElementById("ddl_top").selectedIndex=document.getElementById("ddl_bottom").selectedIndex}function ddlChange(b,a){document.getElementById(a).selectedIndex=document.getElementById(b).selectedIndex}function ddlChangebtm(b,a){document.getElementById(b).selectedIndex=document.getElementById(a).selectedIndex}function opencommentmodal(){var a=$find("ext_Modal_comment");a.show();return true}function validateblogcreation(){var d=$get("txttitle").value,b=$get("tv_matters_SelectedNode").value,c=$get("tv_agerange_SelectedNode").value,a=$get("tv_educationallevel_SelectedNode").value;if(d==0){showMessage("exclamation","Escriba el t�tulo del blog","Completa los datos:");return false}if(b==0){showMessage("exclamation","seleccione el tema","Completa los datos:");return false}if(c==0){showMessage("exclamation","seleccionar el nivel de edad","Completa los datos:");return false}if(a==0){showMessage("exclamation","seleccionar el nivel educativo","Completa los datos:");return false}return true}function CheckBlogComment(){var a=$get("txtcomment").value;if(a==0){showMessage("exclamation","comentario no debe estar en blanco","");return}}function transformDate(c){var a=c.split("/"),b=a[1]+"/"+a[0]+"/"+a[2];return b.toString()}function ValidateEventCreation(){try{var k=$get("txttitle").value,f=0,i=$get("ddlstarthour").value,h=$("input[id*='dtstart_textBox']").val(),g=transformDate(h)+" "+i,b,c,a;if(document.getElementById("divendtime").style.display!="none"){b=$("input[id*='dtend_textBox']").val();c=$get("ddlendhour").value;a=transformDate(b)+" "+c}var j=Date.parse(new Date),e=Date.parse(g),d;if(a!=null)var d=Date.parse(a);if(e<j){showMessage("exclamation","La fecha de inicio del evento debe ser mayor a la fecha actual.","Completa los datos:");return false}if(d!=null)if(e>=d){showMessage("exclamation","La fecha de finalizac�n del evento debe ser mayor a la fecha de inicio.","Completa los datos:");return false}if($get("ddlsubject")!=null)f=$get("ddlsubject").value;if(k==0){showMessage("exclamation","Introduzca el t�tulo del evento","Completa los datos:");return false}return true}catch(l){alert(l);showMessage("exclamation","Ups, ha ocurrido un error. Por favor intenta m�s tarde.","Completa los datos:");return false}}function showendtime(){if(document.getElementById("divendtime").style.display=="none")jQuery("#"+document.getElementById("divendtime").id).slideDown("slow");else jQuery("#"+document.getElementById("divendtime").id).slideUp("slow");return false}var oEditor;function insertChar(a){oEditor.InsertHtml(a);var b=document.getElementById("hdnfck");b.value=oEditor.GetXHTML(true)}function over(a){a.className="LightBackground HandIE HandMozilla"}function out(a){a.className="DarkBackground HandIE HandMozilla"}function capitaliseFirstLetter(a){newVal="";a=a.split(" ");for(var b=0;b<a.length;b++)newVal+=a[b].substring(0,1).toUpperCase()+a[b].substring(1,a[b].length)+" ";return newVal}function openNewWin(){var a=$get("txtsearch").value,d=String.format("http://es.wikipedia.org/wiki/{0}",capitaliseFirstLetter(a)),b=$get("rbaulawiki"),c=$get("rbwikipedia");if(b.checked==true)if(a==0){multipleShowMessage("callout=searchNoText");return false}if(c.checked==true){if(a==0){multipleShowMessage("callout=searchNoText");return false}var e=window.open(d,"mynewwin","width=800,height=600,Statusbar=no,scrollbars=yes");return false}return true}function showEventGuestLightBox(a){var c=String.format("/SchoolAgenda/ViewGuest.aspx?eventid={0}",a),b=String.format("<iframe frameborder='no' style='border:none; width:500px; height:200px; overflow:auto' src='{0}'></iframe><div align='right' style='padding-right: 10px'><a href='javascript:void(0);' onclick='$.facebox.close();' class='blg_link_btn fright'>Cerrar</a></div>",c);$.facebox.settings.opacity=.5;$.facebox(b);return false}function clickdiv(c,b){if(document.getElementById("hdnDIv").value!=""){var a=document.getElementById("hdnDIv").value;if(a!=null||a!="")document.getElementById(a).style.display="none"}document.getElementById("hdnDIv").value=b;$("#"+b).toggle();stoppropogationdiv(c)}function closediv(a){document.getElementById(a).style.display="none"}function opentooltip(a){document.getElementById(a).style.display="block"}function deleteevent(a){$get("hdneventid").value=a;document.getElementById("btndelete").click()}function CheckCreditinfo(){var b=$get("txtname").value,a=$get("txtlname").value;if(b==0){showMessage("exclamation","Por favor, introduzca el nombre","");return false}if(a==0){showMessage("exclamation","Por favor, introduzca el apellido","");return false}return true}function CheckShoppingComment(){var a=$get("txtcomment").value;if(a==0){showMessage("exclamation","por favor ingrese su comentario aqu�","");return false}return true}$(document).ready(function(){$(".grp_tab_inf").hide();$(".grp_tab_inf:last").show();$("a.grp_app_btn:last").addClass("grp_app_btn_active");$("a.grp_app_btn").click(function(){$(this).removeClass("grp_app_btn").addClass("grp_app_btn_active");$(this).siblings("a.grp_app_btn_active").removeClass("grp_app_btn_active").addClass("grp_app_btn");$(".grp_tab_inf").hide();var a=$(this).attr("href");$(a).slideDown(500);return false})});function ciphoto(a,b){var c=document.getElementById(a).className;if(c!="active")document.getElementById(a).className="active";else document.getElementById(a).className="";document.getElementById("chkSelect").value=a;document.getElementById("hdnval").value=b}function Createevent(b,a){$get("hdneventtitle").value=document.getElementById(b).value;$get("hdnstarthour").value=a;document.getElementById("btncreateevent").click()}function Createeventinmonth(b,a){$get("hdneventtitle").value=document.getElementById(b).value;$get("hdneventdate").value=a;document.getElementById("btncreateevent").click()}function Createeventinweek(c,a,b){$get("hdneventtitle").value=document.getElementById(c).value;$get("hdneventdate").value=a;$get("hdnstarthour").value=b;document.getElementById("btncreateevent").click()}function detailsevent(a){$get("hdneventid").value=a;document.getElementById("btndetails").click()}function editevent(a){$get("hdneventid").value=a;document.getElementById("btnedit").click()}function openouttertooltip(a){document.getElementById(a).style.display="block"}function openinnertooltip(a,b){document.getElementById(b).style.display="block";if(!a)var a=window.event;a.cancelBubble=true;a.stopPropagation&&a.stopPropagation()}function closeoutterdiv(a,b){document.getElementById(b).style.display="none";if(!a)var a=window.event;a.cancelBubble=true;a.stopPropagation&&a.stopPropagation()}function closeinnerdiv(a,b){document.getElementById(b).style.display="none";if(!a)var a=window.event;a.cancelBubble=true;a.stopPropagation&&a.stopPropagation()}function stoppropogationdiv(a){if(!a)var a=window.event;a.cancelBubble=true;a.stopPropagation&&a.stopPropagation()}function groupcomment_text(){var a=document.getElementById("txtgroupcomment").value;if(document.getElementById("txtgroupcomment").value=="enter your comment here")document.getElementById("txtgroupcomment").value=""}function groupcomment_onblur(){if(document.getElementById("txtgroupcomment").value=="")document.getElementById("txtgroupcomment").value="enter your comment here"}function Checkgroupcomment(){if(document.getElementById("txtgroupcomment").value=="enter your comment here"){showMessage("exclamation","por favor ingrese su comentario","");return false}}function CheckCreateGroup(){var a=$get("txtgroupname").value;if(a==0){showMessage("exclamation","Introduce el t�tulo de grupo","");return false}return true}function CheckCreatearchivos(){var a=$get("txttitle").value,b=$get("fugroup").value;if(a==0){showMessage("exclamation","por favor, indique el t�tulo del archivo","");return false}if(b==0){showMessage("exclamation","por favor, carga de archivos","");return false}return true}function CheckCoursework(){var b=$get("txtfilename").value,a=$get("fucoursework").value;if(b==0){showMessage("exclamation","por favor, indique el t�tulo del archivo","");return false}if(a==0){showMessage("exclamation","por favor, carga de archivos","");return false}return true}function CheckGroupPhoto(){var a=$get("txtalbumname").value;if(a==0){showMessage("exclamation","por favor, indique el nombre del �lbum","");return false}return true}function opencommentdiv(a){if(document.getElementById(a).style.display=="none")document.getElementById(a).style.display="block";else document.getElementById(a).style.display="none"}
