var savedStates=new Array();var savedStateCount=0;function saveBackgroundStyle(A){saved=new Object();saved.element=A;saved.className=A.className;saved.background=A.style.background;saved.backgroundColor=A.style.backgroundColor;saved.backgroundImage=A.style.backgroundImage;saved.backgroundRepeat=A.style.backgroundRepeat;return saved}function restoreBackgroundStyle(A){A.element.style.background=A.background;A.element.style.backgroundColor=A.backgroundColor;A.element.style.backgroundImage=A.backgroundImage;A.element.style.backgroundRepeat=A.backgroundRepeat;if(A.className){A.element.className=A.className}}function findNode(A,C){myElement=A;var B=0;while(myElement&&(!myElement.tagName||(myElement.tagName&&myElement.tagName!=C))){myElement=A.childNodes[B];B++}if(myElement&&myElement.tagName&&myElement.tagName==C){return myElement}else{if(A.firstChild){return findNode(A.firstChild,C)}}return 0}function highlightTableRow(B,E){var C=0;for(C;C<savedStateCount;C++){restoreBackgroundStyle(savedStates[C])}savedStateCount=0;while(B&&((B.tagName&&B.tagName!="TR")||!B.tagName)){B=B.parentNode}if(!B||(B&&B.className&&(B.className=="header"))){return }if(B){var A=B;if(A){savedStates[savedStateCount]=saveBackgroundStyle(A);savedStateCount++}var D=findNode(B,"TD");var C=0;while(D){if(D.tagName=="TD"){if(!D.style){D.style={}}else{savedStates[savedStateCount]=saveBackgroundStyle(D);savedStateCount++}D.style.background=E;D.style.backgroundColor=E;C++}D=D.nextSibling}}}function trackTableHighlight(A,B){if(!A){A=window.event}if(A.srcElement){highlightTableRow(A.srcElement,B)}else{if(A.target){highlightTableRow(A.target,B)}}}function highlightTableRowVersionA(B,E){var C=0;for(C;C<savedStateCount;C++){restoreBackgroundStyle(savedStates[C])}savedStateCount=0;if(!B||(B&&B.id&&B.id=="header")){return }if(B){var A=B;if(A){savedStates[savedStateCount]=saveBackgroundStyle(A);savedStateCount++}var D=findNode(B,"TD");var C=0;while(D){if(D.tagName=="TD"){if(!D.style){D.style={}}else{savedStates[savedStateCount]=saveBackgroundStyle(D);savedStateCount++}D.style.background=E;C++}D=D.nextSibling}}}function addLoadEvent(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){if(B){B()}A()}}}function ConvertRowsToLinks(A){var C=document.getElementById(A).getElementsByTagName("tr");for(i=0;i<C.length;i++){var B=C[i].getElementsByTagName("a");if(B.length==1){C[i].onclick=new Function("document.location.href='"+B[0].href+"'")}}}function echeck(G){var B="@";var C=".";var F=G.indexOf(B);var D=G.length;var E=G.indexOf(C);var A="Adresa email incorecta";if(G.indexOf(B)==-1){alert(A);return false}if(G.indexOf(B)==-1||G.indexOf(B)==0||G.indexOf(B)==D){alert(A);return false}if(G.indexOf(C)==-1||G.indexOf(C)==0||G.indexOf(C)==D){alert(A);return false}if(G.indexOf(B,(F+1))!=-1){alert(A);return false}if(G.substring(F-1,F)==C||G.substring(F+1,F+2)==C){alert(A);return false}if(G.indexOf(C,(F+2))==-1){alert(A);return false}if(G.indexOf(" ")!=-1){alert(A);return false}return true}jQuery(function(){jQuery.highlight=document.body.createTextRange?function(C,D){var B=document.body.createTextRange();B.moveToElementText(C);for(var A=0;B.findText(D);A++){B.pasteHTML('<span class="highlight">'+B.text+"</span>");B.collapse(false)}}:function(D,B){var H,I,G,E,A,C;I=0;if(D.nodeType==3){H=D.data.toUpperCase().indexOf(B);if(H>=0){G=document.createElement("span");G.className="highlight";E=D.splitText(H);A=E.splitText(B.length);C=E.cloneNode(true);G.appendChild(C);E.parentNode.replaceChild(G,E);I=1}}else{if(D.nodeType==1&&D.childNodes&&!/(script|style)/i.test(D.tagName)){for(var F=0;F<D.childNodes.length;++F){F+=jQuery.highlight(D.childNodes[F],B)}}}return I}});jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.replaceChild(this.firstChild,this).normalize()})};
