this.name='shEAMainWnd'; this.focus(); var currWePageNo = 1; var fUserClick = 0; function wePage(pageNo) { if (pageNo < 1) pageNo = noWEPages; if (pageNo > noWEPages) pageNo = 1; for (i = 0; i < 10; ++i) { pNo = i * 2 + 1; if (gE('weDiv' + pNo) != null) { if (pNo == (pageNo - 1) * 2 + 1) { gE('weDiv' + pNo).style.display = 'inline'; gE('wePSpan' + (i+1)).style.display = 'inline'; gE('wePAnch' + (i+1)).style.display = 'none'; } else { gE('weDiv' + pNo).style.display = 'none'; gE('wePSpan' + (i+1)).style.display = 'none'; gE('wePAnch' + (i+1)).style.display = 'inline'; } } } currWePageNo = pageNo; fUserClick = 5; } function switchWEPage() { if (fUserClick > 0) { fUserClick = fUserClick - 1; } else { wePage(currWePageNo + 1); fUserClick = 0; } setTimeout('switchWEPage()', 5000); } //FORUM ACCOUNT var redirectAfterLogin = ''; function doLoginForum() { if(!validateLogin()) { return false; } var tmpUtilizator = $('cUtilizator').value; var tmpParola = $('cParola').value; $('utilizatorInregistrat').innerHTML = ''; new Ajax.Request(pathWWW+'/getajax|doLogin', { method:'post', parameters: {cUtilizator: tmpUtilizator,cParola: tmpParola }, onSuccess: function(transport){ var response = transport.responseXML; var status = response.childNodes[0].childNodes[0].firstChild.nodeValue; if(status == 'true') { var user = response.childNodes[0].childNodes[2]; displayLoggedScreenForum(user); } else { //report error var err = response.childNodes[0].childNodes[1].firstChild.nodeValue; displayLoginScreenForum(); $('cUtilizator').value = tmpUtilizator; document.getElementById('cUtilizator').focus(); showToolTipFader('Utilizatorul nu exista sau parola este gresita',$('cUtilizator')); } }, onFailure: function(){ } }); } function displayLoginScreenForum() { var content = ""; content +="

Cont utilizator

"; content +="
"; content +="UTILIZATOR
"; content +=" PAROLA
"; content +=""; content +=""; content +=""; content +="
"; $('fieldsetLogin').innerHTML = content; addLoginKeyPressEventForum(); } function displayRecoverPasswordForum() { var content = ""; content +='

Recuperare parola

'; content +="
"; content +="« inapoi

Introduceti adresa de email asociata contului dumneavoastra

"; content +=""; content +=""; content +="
"; $('fieldsetLogin').innerHTML = content; setTimeout('document.getElementById(\'cRecover\').focus();',100); addLoginKeyPressEventForum(); } function doRecoverPasswordForum() { if(!validateMail($('cRecover'))) { return false; } var tmpRecover = $('cRecover').value; $('utilizatorInregistrat').innerHTML = ''; new Ajax.Request(pathWWW+'/getajax|doRecoverPassword', { method:'post', parameters: {cRecover: tmpRecover }, onSuccess: function(transport){ var response = transport.responseXML; var status = response.childNodes[0].childNodes[0].firstChild.nodeValue; if(status == 'true') { displayRecoverPasswordMsgForum('« inapoi

Email-ul cu noua parola a fost trimis succes catre

'+tmpRecover+' '); } else { //report error var err = response.childNodes[0].childNodes[1].firstChild.nodeValue; displayRecoverPasswordMsgForum('« inapoi

'+err); } }, onFailure: function(){ } }); } function displayRecoverPasswordMsgForum(msg) { var content = ""; content +="

Cont utilizator

