//COOKIES function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } //ART UTILS var avnetFontSize=''; function increaseFontSize(elema,elemb) { if(avnetFontSize <= 16) { avnetFontSize++; elema.style.fontSize = avnetFontSize+'px'; if(elemb) elemb.style.fontSize = avnetFontSize+'px'; createCookie('avnetFontSize',avnetFontSize,14); } } function setFontSize(v,obj, elema, elemb) { if(obj == 'fz_s') { $("fz_s").src = 'http://www.avocatnet.ro/images/icons/fs/fs_small_on.gif'; $("fz_s1").src = 'http://www.avocatnet.ro/images/icons/fs/fs_small_on.gif'; } else { $("fz_s").src = 'http://www.avocatnet.ro/images/icons/fs/fs_small_off.gif'; $("fz_s1").src = 'http://www.avocatnet.ro/images/icons/fs/fs_small_off.gif'; } if(obj == 'fz_n') { $("fz_n").src = 'http://www.avocatnet.ro/images/icons/fs/fs_norm_on.gif'; $("fz_n1").src = 'http://www.avocatnet.ro/images/icons/fs/fs_norm_on.gif'; } else { $("fz_n").src = 'http://www.avocatnet.ro/images/icons/fs/fs_norm_off.gif'; $("fz_n1").src = 'http://www.avocatnet.ro/images/icons/fs/fs_norm_off.gif'; } if(obj == 'fz_b') { $("fz_b").src = 'http://www.avocatnet.ro/images/icons/fs/fs_big_on.gif'; $("fz_b1").src = 'http://www.avocatnet.ro/images/icons/fs/fs_big_on.gif'; } else { $("fz_b").src = 'http://www.avocatnet.ro/images/icons/fs/fs_big_off.gif'; $("fz_b1").src = 'http://www.avocatnet.ro/images/icons/fs/fs_big_off.gif'; } if(elema) elema.style.fontSize = v+'px'; if(elemb) elemb.style.fontSize = v+'px'; createCookie('avnetFontSize',v,10); } function recommend(urlRecommandForThisArticle) { var x = (screen.width-400)/2, y = (screen.height-400)/2; OpenWin = this.open(urlRecommandForThisArticle, "CtrlWindow", "width=400,height=400,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function decreaseFontSize(elema,elemb) { if(avnetFontSize >= 10) { avnetFontSize--; elema.style.fontSize = avnetFontSize+'px'; if(elemb) elemb.style.fontSize = avnetFontSize+'px'; createCookie('avnetFontSize',avnetFontSize,14); } } function updateRecomandari(vArticleID,nr){ //change link $('sRecomandaArticol').innerHTML=" +"+(nr+1)+""; $('sRecomandaArticol01').innerHTML=" +"+(nr+1)+""; new Ajax.Request(pathWWW+'/getajax|recommendArticle', { method:'post', parameters: {articleID: vArticleID }, onSuccess: function(){ //set cookie createCookie('rec_'+vArticleID,'true',14); }, onFailure: function(){ } }); } function printerFriendly(urlToOpen) { var x = (screen.width-650)/2, y = (screen.height-450)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=650,height=450,toolbars=0,menubar=no,location=no,scrollbars=yes,resizable=no,screenX="+x+",screenY="+y+",left="+x+",top="+y); } //COMMENTS function displayCommentForm() { Effect.toggle($('posteaza'),'slide'); } function postComment(articleID) { Effect.toggle($('posteaza'),'slide'); new Ajax.Request(pathWWW+'/getajax|handleCommentsNew', { method:'post', parameters: {cArticleID: articleID,cUser: ($('cUser') ? $('cUser').value : "") , cText: $('cText').value, postComment: '1' }, onSuccess: function(transport){ if($('cUser')) $('cUser').value = ''; $('cText').value =''; //set cookie createCookie('lastPost','true',(1/24/60/2)); var response = transport.responseText; $('commentsContentID').update(response); }, onFailure: function(){ } }); } function writeComments(rXML) { if(document.all) { var detalii = rXML.childNodes[1].childNodes[0]; var comments = rXML.childNodes[1].childNodes[1]; } else { var detalii = rXML.childNodes[0].childNodes[0]; var comments = rXML.childNodes[0].childNodes[1]; } //build pages var page = detalii.childNodes[0].firstChild.nodeValue; var totalPages = detalii.childNodes[1].firstChild.nodeValue; var totalcomentarii = detalii.childNodes[2].firstChild.nodeValue; var path= detalii.childNodes[3].firstChild.nodeValue; var articleID = detalii.childNodes[4].firstChild.nodeValue; var pager='Pagina '; var range = 7; //alert(parseInt(page)+parseInt(range)); for(j=0; j < totalPages; j++) { if(j==0) { if((j+1)==page) { pager+=" "+(j+1)+" "; } else { pager+=" "+(j+1)+" "; } } if(j==(parseInt(page)-parseInt(range)) && (parseInt(page)-parseInt(range)) > 0) pager+=" ... "; if( j>(parseInt(page)-parseInt(range)) && j<(parseInt(page)+parseInt(range)) && j > 0 && j < (parseInt(totalPages)-1)) { if((j+1)==page) { pager+=" "+(j+1)+" "; } else { pager+=" "+(j+1)+" "; } } if(j==(parseInt(page)+parseInt(range)) && (parseInt(page)+parseInt(range))!=totalPages ) { pager+=" ... "; } if(j==(parseInt(totalPages)-1)) { if((j+1)==page) { pager+=" "+(j+1)+" "; } else { pager+=" "+(j+1)+" "; } } } var content = ""; if(totalPages > 1) content+="
"; content +="UTILIZATOR"; content +=""; content +="PAROLA"; content +=""; content +=""; content +="
"; content +=""; content +=""; $('utilizatorInregistrat').update(content); addLoginKeyPressEvent(); } function displayRecoverPassword() { $('hCont').style.backgroundColor = "#ffffff"; var content = ""; content +=''; content +=""; content +="Introduceti adresa de email asociata contului dumneavoastra."; content +="EMAIL"; content +=""; content +="« inapoi
"; content +=""; content +=""; $('utilizatorInregistrat').update(content); setTimeout('document.getElementById(\'cRecover\').focus();',100); addLoginKeyPressEvent(); } function displayRecoverPasswordNew() { $('newLoginBoxTopLeft').hide(); $('newRecoveryPasswordBoxTopLeft').show(); setTimeout('document.getElementById(\'cRecover\').focus();',100); addLoginKeyPressEvent(); } function displayLoginScreenNew() { $('newRecoveryPasswordBoxTopLeft').hide(); $('newLoginBoxLoader').hide(); $('newMsgBoxTopLeft').hide(); $('newLoginBoxTopLeft').show(); addLoginKeyPressEvent(); } function displayRecoverPasswordMsg(msg) { var content = ""; content +=""; content +=""; content +=msg; content +="« inapoi
"; content +=""; $('utilizatorInregistrat').update(content); } function displayRegisterFrm() { var content = ""; content +=''; content +="| ');
else
var cell = document.createElement('td');
cell.setAttribute('colspan','3');
//create img
var nimg = document.createElement('img');
if(document.all)
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_sus.gif";
else
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_sus.png";
nimg.className="tooltipUpArrow";
nimg.id = "toolArrowU";
//create img
var nimgRight = document.createElement('img');
if(document.all)
nimgRight.src="http://www.avocatnet.ro/images/pop-up/sageata_sus_right.gif";
else
nimgRight.src="http://www.avocatnet.ro/images/pop-up/sageata_sus_right.png";
nimgRight.className="tooltipUpArrowRight";
nimgRight.id = "toolArrowURight";
cell.appendChild(nimg);
cell.appendChild(nimgRight);
row.appendChild(cell);
tbb.appendChild(row);
//end create up arrow td
//create top tooltip
var row = document.createElement('tr');
var cell = document.createElement('td');
cell.className="tooltipCorner_ul";
row.appendChild(cell);
var cell = document.createElement('td');
cell.className="tooltipBar_u";
row.appendChild(cell);
var cell = document.createElement('td');
cell.className="tooltipCorner_ur";
row.appendChild(cell);
tbb.appendChild(row);
//end create top tooltip
if(doNotCloseAfter == 1) {
var imgClose = " | ');
else
var cell = document.createElement('td');
cell.setAttribute('colspan','3');
//create img
var nimg = document.createElement('img');
if(document.all)
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_jos.gif";
else
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_jos.png";
nimg.className="tooltipDownArrow";
nimg.id = "toolArrowD";
//create img
var nimgRight = document.createElement('img');
if(document.all)
nimgRight.src="http://www.avocatnet.ro/images/pop-up/sageata_jos_right.gif";
else
nimgRight.src="http://www.avocatnet.ro/images/pop-up/sageata_jos.png";
nimgRight.className="tooltipDownArrowRight";
nimgRight.id = "toolArrowDRight";
cell.appendChild(nimg);
cell.appendChild(nimgRight);
row.appendChild(cell);
tbb.appendChild(row);
//end create down arrow td
tbl.appendChild(tbb);
newdiv.appendChild(tbl);
newdiv.className ="tooltipDiv";
//add tooltip to document
document.body.appendChild(newdiv);
//position tooltip
setPopupPosition(obj,newdiv,'tooltip');
Effect.Appear(newdiv.id,{duration:.2});
//set fade out
if(!doNotCloseAfter)
globalTimeout = window.setTimeout('Effect.Fade(\'tooltipX\', {duration:.3,from:1.0, to:0.0})',2500);
//========================================
}
function setPopupPosition(el, x, who) {
var direction = "up";
var directionX = "left";
var position = Position.cumulativeOffset(el);
var scrollY = document.body.scrollTop ?
document.body.scrollTop : document.documentElement.scrollTop;
var scrollX = document.body.scrollLeft ?
document.body.scrollLeft : document.documentElement.scrollLeft;
var viewHeight = (navigator.userAgent.toLowerCase().indexOf("safari") != -1 &&
window.innerHeight) ? window.innerHeight :
document.documentElement.clientHeight;
x.style.left = position[0]-40 + "px";
var popupTop = position[1] + Element.getHeight(el);
var popupLeft = position[0] + Element.getWidth(el);
if((popupTop + x.offsetHeight > scrollY + viewHeight) &&
(position[1] - x.offsetHeight > scrollY))
{
popupTop = position[1] - x.offsetHeight ;
}
if(popupTop > (scrollY + Element.getHeight(x) + 40 + Element.getHeight(el))) {
direction="down";
if(who=='tooltip') {
if(popupLeft > (scrollX+Element.getWidth(x) + 40 + Element.getWidth(el))) {
$('toolArrowDRight').style.visibility = "visible";
directionX = "right";
} else {
$('toolArrowD').style.visibility = "visible";
}
}
if(who=='infotip')
$('infoArrowD').style.visibility = "visible";
} else {
if(who=='tooltip') {
if(popupLeft > (scrollX+Element.getWidth(x) + 40 + Element.getWidth(el))) {
$('toolArrowURight').style.visibility = "visible";
directionX = "right";
} else {
$('toolArrowU').style.visibility = "visible";
}
}
if(who=='infotip')
$('infoArrowU').style.visibility = "visible";
}
if(direction == "up")
x.style.top = (popupTop+30) + "px";
else
x.style.top = (popupTop - Element.getHeight(x) - (document.all ? 20 : 30) - Element.getHeight(el)) + "px";
if(directionX == "right")
x.style.left = (popupLeft-Element.getWidth(x) - Element.getWidth(el) + (document.all ? 50 : 40)) + "px";
}
function hidePopup() {
if($('tooltipX')) {
document.body.removeChild($('tooltipX'));
window.clearTimeout(globalTimeout);
}
}
function validateComment() {
if($('cUser'))
var cUser = $('cUser');
var cText = $('cText');
if(cUser) {
if(Validation.get('required').test(cUser.value)) {
} else {
showToolTipFader('Completati numele dumneavostra.',cUser);
cUser.focus();
return false;
}
}
if(Validation.get('required').test(cText.value)) {
} else {
showToolTipFader('Adaugati comentariul',cText);
cText.focus();
return false;
}
return true;
}
function validatePm() {
var recipient = $('recipient');
var bodyPM = $('body');
if($('to1').checked == true) {
if(Validation.get('required').test(recipient.value)) {
} else {
showToolTipFader('Completati utilizatorul.',recipient);
recipient.focus();
return false;
}
}
if(Validation.get('required').test(bodyPM.value)) {
} else {
showToolTipFader('Completati mesajul catre destinatar.',bodyPM);
bodyPM.focus();
return false;
}
return true;
}
function validateSearchTop() {
if($('cauta')) {
if(Validation.get('required').test($('cauta').value) && ($('cauta').value.length > 2)) {
} else {
showToolTipFader('Cautarea trebuie sa contina minim 3 caractere.',$('cauta'));
$('cauta').focus();
return false;
}
}
return true;
}
function validateSearchGoogle() {
if($('q')) {
if(Validation.get('required').test($('q').value) && ($('q').value.length > 2)) {
} else {
showToolTipFader('Cautarea trebuie sa contina minim 3 caractere.',$('q'));
$('q').focus();
return false;
}
}
return true;
}
function validateLogin() {
var cUtilizator = $('cUtilizator');
var cParola = $('cParola');
if(Validation.get('required').test(cUtilizator.value)) {
} else {
showToolTipFader('Completati campul de utilizator.',cUtilizator);
cUtilizator.focus();
return false;
}
if(Validation.get('required').test(cParola.value)) {
} else {
showToolTipFader('Completati parola dvs.',cParola);
cParola.focus();
return false;
}
return true;
}
function validateMail(ele) {
var cEmail = ele;
if(Validation.get('validate-email').test(cEmail.value) && cEmail.value.length > 1) {
} else {
showToolTipFader('Adresa de email este invalida \nExemplu: popesecu@example.ro',cEmail);
cEmail.focus();
return false;
}
return true;
}
function validateRegister() {
var cUtilizator = $('cUtilizator');
var cParola = $('cParola');
var cParolaT = $('cParolaT');
var cEmail = $('cEmail');
var cAgree = $('cAgree');
if(Validation.get('required').test(cUtilizator.value)) {
} else {
showToolTipFader('Completati campul de utilizator.',cUtilizator);
cUtilizator.focus();
return false;
}
if(Validation.get('required').test(cParola.value)) {
} else {
showToolTipFader('Completati parola dvs.',cParola);
cParola.focus();
return false;
}
if(Validation.get('required').test(cParolaT.value)) {
} else {
showToolTipFader('Reintroduceti parola in campul de "VERIFICA PAROLA"',cParolaT);
cParolaT.focus();
return false;
}
if(cParola.value != cParolaT.value) {
showToolTipFader('Parola nu a fost verificata',cParolaT);
cParolaT.value='';
cParola.focus();
return false;
}
if(Validation.get('validate-email').test(cEmail.value) && cEmail.value.length > 1) {
} else {
showToolTipFader('Adresa de email este invalida \nExemplu: popesecu@example.ro',cEmail);
cEmail.focus();
return false;
}
if(cAgree.checked != true) {
showToolTipFader('Pentru a te putea inregistra trebuie sa accepti termenii si conditiile de utilizare ale Avocatnet.ro',cAgree);
cAgree.focus();
return false;
}
return true;
}
function validateRegister01() {
var cUtilizator = $('cUtilizator3');
var cParola = $('cParola');
var cParolaT = $('cParolaT');
var cEmail = $('cEmail');
var cAgree = $('cAgree');
if(Validation.get('required').test(cUtilizator.value)) {
} else {
showToolTipFader('Completati campul de utilizator.',cUtilizator);
cUtilizator.focus();
return false;
}
if(Validation.get('required').test(cParola.value)) {
} else {
showToolTipFader('Completati parola dvs.',cParola);
cParola.focus();
return false;
}
if(Validation.get('required').test(cParolaT.value)) {
} else {
showToolTipFader('Reintroduceti parola in campul de "VERIFICA PAROLA"',cParolaT);
cParolaT.focus();
return false;
}
if(cParola.value != cParolaT.value) {
showToolTipFader('Parola nu a fost verificata',cParolaT);
cParolaT.value='';
cParola.focus();
return false;
}
if(Validation.get('validate-email').test(cEmail.value) && cEmail.value.length > 1) {
} else {
showToolTipFader('Adresa de email este invalida \nExemplu: popesecu@example.ro',cEmail);
cEmail.focus();
return false;
}
if(cAgree.checked != true) {
showToolTipFader('Pentru a te putea inregistra trebuie sa accepti termenii si conditiile de utilizare ale Avocatnet.ro',cAgree);
cAgree.focus();
return false;
}
document.doRegister.submit();
return true;
}
function initPage(){
if(readCookie('avnetFontSize')) {
avnetFontSize = readCookie('avnetFontSize');
/*if($('teaserArticol'))
$('teaserArticol').style.fontSize = avnetFontSize+'px';
if($('textArticol'))
$('textArticol').style.fontSize = avnetFontSize+'px';*/
if(avnetFontSize == 12) {
if($('textArticol') && $('textArticol'))
setFontSize(avnetFontSize,'fz_s',$('teaserArticol'), $('textArticol'));
}
if(avnetFontSize == 14) {
if($('textArticol') && $('textArticol'))
setFontSize(avnetFontSize,'fz_n',$('teaserArticol'), $('textArticol'));
}
if(avnetFontSize == 16) {
if($('textArticol') && $('textArticol'))
setFontSize(avnetFontSize,'fz_b',$('teaserArticol'), $('textArticol'));
}
} else {
avnetFontSize = 16;
if($('textArticol') && $('textArticol'))
setFontSize(avnetFontSize,'fz_b',$('teaserArticol'), $('textArticol'));
}
}
function addLoginKeyPressEvent(e) {
if($('cUtilizator'))
$('cUtilizator').onkeypress = function(e) {
if(!document.all && e.which == 13)
doLogin();
}
if($('cParola'))
$('cParola').onkeypress = function(e) {
if(!document.all && e.which == 13)
doLogin();
}
if($('cRecover'))
$('cRecover').onkeypress = function(e) {
if(!document.all && e.which == 13)
doRecoverPassword();
}
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();
}
}
}
var bAllSelected = false;
function selectAll(f,v) {
bAllSelected = !bAllSelected;
if(document.all) {
for(i=0; i < f.elements.length; i++) {
var tmpName = String(f.elements(i).name);
if (tmpName.indexOf(v) >= 0) {
f.elements[i].checked = bAllSelected;
}
}
} else {
for (var i in f.elements) {
var tmpName = (f.elements[i]) ? String(f.elements[i].name) : i;
if (tmpName.indexOf(v) >= 0) {
f.elements[i].checked = bAllSelected;
}
}
}
}
function getSearchDomains(ele,domID) {
new Ajax.Request(pathWWW+'/getajax|consCatDomains', {
method:'post',
parameters: {catID: ele.value},
onSuccess: function(transport){
var response = transport.responseXML;
populateDomains(response,domID);
},
onFailure: function(){ }
});
}
function populateDomains(rXML,domIDS) {
var domSelect = $('domSelect');
for(j = domSelect.length;j>=0;j--)
domSelect.remove(j);
domSelect.disabled=true;
var alegeti = document.createElement('option');
alegeti.text = '- toate -';
alegeti.value = '';
try {
domSelect.add(alegeti, null); // standards compliant; doesn't work in IE
}
catch(ex) {
domSelect.add(alegeti); // IE only
}
var subdomenii = rXML.childNodes[0];
//build
if(subdomenii.childNodes.length > 0) {
for(var i=0;i| ');
else
var cell = document.createElement('td');
cell.setAttribute('colspan','3');
//create img
var nimg = document.createElement('img');
if(document.all)
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_sus.gif";
else
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_sus.png";
nimg.className="tooltipUpArrow";
nimg.id = "infoArrowU";
cell.appendChild(nimg);
row.appendChild(cell);
tbb.appendChild(row);
//end create up arrow td
//create top tooltip
var row = document.createElement('tr');
var cell = document.createElement('td');
cell.className="tooltipCorner_ul";
row.appendChild(cell);
var cell = document.createElement('td');
cell.className="tooltipBar_u";
row.appendChild(cell);
var cell = document.createElement('td');
cell.className="tooltipCorner_ur";
row.appendChild(cell);
tbb.appendChild(row);
//end create top tooltip
if(doNotCloseAfter) {
var imgClose = " | ');
else
var cell = document.createElement('td');
cell.setAttribute('colspan','3');
//create img
var nimg = document.createElement('img');
if(document.all)
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_jos.gif";
else
nimg.src="http://www.avocatnet.ro/images/pop-up/sageata_jos.png";
nimg.className="tooltipDownArrow";
nimg.id = "infoArrowD";
cell.appendChild(nimg);
row.appendChild(cell);
tbb.appendChild(row);
//end create down arrow td
tbl.appendChild(tbb);
newdiv.appendChild(tbl);
newdiv.className ="tooltipDiv";
//add tooltip to document
document.body.appendChild(newdiv);
//position tooltip
setPopupPosition(obj,newdiv,'infotip');
Effect.Appear(newdiv.id,{duration:.2});
//set fade out
if(!doNotCloseAfter) {
if(!hover)
globalTimeout = window.setTimeout('Effect.Fade(\'infotipX\', {duration:.3,from:1.0, to:0.0})',2500);
}
//========================================
}
function hideInfoPopup() {
if($('infotipX')) {
if($('tooltipX'))
document.body.removeChild($('tooltipX'));
document.body.removeChild($('infotipX'));
window.clearTimeout(globalTimeout);
}
}
function doCerereCons(cons) {
if($('cerereNume').value.length < 2) {
showToolTipFader('Completeaza numele.',$('cerereNume'));
$('cerereNume').focus();
return false;
}
if(!validateMail($('cerereEmail'))) {
return false;
}
if($('cerereIntrebare').value.length < 30) {
showToolTipFader('Cererea de consultanta trebuie sa contina minim 30 de caractere.',$('cerereIntrebare'));
$('cerereIntrebare').focus();
return false;
}
var cereEmail = $('cerereEmail').value;
var cereInt = $('cerereIntrebare').value;
var cereNume = $('cerereNume').value;
new Ajax.Request(pathWWW+'/getajax|handleCereriCons', {
method:'post',
parameters: {consID: cons, cEmail: cereEmail, cInt: cereInt, cNume: cereNume},
onSuccess: function(transport){
var response = transport.responseXML;
$('cerereFrm').innerHTML=" |
"; }, onFailure: function(){ } }); } function writeShopBooks(page) { if(!page) page = 0; new Ajax.Request(pathWWW + '/getajax|getPromotionForSlider?pageID=' + page, { onComplete: function(transport) { doCompleteWriteShopBooks(page, transport); } }); } function doCompleteWriteShopBooks(page, transport) { $('promotiiCarteContent').innerHTML = transport.responseText; page = page*1 + 1; setTimeout('writeShopBooks(' + page + ');', 4000); } function confirmContestKeyword() { var keyField = $('contestKeyword'); if(keyField.value.length < 3) { showToolTipFader('Cuvantul cheie trebuie sa contina minim 3 caractere.',keyField); keyField.focus(); return false; } var ok = confirm('Atentie: de la momentul la care veti completa cuvantul, \n acesta nu mai poate fi modificat / sters. \n Odata completat, cuvantul introdus de dumneavoastra\n este cel cu care veti participa la concurs.\n OK pentru a continua, Cancel pentru a reveni'); if(ok==true) document.contestKeywordFrm.submit(); else return false; } function getFriendsList(inObj) { inObj.show(); inObj.innerHTML = ' se incarca...';
new Ajax.Request(pathWWW+'/getajax|userFriends', {
method:'post',
onSuccess: function(transport){
var response = transport.responseText;
inObj.innerHTML = response;
},
onFailure: function(){}
});
}
function stickyFloat(id) {
var el= $(id);
var obH = el.getHeight();
var obW = el.getWidth();
var dH = document.body.clientHeight;
var dW = document.body.clientWidth;
var sT = document.documentElement.scrollTop;
var wW = document.all ? document.documentElement.clientWidth : window.innerWidth;
var wH = document.all ? document.documentElement.clientHeight : window.innerHeight;
//alert("H: "+obH+" W:"+obW+"\n"+"DH: "+dH+"DW: "+dW+"\nsT: "+sT+"\n"+"wH: "+wH+" wW:"+wW);
el.centru = function(how) {
if(dW >= obW)
el.style.left = ((dW-obW)/2)+"px";
else
el.style.left = 0+"px";
if (typeof document.body.style.maxHeight == "undefined") {
switch(how) {
case 'sus':
el.style.top = sT+"px";
break;
case 'jos':
el.style.top = (sT+wH-obH)-5+"px";
break;
case 'mijloc':
el.style.top = (sT+wH-obH)-(wH/2)+"px";
break;
default:
el.style.top = sT+"px";
break;
}
}
}
el.show();
return el;
}
startList = function() {
if($('navCont')) {
$("navCont").childElements().each( function(s) {
s.observe("mouseover", function() {
var sChild = this.childElements();
sChild.each( function(f) {
f.style.display="block";
});
if(sChild.length >1)
this.className = "navContActiv";
});
s.observe("mouseout", function() {
s.className = "";
this.childElements().each( function(f) {
f.style.display="";
});
});
});
}
}
window.onload=startList;
avServOut = function(sID) { $('d'+sID).removeClassName('over'); }
avServOver = function(sID) { $('d'+sID).addClassName('over'); }
avServClick = function(sID,credit) {
if($('s'+sID).value == 1) {
creditServicii -= parseInt(credit);
creditRest += parseInt(credit);
$('s'+sID).value = 0;
$('d'+sID).removeClassName('on');
} else {
creditServicii += parseInt(credit);
creditRest -= parseInt(credit);
if(creditRest < 0) {
showToolTipFader('Credit insuficient',$('d'+sID));
creditServicii -= parseInt(credit);
creditRest += parseInt(credit)
return false;
}
$('s'+sID).value = 1;
$('d'+sID).addClassName('on');
}
$('totalCrediteServicii').update(creditServicii);
$('restCreditServicii').update(creditRest);
}
checkServicePurchaseFrm = function() { if(creditServicii == 0) showToolTipFader('Selectati unul dintre serviciile de mai sus',$('sAvServices')); else document.purchaseService.submit(); }
function delForumMessage(obj,messID) {
var texty = "";
new Ajax.Request(pathWWW+'/getajax|deleteForumPopupForm', {
method:'post',
parameters: {messageID: messID },
onSuccess: function(transport){
var response = transport.responseText;
texty = response;
showToolTipFader(texty,obj,2);
},
onFailure: function(){}
});
}
function delTopicMessage(obj,topID) {
var texty = "";
new Ajax.Request(pathWWW+'/getajax|deleteForumPopupFormTopic', {
method:'post',
parameters: {topicID: topID },
onSuccess: function(transport){
var response = transport.responseText;
texty = response;
showToolTipFader(texty,obj,2);
},
onFailure: function(){}
});
}
function doDelFrmTopicReason() {
if($('topicID')=="") {
alert('Nu exista id topic, contact pianistul');
return false;
}
var val = $RF('delReasonTopicFrm','delReasonTopic');
if(!val) {
alert('Selectati motiv');
return false;
}
if(val == 1 && $('motivText').value =='') {
alert('Completati motiv pentru "Alte motive" ');
return false;
}
$('delReasonTopicFrm').submit();
// window.location.reload();
}
function doDelFrmMessageReason() {
if($('messID')=="") {
alert('Nu exista id mesaj, contact pianistul');
return false;
}
var valz = $RF('delReasonFrm','delReason');
if(!valz) {
alert('Selectati motiv');
return false;
}
if(valz == 1 && $('motivText').value =='') {
alert('Completati motiv pentru "Alte motive" ');
return false;
}
$('delReasonFrm').submit();
// window.location.reload();
}
function $RF(el, radioGroup) {
if($(el).type && $(el).type.toLowerCase() == 'radio') {
var radioGroup = $(el).name;
var el = $(el).form;
} else if ($(el).tagName.toLowerCase() != 'form') {
return false;
}
var checked = $(el).getInputs('radio', radioGroup).find(
function(re) {return re.checked;}
);
return (checked) ? $F(checked) : null;
}
function sortThruFriends(obj) {
$('isOffline').removeClassName("activ");
$('isOnline').removeClassName("activ");
$('isOnOff').removeClassName("activ");
obj.addClassName("activ");
i=0;
if(obj.id == "isOnOff") {
$$("li.listFriendOn").each(function(s) { s.show() });
} else {
$$("li.listFriendOn").each(function(s) {
if(s.id == obj.id+"F") {
s.show();
} else {
s.hide();
}
});
}
}
function openMDetail(evt,usr) {
var ele = Event.element(evt);
var content ='';
switch(ele.className) {
case 'Mconsultant':
content = 'Consultantul lunii
Servicii Avocatnet.ro
Utilizatorul lunii
|