function writeError(C,B){var D=B.search(/,/);var A=new Array();if(B!=""){if(D!=-1){A=B.split(",")}else{A[0]=B}for(i=0;i<A.length;i++){document.getElementById(A[i]).style.border="solid 2px #CC0000"}}document.getElementById("errorDiv").value=B;$("#mainerror").animate({height:"show",opacity:"show"},"slow");document.getElementById("error_div").innerHTML+=C;self.location="#mainerror"}function hideError(){var B=document.getElementById("errorDiv").value;if(B!=""){var C=B.search(/,/);var A=new Array();if(C!=-1){A=B.split(",")}else{A[0]=B}for(i=0;i<A.length;i++){document.getElementById(A[i]).style.border="0"}$("#mainerror").animate({height:"hide",opacity:"hide"},"slow");document.getElementById("error_div").innerHTML=""}}function openpopup(C){var B="/index/showtemplate/templetename/"+C;var A=window.open(B,"mywindow","width=500,height=400")};