"; content +="
"; content +=msg; content +=""; content +=""; content +="
"; $('fieldsetLogin').innerHTML = content; } function addLoginKeyPressEventForum() { if($('cUtilizator')) $('cUtilizator').onkeypress = function(e) { if(!document.all && e.which == 13) doLoginForum(); } if($('cParola')) $('cParola').onkeypress = function(e) { if(!document.all && e.which == 13) doLoginForum(); } if($('cRecover')) $('cRecover').onkeypress = function(e) { if(!document.all && e.which == 13) doRecoverPasswordForum(); } if(document.all) { document.body.onkeypress = function(e) { var kC = event.keyCode; if(kC==27) if($('tooltipX')) hidePopup(); } } else { window.onkeypress = function(e) { var kC = e.keyCode; var Esc = e.DOM_VK_ESCAPE; if(kC==Esc) if($('tooltipX')) hidePopup(); } } } function displayLoggedScreenForum(user) { if(redirectAfterLogin) { window.location=redirectAfterLogin; } else { window.location.reload(); } /* if(user.childNodes[3].firstChild.nodeValue) { var avatar = user.childNodes[3].firstChild.nodeValue; } else { var avatar = "\"\""; } var content = ""; content += "

Utilizator autentificat IESIRE

"; content += avatar; content += "
"; content += "
Bine ai venit "+user.childNodes[0].firstChild.nodeValue+"
"; content += "
Editeaza datele
"; content += "
Contul meu
"; content += "
Mesaje private
"; content += "
"; $('fieldsetLogin').innerHTML = content; */ } function highlightLoginForum(redirAfter) { redirectAfterLogin = redirAfter; $('fieldsetLogin').style.backgroundColor = "yellow"; $('cUtilizator').focus(); self.scrollTo(0, 0); showToolTipFader("Actiunea necesita autentificare!",$('cUtilizator')); } function displayForumRegisterFrm() { var content = ""; content +='

Creare cont

'; content +="
"; content +="« inapoi

"; content +="UTILIZATOR   (disponibil?)

"; content +="PAROLA

"; content +="VERIFICA PAROLA

"; content +="EMAIL   (disponibil?)

"; content +=" sunt de acord cu         termenii si conditiile

"; content +=""; content +="
"; $('fieldsetLogin').innerHTML = content; } function doRegisterForum() { if(!validateRegister()) { return false; } var tmpUtilizator = $('cUtilizator').value; var tmpParola = $('cParola').value; var tmpEmail = $('cEmail').value; $('utilizatorNou').innerHTML = ''; new Ajax.Request(pathWWW+'/getajax|doRegister', { method:'post', parameters: {cUtilizator: tmpUtilizator,cParola: tmpParola, cEmail: tmpEmail }, onSuccess: function(transport){ var response = transport.responseXML; var status = response.childNodes[0].childNodes[0].firstChild.nodeValue; if(status == 'true') { displayLoggedScreenForum(); } else { //report error var err = response.childNodes[0].childNodes[1].firstChild.nodeValue; displayForumRegisterFrm(); $('cUtilizator').value = tmpUtilizator; document.getElementById('cUtilizator').focus(); showToolTipFader(err,$('cUtilizator')); } }, onFailure: function(){ } }); } //VALIDATION function validateFSubject() { if($('mTitle')) { if(Validation.get('required').test($('mTitle').value)) { } else { showToolTipFader('Completati titlu',$('mTitle')); $('mTitle').focus(); return false; } } if($('message')) { if(Validation.get('required').test($('message').value)) { } else { showToolTipFader('Completati mesaj',$('message')); $('message').focus(); return false; } } return true; } function validateSearch() { if($('mFSearch')) { if(Validation.get('required').test($('mFSearch').value) && ($('mFSearch').value.length > 2)) { } else { showToolTipFader('Cautarea trebuie sa contina minim 3 caractere.',$('mFSearch')); $('mFSearch').focus(); return false; } } return true; } function updateRecomandariSubiect(vTopicID,nr){ //change link $('sRecomandaSubiect').innerHTML="+"+(nr+1); $('sRecomandaSubiect').href = "javascript:void(0);"; new Ajax.Request(pathWWW+'/getajax|recommendSubject', { method:'post', parameters: {topicID: vTopicID }, onSuccess: function(){ //set cookie createCookie('recSubj_'+vTopicID,'true',14); }, onFailure: function(){ } }); } function showAllFriendsAjax(usrID) { new Ajax.Request(pathWWW+'/getajax|getusersfriends', { method:'post', parameters: {userID: usrID }, onCreate: function() { showUsersFriends("

Lista de prieteni

"); }, onLoading: function() { $('xShowFriends').update(""); }, onSuccess: function(transport){ var response = transport.responseText; $('xShowFriends').update(response); } }); }