function newXMLHttpRequest(){var C=false;if(window.XMLHttpRequest){C=new XMLHttpRequest();}else{if(window.ActiveXObject){try{C=new ActiveXObject("Msxml2.XMLHTTP");}catch(B){try{C=new ActiveXObject("Microsoft.XMLHTTP");}catch(A){}}}}return C;}function getReadyStateHandler(B,A){return function(){if(B.readyState==4){if(B.status==200){A(B.responseXML);
}else{}}};}function getReadyStateHandlerText(B,A){return function(){if(B.readyState==4){if(B.status==200){A(B.responseText);}else{}}};}function getReadyStateHandler2(B,A){return function(){if(B.readyState==4){if(B.status==200){A(B.responseText);}else{}}};}function getNewsChannels(D){var B=newXMLHttpRequest();
var C=getReadyStateHandler(B,loadNewsChannels);B.onreadystatechange=C;B.open("POST","/mattcontrol/news/ajaxFeeds.jsp",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="cmd=channels&language="+D;B.send(A);}function loadNewsChannels(J){var H=document.getElementById("chSelect");
H.innerHTML="";var C=J.getElementsByTagName("channels")[0];var D=C.getElementsByTagName("channel");var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;
var F=document.createElement("option");F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");I.innerHTML="";var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));
I.appendChild(K);}catch(G){}}function getNewsSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();var F=getReadyStateHandler(E,loadNewsSubChannels);E.onreadystatechange=F;E.open("POST","/mattcontrol/news/ajaxFeeds.jsp",true);E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var C="cmd=subchannels&channel="+D;
E.send(C);}else{var B=document.getElementById("schSelect");B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));B.appendChild(A);}}function loadNewsSubChannels(H){var I=document.getElementById("schSelect");I.innerHTML="";
var B=H.getElementsByTagName("subchannels")[0];var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;
var F=document.createElement("option");F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function getEditorialChannels(D){var B=newXMLHttpRequest();var C=getReadyStateHandler(B,loadEditorialChannels);B.onreadystatechange=C;B.open("POST","/mattcontrol/editorial/ajaxFeeds.jsp",true);
B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="cmd=channels&language="+D;B.send(A);}function loadEditorialChannels(J){var H=document.getElementById("chSelect");H.innerHTML="";var C=J.getElementsByTagName("channels")[0];var D=C.getElementsByTagName("channel");var K=document.createElement("option");
K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");
I.innerHTML="";var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(K);}catch(G){}}function getEditorialSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();var F=getReadyStateHandler(E,loadEditorialSubChannels);E.onreadystatechange=F;
E.open("POST","/mattcontrol/editorial/ajaxFeeds.jsp",true);E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var C="cmd=subchannels&channel="+D;E.send(C);}else{var B=document.getElementById("schSelect");B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));
B.appendChild(A);}}function loadEditorialSubChannels(H){var I=document.getElementById("schSelect");I.innerHTML="";var B=H.getElementsByTagName("subchannels")[0];var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));
I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function getImmigrationHighLightsChannels(D){var B=newXMLHttpRequest();
var C=getReadyStateHandler(B,loadImmigrationHighLightsChannels);B.onreadystatechange=C;B.open("POST","/mattcontrol/immigrationhighlights/ajaxFeeds.jsp",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="cmd=channels&language="+D;B.send(A);}function loadImmigrationHighLightsChannels(J){var H=document.getElementById("chSelect");
H.innerHTML="";var C=J.getElementsByTagName("channels")[0];var D=C.getElementsByTagName("channel");var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;
var F=document.createElement("option");F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");I.innerHTML="";var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));
I.appendChild(K);}catch(G){}}function getImmigrationHighLightsSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();var F=getReadyStateHandler(E,loadImmigrationHighLightsSubChannels);E.onreadystatechange=F;E.open("POST","/mattcontrol/immigrationhighlights/ajaxFeeds.jsp",true);E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
var C="cmd=subchannels&channel="+D;E.send(C);}else{var B=document.getElementById("schSelect");B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));B.appendChild(A);}}function loadImmigrationHighLightsSubChannels(H){var I=document.getElementById("schSelect");
I.innerHTML="";var B=H.getElementsByTagName("subchannels")[0];var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");
var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function getVideoChannels(E){var D=E.options[E.selectedIndex].value;var B=newXMLHttpRequest();var C=getReadyStateHandler(B,setVideoChannels);B.onreadystatechange=C;
B.open("POST","/actions/getVideoChannels",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="language="+D;B.send(A);}function setVideoChannels(C){var J=document.getElementById("videochannel");J.innerHTML="";var F=C.getElementsByTagName("videochannels")[0];var I=F.getElementsByTagName("channel");
var H=document.createElement("option");H.value="";H.appendChild(document.createTextNode("  --------------- "));J.appendChild(H);for(var D=0;D<I.length;D++){try{var A=I[D].getAttribute("name");var B=I[D].getAttribute("code");var E=document.createElement("option");E.value=B;E.appendChild(document.createTextNode(A));
J.appendChild(E);}catch(G){}}}function SelectNewCountry(D){if(D!=-1){show("tr_state");var B=newXMLHttpRequest();var C=getReadyStateHandler(B,catchAddStateResult);B.onreadystatechange=C;B.open("POST","/action/LocationService",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
var A="op=0&country="+D;B.send(A);}else{hidden("tr_state");clear("m_state");}}function catchAddStateResult(A){var D=A.getElementsByTagName("country")[0];var K=document.getElementById("m_state");if(!K){var F=document.getElementById("tr_state");F.innerHTML=F.innerHTML+'<select name="state" id="m_state" ></select>';
K=document.getElementById("m_state");}K.innerHTML="";var E=D.getElementsByTagName("states");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" no estoy seguro / im not sure "));K.appendChild(J);for(var G=0;G<E.length;G++){try{var B=E[G].getElementsByTagName("name")[0].firstChild.nodeValue;
var C=E[G].getElementsByTagName("code")[0].firstChild.nodeValue;var H=document.createElement("option");H.value=C;H.appendChild(document.createTextNode(B));K.appendChild(H);}catch(I){}}}function hidden(B){try{var A=document.getElementById(B);A.style.display="none";}catch(C){}}function show(B){try{var A=document.getElementById(B);
A.style.display="";}catch(C){}}function clear(B){try{var A=document.getElementById(B);A.innerHTML="";}catch(C){}}function HideCombo(B){var A=document.getElementById(B);var C=document.getElementById("tr"+B);A.innerHTML="";C.style.display="none";}function ShowCombo(B){var A=document.getElementById(B);var C=document.getElementById("tr"+B);
A.innerHTML="";if(A.value!=null){A.value="";}C.style.display="";}function selectStateAMM(C){if(C!="-1"){var B=newXMLHttpRequest();var D=getReadyStateHandler(B,setStateAMM);B.onreadystatechange=D;B.open("POST","/action/LocationService",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
var A="op=0&country="+C;B.send(A);ShowCombo("state");}else{HideCombo("state");HideCombo("city");}}function setStateAMM(G){var D=G.getElementsByTagName("country")[0];var I=document.getElementById("state");I.innerHTML="";var A=D.getElementsByTagName("states");for(var E=0;E<A.length;E++){try{var B=A[E].getElementsByTagName("name")[0].firstChild.nodeValue;
var C=A[E].getElementsByTagName("code")[0].firstChild.nodeValue;var F=document.createElement("option");F.value=C;F.appendChild(document.createTextNode(B));I.appendChild(F);}catch(H){}}selectCityAMM(I.options[I.selectedIndex].value);}function selectCityAMM(B){var C=newXMLHttpRequest();var D=getReadyStateHandler(C,setCitiesAMM);
C.onreadystatechange=D;C.open("POST","/action/LocationService",true);C.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="op=1&state="+B;C.send(A);ShowCombo("city");}function setCitiesAMM(D){var A=D.getElementsByTagName("state")[0];var E=document.getElementById("city");E.innerHTML="";
var I=A.getElementsByTagName("city");for(var F=0;F<I.length;F++){try{var B=I[F].getElementsByTagName("name")[0].firstChild.nodeValue;var C=I[F].getElementsByTagName("code")[0].firstChild.nodeValue;var G=document.createElement("option");G.value=C;G.appendChild(document.createTextNode(B));E.appendChild(G);
}catch(H){}}var B="Other / Otro";var C="other";var G=document.createElement("option");G.value=C;G.appendChild(document.createTextNode(B));E.appendChild(G);}function pollVote(E,C){actualObj=C;actualObj.innerHTML="<img src='http://static.matt.org/img/global/progress.gif'>";var B=newXMLHttpRequest();var D=getReadyStateHandler(B,catchPollVotes);
B.onreadystatechange=D;B.open("POST","/actions/sendPollVote",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="answer="+E;B.send(A);}function catchPollVotes(B){var A=B.getElementsByTagName("result")[0];var F=B.getElementsByTagName("totalvotes")[0];F=F.firstChild.nodeValue;
var E="";if(A.firstChild.nodeValue=="true"){var H=B.getElementsByTagName("title")[0].firstChild.nodeValue;E+="<table border='0'><tbody><tr><td align='justify'>"+H+"</td></tr>";E+="<tr><td id='chartb' align='center'><table border='0' cellpadding='0' cellspacing='0' width='100%'><tbody>";var G=B.getElementsByTagName("answers")[0];
for(i=0;i<G.getElementsByTagName("answer").length;i++){var D=G.getElementsByTagName("answer")[i];var C=((parseInt(D.getAttribute("clicks"))/parseInt(F))*100);E+="<tr><td align='left' valign='bottom'>"+D.firstChild.nodeValue+"<br>";E+="<div style='float:left;width:"+C.toFixed(0)+"px;height:15px;margin-right:10px;margin-top:5px;background-color:"+D.getAttribute("color")+"'>&nbsp;</div>";
E+="<span class='percent'>"+C.toFixed(0)+"%</span>";}E+="</tr></tbody></table></td></tr></tbody></table>";actualObj.innerHTML="<table align='center' width='100%'><tr><td>"+E+"</td></tr></table>";}else{alert("ERROR");}}function massivepollVote(E,C){actualObj=C;actualObj.innerHTML="<img src='http://static.matt.org/img/global/progress.gif'>";
var B=newXMLHttpRequest();var D=getReadyStateHandler(B,massivecatchPollVotes);B.onreadystatechange=D;B.open("POST","/actions/sendPollVote",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="answer="+E;B.send(A);}function massivecatchPollVotes(B){var A=B.getElementsByTagName("result")[0];
var F=B.getElementsByTagName("totalvotes")[0];F=F.firstChild.nodeValue;var E="";if(A.firstChild.nodeValue=="true"){var H=B.getElementsByTagName("title")[0].firstChild.nodeValue;E+="<table width='100%' border='0'><tr><td> <strong>"+H+" </strong><br /><br />";var G=B.getElementsByTagName("answers")[0];
for(i=0;i<G.getElementsByTagName("answer").length;i++){var D=G.getElementsByTagName("answer")[i];var C=((parseInt(D.getAttribute("clicks"))/parseInt(F))*100);E+="<br >"+D.firstChild.nodeValue+"<div style='float:left;width:"+C.toFixed(0)+"px;height:15px;background-color:"+D.getAttribute("color")+";margin-right:5px;margin-top:5px'></div>";
E+="<div style='margin-top:5px;border: 0px #000 solid;'>"+C.toFixed(0)+"%</div><br />";}E+="</td></tr></table>";actualObj.innerHTML=E;}else{alert("ERROR");}}function TrimString(A){A=A.replace(/^\s+/g,"");return A.replace(/\s+$/g,"");}function DeleteImage(C,A){var D=newXMLHttpRequest();var E=getReadyStateHandler(D,getDeleteImage);
D.onreadystatechange=E;D.open("POST","/mattcontrol/actions/deletemartmattimage",true);D.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var B="foldername="+C+"&imagename="+A;D.send(B);}function getDeleteImage(B){var A=B.getElementsByTagName("result")[0];if(A.firstChild.nodeValue=="true"){var E=A.getAttribute("id");
var D=document.getElementById("div"+E);var C=document.getElementById("del"+E);D.innerHTML="";C.innerHTML="";}}function reloadSecurityCodeImage(){oElement=document.getElementById("captcha_id");if(oElement){oElement.src="/jcaptcha?"+(new Date()).getTime();}return;}function loadExtraBlogCommentValues(){oElement=document.getElementById("email_pos_input_id");
if(oElement){setCommentEmail(oElement.value);}oElement=document.getElementById("name_pos_input_id");if(oElement){setCommentName(oElement.value);}oElement=document.getElementById("sec_cod_input_id");if(oElement){setCommentSecurityCode(oElement.value);}oElement=document.getElementById("zip_pos_input_id");
if(oElement){setCommentZipCode(oElement.value);}oElement=document.getElementById("country_pos_input_id");if(oElement){setCommentCountry(oElement.value);}oElement=document.getElementById("newsletter_id_input");if(oElement){setCommentWantAlert(oElement.checked);}}var m_sCommentEmail="";function setCommentEmail(A){m_sCommentEmail=A;
}var m_sCommentName="";function setCommentName(A){m_sCommentName=A;}var m_sCommentSecurityCode="";function setCommentSecurityCode(A){m_sCommentSecurityCode=A;}var m_sCommentCountry="";function setCommentCountry(A){m_sCommentCountry=A;}var m_sCommentZipCode="";function setCommentZipCode(A){m_sCommentZipCode=A;
}var m_bCommentWantAlert=false;function setCommentWantAlert(A){m_bCommentWantAlert=A;}function showError(A){oElement=document.getElementById(A);if(oElement){oElement.style.color="red";}}function hiddeError(A){oElement=document.getElementById(A);if(oElement){oElement.style.color="black";}}var m_sLanguage="es_US";
function addComment(B,E,G,I,J){hiddeError("comment_pos_id");hiddeError("name_pos_id");hiddeError("email_pos_id");hiddeError("sec_cod_id");hiddeError("country_pos_id");hiddeError("zip_pos_id_label");m_sLanguage=J;actualObj=E;actualId=B;actualOption=G;divs=E.parentNode.getElementsByTagName("DIV");var H=newXMLHttpRequest();
var C=getReadyStateHandler(H,catchComment);H.onreadystatechange=C;H.open("POST","/actions/AddComment",true);H.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="id="+B+"&option="+G+"&comment="+escape(I)+"&name="+m_sCommentName+"&email="+m_sCommentEmail+"&code="+m_sCommentSecurityCode+"&country="+m_sCommentCountry+"&zipcode="+m_sCommentZipCode+"&wantalerts="+m_bCommentWantAlert;
H.send(A);setEditorValue("commenttext","");var D=document.getElementById(m_numTotalComments+"_comment");var F=m_numTotalComments;if(10<m_numTotalComments){F=m_numTotalComments%10;}D=document.getElementById(F+"_comment");if(D){D.scrollIntoView();}m_numTotalComments++;}function refreshComments(){var B="";
try{B=document.getElementById("TISeo").value;}catch(D){B="";}var C=newXMLHttpRequest();var E=getReadyStateHandler2(C,insertComments);C.onreadystatechange=E;C.open("POST","/inc/comments.jsp",true);C.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="seourl="+B+"&id="+actualId+"&option="+actualOption+"&lastpage";
if(10<m_numTotalComments){A="seourl="+B+"&id="+actualId+"&option="+actualOption+"&p="+(Math.floor((m_numTotalComments-1)/10))+"&lastpage";}C.send(A);}function insertComments(B){var A=document.getElementById("contentComments");A.innerHTML=B;}function catchComment(B){var C="Your Comment has been sent successfully";
var E=B.getElementsByTagName("comments")[0];var A=E.getAttribute("status");var D=E.nodeValue;if(A==-1){window.location="/signin/";}else{if(A==0){refreshComments();if("es_MX"==m_sLanguage){C="Tu comentario se ha enviado correctamente";}}else{if("en_US"==m_sLanguage){C="Your comment has problem.";}else{C="Tu comentario tiene problema.";
}C+="<br/>";if((A&1)==1){showError("comment_pos_id");if("en_US"==m_sLanguage){C+="You can't publish a blank comment.";}else{C+="No puede publicar comentarios vacios.";}C+="<br/>";}if((A&4)==4){showError("name_pos_id");if("en_US"==m_sLanguage){C+="Your must write a valid name.";}else{C+="Debe de ingresar un nombre valido.";
}C+="<br/>";}if((A&8)==8){showError("email_pos_id");if("en_US"==m_sLanguage){C+="Your must write a valid email.";}else{C+="Debe de ingresar un correo valido.";}C+="<br/>";}if((A&16)==16){showError("sec_cod_id");if("en_US"==m_sLanguage){C+="Your must write a valid captcha.";}else{C+="Debe de ingresar un codigo valido.";
}C+="<br/>";}if((A&32)==32){showError("sec_cod_id");if("en_US"==m_sLanguage){C+="Captcha don't match.";}else{C+="El codigo no coincide.";}C+="<br/>";}if((A&64)==64){showError("country_pos_id");if("en_US"==m_sLanguage){C+="Select an country.";}else{C+="Seleccione un pais.";}C+="<br/>";}if((A&128)==128){showError("zip_pos_id_label");
if("en_US"==m_sLanguage){C+="invalid zipcode.";}else{C+="Codigo postal invalido.";}C+="<br/>";}if(C!=""){if("en_US"==m_sLanguage){C+="Try again.";}else{C+="Intenta de nuevo.";}}m_blnAdded=false;}reloadSecurityCodeImage();setEditorValue("commenttext",C);window.setTimeout("setEditorValue('commenttext', '');",5000);
}}function checkUncheckAll(A){var C=A.form,B=0;for(B=0;B<C.length;B++){if(C[B].type=="checkbox"&&C[B].name!="checkall"){C[B].checked=A.checked;}}}function getLionelsChannels(D){var B=newXMLHttpRequest();var C=getReadyStateHandler(B,loadNewsChannels);B.onreadystatechange=C;B.open("POST","/mattcontrol/lionels/ajaxFeeds.jsp",true);
B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="cmd=channels&language="+D;B.send(A);}function loadLionelsChannels(J){var H=document.getElementById("chSelect");H.innerHTML="";var C=J.getElementsByTagName("channels")[0];var D=C.getElementsByTagName("channel");var K=document.createElement("option");
K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");
I.innerHTML="";var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(K);}catch(G){}}function getLionelsSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();var F=getReadyStateHandler(E,loadNewsSubChannels);E.onreadystatechange=F;
E.open("POST","/mattcontrol/lionels/ajaxFeeds.jsp",true);E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var C="cmd=subchannels&channel="+D;E.send(C);}else{var B=document.getElementById("schSelect");B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));
B.appendChild(A);}}function loadLionelsSubChannels(H){var I=document.getElementById("schSelect");I.innerHTML="";var B=H.getElementsByTagName("subchannels")[0];var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));
I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function getOurProgramsChannels(D){var B=newXMLHttpRequest();var C=getReadyStateHandler(B,loadOurProgramsChannels);
B.onreadystatechange=C;B.open("POST","/mattcontrol/ourprograms/ajaxFeeds.jsp",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="cmd=channels&language="+D;B.send(A);}function loadOurProgramsChannels(J){var H=document.getElementById("chSelect");H.innerHTML="";var C=J.getElementsByTagName("channels")[0];
var D=C.getElementsByTagName("channel");var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");
F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");I.innerHTML="";var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(K);}catch(G){}}function getOurProgramsSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();
var F=getReadyStateHandler(E,loadOurProgramsSubChannels);E.onreadystatechange=F;E.open("POST","/mattcontrol/ourprograms/ajaxFeeds.jsp",true);E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var C="cmd=subchannels&channel="+D;E.send(C);}else{var B=document.getElementById("schSelect");
B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));B.appendChild(A);}}function loadOurProgramsSubChannels(H){var I=document.getElementById("schSelect");I.innerHTML="";var B=H.getElementsByTagName("subchannels")[0];
var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");
F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function getPressChannels(D){var B=newXMLHttpRequest();var C=getReadyStateHandler(B,loadPressChannels);B.onreadystatechange=C;B.open("POST","/mattcontrol/press/ajaxFeeds.jsp",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
var A="cmd=channels&language="+D;B.send(A);}function loadPressChannels(J){var H=document.getElementById("chSelect");H.innerHTML="";var C=J.getElementsByTagName("channels")[0];var D=C.getElementsByTagName("channel");var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));
H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");I.innerHTML="";var K=document.createElement("option");
K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(K);}catch(G){}}function getPressSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();var F=getReadyStateHandler(E,loadPressSubChannels);E.onreadystatechange=F;E.open("POST","/mattcontrol/press/ajaxFeeds.jsp",true);
E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var C="cmd=subchannels&channel="+D;E.send(C);}else{var B=document.getElementById("schSelect");B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));
B.appendChild(A);}}function loadPressSubChannels(H){var I=document.getElementById("schSelect");I.innerHTML="";var B=H.getElementsByTagName("subchannels")[0];var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));
I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function getLawyerCornerChannels(D){var B=newXMLHttpRequest();var C=getReadyStateHandler(B,loadLawyerCornerChannels);
B.onreadystatechange=C;B.open("POST","/mattcontrol/lawyercorner/ajaxFeeds.jsp",true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="cmd=channels&language="+D;B.send(A);}function loadLawyerCornerChannels(J){var H=document.getElementById("chSelect");H.innerHTML="";var C=J.getElementsByTagName("channels")[0];
var D=C.getElementsByTagName("channel");var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a channel -- "));H.appendChild(K);for(var E=0;E<D.length;E++){try{var B=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");
F.value=B;F.appendChild(document.createTextNode(A));H.appendChild(F);}catch(G){}}try{var I=document.getElementById("schSelect");I.innerHTML="";var K=document.createElement("option");K.value="-1";K.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(K);}catch(G){}}function getLawyerCornerSubChannels(D){if(D!="-1"){var E=newXMLHttpRequest();
var F=getReadyStateHandler(E,loadLawyerCornerSubChannels);E.onreadystatechange=F;E.open("POST","/mattcontrol/lawyercorner/ajaxFeeds.jsp",true);E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var C="cmd=subchannels&channel="+D;E.send(C);}else{var B=document.getElementById("schSelect");
B.innerHTML="";var A=document.createElement("option");A.value="-1";A.appendChild(document.createTextNode(" -- Select a sub channel -- "));B.appendChild(A);}}function loadLawyerCornerSubChannels(H){var I=document.getElementById("schSelect");I.innerHTML="";var B=H.getElementsByTagName("subchannels")[0];
var D=B.getElementsByTagName("subchannel");var J=document.createElement("option");J.value="-1";J.appendChild(document.createTextNode(" -- Select a sub channel -- "));I.appendChild(J);for(var E=0;E<D.length;E++){try{var C=D[E].getAttribute("id");var A=D[E].firstChild.nodeValue;var F=document.createElement("option");
F.value=C;F.appendChild(document.createTextNode(A));I.appendChild(F);}catch(G){}}}function changeRol(B){document.getElementById("changeRolButton").disabled=true;var C=newXMLHttpRequest();var D=getReadyStateHandler(C,loadChangedRol);C.onreadystatechange=D;C.open("POST","/mattcontrol/servlet/user/changerole",true);
C.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var A="userid="+B;C.send(A);}function loadChangedRol(B){var A=B.getElementsByTagName("response");try{var C=A[0].getAttribute("value");if(C=="true"){C=document.getElementById("changeRolButton").innerHTML;if(C=="MattAdmin"){C="MattUser";
}else{C="MattAdmin";}document.getElementById("changeRolButton").innerHTML=C;}}catch(D){}document.getElementById("changeRolButton").disabled=false;}