function htmlEncode( string ) { if(string.length>0){ string = escape(string); string = string.replace(/\//g,"%2F"); string = string.replace(/\?/g,"%3F"); string = string.replace(/=/g,"%3D"); string = string.replace(/&/g,"%26"); string = string.replace(/@/g,"%40"); //alert(string); } return string; } function replaceChars( string ) { if(string.length>0){ string = string.replace(/ü/g,"ü"); string = string.replace(/Ü/g,"ü"); string = string.replace(/á/g,"á"); string = string.replace(/Á/g,"á"); string = string.replace(/é/g,"é"); string = string.replace(/É/g,"é"); string = string.replace(/í/g,"í"); string = string.replace(/Í/g,"í"); string = string.replace(/õ/g,"õ"); string = string.replace(/Õ/g,"Õ"); string = string.replace(/ó/g,"ó"); string = string.replace(/Ó/g,"ó"); string = string.replace(/ú/g,"ú"); string = string.replace(/Ú/g,"ú"); string = string.replace(/û/g,"ű"); string = string.replace(/Û/g,"ű"); } return string; } function preventDefault(e) { if(!e) var e = window.event; //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works only in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } function checkChars( obj, maxChars ){ if(obj != null){ if(document.getElementById(obj.id + "_chars") != null){ cObj = document.getElementById(obj.id + "_chars"); if(parseInt(maxChars - obj.value.length) < 0){ obj.value = obj.value.substr(0,maxChars); } cObj.innerHTML = parseInt(maxChars - obj.value.length); } } } function show( id, method, velocity ){ if(method==undefined) method='slide'; if(velocity==undefined) velocity='slow'; if(method=='slide') $j("#" + id).slideDown(velocity); else if(method=='fade') $j("#" + id).fadeIn(velocity); else if(method=='show') $j("#" + id).show(velocity); else if(method=='toggle') $j("#" + id).toggle(velocity); else if(method=='nothing' || method=='none') document.getElementById(id).style.display='block'; } function hide( id, method, velocity ){ if(method==undefined) method='slide'; if(velocity==undefined) velocity='slow'; if(method=='slide') $j("#" + id).slideUp(velocity); else if(method=='fade') $j("#" + id).fadeOut(velocity); else if(method=='show') $j("#" + id).hide(velocity); else if(method=='toggle') $j("#" + id).toggle(velocity); else if(method=='nothing' || method=='none') document.getElementById(id).style.display='none'; } function openClose( id, method ){ if(document.getElementById( id ) != null){ obj = document.getElementById( id ); if( obj.style.display=='none' ){ show( obj.id, method ); }else{ hide( obj.id, method ); } } }