/** * */ function GetResults( divID) { var div = document.getElementById(divID); var form = document.forms["pollForm"]; var comment = document.getElementById('commentPoll'); var user_input = 0; var page = "https://www.euroavocatura.ro/xmlHttpRequest.php?sondaj=true&xml=true"; for ( i = 0 ; i < form.optionPoll.length ; i++) { if (form.optionPoll[i].checked) { user_input = form.optionPoll[i].value; } } if (user_input == 0) { alert ('Trebuie sa acorzi si un vot comentariului tau !'); return false; } var str1 = user_input; str1 = str1.replace(/&/g,"**am**"); str1 = str1.replace(/=/g,"**eq**"); str1 = str1.replace(/\+/g,"**pl**"); var str2 = comment.value; str2 = str2.replace(/&/g,"**am**"); str2 = str2.replace(/=/g,"**eq**"); str2 = str2.replace(/\+/g,"**pl**"); var stuff = "&option="+str1+"&comment="+str2; loadXMLPosDoc(page, stuff , div , null , null , 1); return false; } /** * */ function showInteresting(what , divID ) { var div = document.getElementById(divID); var page = "https://www.euroavocatura.ro/xmlHttpRequest.php?interesting=true&xml=true"; var stuff = "&what="+what; loadXMLPosDoc(page, stuff , div , null , null , 1); return false; } /** * */ function sendContactEmail () { var status = document.getElementById('contactStatus'); status.style.display = 'block'; // hide the success bar (incase this is a multi-email status.innerHTML='Se Trimite Email...'; var posName = document.getElementById('numeContact'); var posEmail = document.getElementById('emailContact'); var posRegard = document.getElementById('codeContact'); var posText = document.getElementById('textContact'); var posTitle = document.getElementById('titluContact'); var contactform = document.getElementById('contactForm'); var page = "https://www.euroavocatura.ro/xmlHttpRequest.php?contact=true&xml=true"; // convert (&, +, =) to string equivs. Needed so URL encoded POST won't choke. var str1 = posName.value; str1 = str1.replace(/&/g,"**am**"); str1 = str1.replace(/=/g,"**eq**"); str1 = str1.replace(/\+/g,"**pl**"); var str2 = posEmail.value; str2 = str2.replace(/&/g,"**am**"); str2 = str2.replace(/=/g,"**eq**"); str2 = str2.replace(/\+/g,"**pl**"); var str3 = posRegard.value; str3 = str3.replace(/&/g,"**am**"); str3 = str3.replace(/=/g,"**eq**"); str3 = str3.replace(/\+/g,"**pl**"); var str4 = posText.value; str4 = str4.replace(/&/g,"**am**"); str4 = str4.replace(/=/g,"**eq**"); str4 = str4.replace(/\+/g,"**pl**"); var str5 = posTitle.value; str5 = str5.replace(/&/g,"**am**"); str5 = str5.replace(/=/g,"**eq**"); str5 = str5.replace(/\+/g,"**pl**"); var stuff = "&posName="+str1+"&posEmail="+str2+"&posCode="+str3+"&posText="+str4+"&posTitle="+str5; loadXMLPosDoc(page,stuff ,status , contactform , contact , 0); } /** * */ function sendLinkEmail () { var status = document.getElementById('sendLinkStatus'); status.style.display = 'block'; // hide the success bar (incase this is a multi-email status.innerHTML='...'; var posName = document.getElementById('numeSendLink'); var posEmail = document.getElementById('emailSendLink'); //var posRegard = document.getElementById('codeContact'); var posText = document.getElementById('comentariuSendLink'); var posTitle = document.getElementById('titluSendLink'); var posLink = document.getElementById('currentLink'); var sendLinkForm = document.getElementById('sendLinkForm'); var page = "https://www.euroavocatura.ro/xmlHttpRequest.php?sendLink=true&xml=true"; // convert (&, +, =) to string equivs. Needed so URL encoded POST won't choke. var str1 = posName.value; str1 = str1.replace(/&/g,"**am**"); str1 = str1.replace(/=/g,"**eq**"); str1 = str1.replace(/\+/g,"**pl**"); var str2 = posEmail.value; str2 = str2.replace(/&/g,"**am**"); str2 = str2.replace(/=/g,"**eq**"); str2 = str2.replace(/\+/g,"**pl**"); var str3 = posLink.value; str3 = str3.replace(/&/g,"**am**"); str3 = str3.replace(/=/g,"**eq**"); str3 = str3.replace(/\+/g,"**pl**"); var str4 = posText.value; str4 = str4.replace(/&/g,"**am**"); str4 = str4.replace(/=/g,"**eq**"); str4 = str4.replace(/\+/g,"**pl**"); var str5 = posTitle.value; str5 = str5.replace(/&/g,"**am**"); str5 = str5.replace(/=/g,"**eq**"); str5 = str5.replace(/\+/g,"**pl**"); var stuff = "&posName="+str1+"&posEmail="+str2+"&posLink="+str3+"&posText="+str4+"&posTitle="+str5; loadXMLPosDoc(page,stuff , status , sendLinkForm , sendLink , 0 ); } /** * */ function addComment () { var status = document.getElementById('addComStatus'); status.style.display = 'block'; // hide the success bar (incase this is a multi-email status.innerHTML='...'; var posName = document.getElementById('numeAddCom'); var posEmail = document.getElementById('emailAddCom'); var posRegard = document.getElementById('codeCom'); var posText = document.getElementById('comentariuAdd'); var posTitle = document.getElementById('titluAddCom'); var posItem = document.getElementById('idItem'); var posType = document.getElementById('itemType'); var addComForm = document.getElementById('addComForm'); var page = "https://www.euroavocatura.ro/xmlHttpRequest.php?addCom=true&xml=true"; // convert (&, +, =) to string equivs. Needed so URL encoded POST won't choke. var str1 = posName.value; str1 = str1.replace(/&/g,"**am**"); str1 = str1.replace(/=/g,"**eq**"); str1 = str1.replace(/\+/g,"**pl**"); var str2 = posEmail.value; str2 = str2.replace(/&/g,"**am**"); str2 = str2.replace(/=/g,"**eq**"); str2 = str2.replace(/\+/g,"**pl**"); var str3 = posRegard.value; str3 = str3.replace(/&/g,"**am**"); str3 = str3.replace(/=/g,"**eq**"); str3 = str3.replace(/\+/g,"**pl**"); var str4 = posText.value; str4 = str4.replace(/&/g,"**am**"); str4 = str4.replace(/=/g,"**eq**"); str4 = str4.replace(/\+/g,"**pl**"); var str5 = posTitle.value; str5 = str5.replace(/&/g,"**am**"); str5 = str5.replace(/=/g,"**eq**"); str5 = str5.replace(/\+/g,"**pl**"); var str6 = posItem.value; str6 = str6.replace(/&/g,"**am**"); str6 = str6.replace(/=/g,"**eq**"); str6 = str6.replace(/\+/g,"**pl**"); var str7 = posType.value; str7 = str7.replace(/&/g,"**am**"); str7 = str7.replace(/=/g,"**eq**"); str7 = str7.replace(/\+/g,"**pl**"); var stuff = "&posName="+str1+"&posEmail="+str2+"&posCode="+str3+"&posText="+str4+"&posTitle="+str5+"&idItem="+str6+"&itemType="+str7; loadXMLPosDoc(page,stuff , status , addComForm , comment , 0); } /** * */ function processPosChange( statusName , form , divToSlide , poll) { // page loaded "complete" if (getReady() == 4) { // page is "OK" if (getStaus() == 200) { if ( grabPosXML('status') == 'NOTOK' ) { if ( poll == 2) { //do nothing for now } else if ( poll == 1) { statusName.innerHTML=grabPosXML("confirmation"); } else if (poll == 0) { statusName.style.display = 'block'; statusName.innerHTML = ''+grabPosXML("confirmation")+''; } } else if ( grabPosXML('status') == 'OK' ) { if ( poll == 2) { //do nothing for now } else if ( poll == 1) { statusName.innerHTML=grabPosXML("confirmation"); } else if (poll == 0) { statusName.style.display = "block"; statusName.innerHTML = ''+grabPosXML("confirmation")+''; var inputs = form.getElementsByTagName('input'); var inputsLen = inputs.length; var tAreas = form.getElementsByTagName('textarea'); var tAreasLen = tAreas.length; // Now Hijack the form elements for ( i=0;i wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}} /* Simple AJAX Code-Kit (SACK) v1.6.1 */ /* �2005 Gregory Wild-Smith */ /* www.twilightuniverse.com */ /* Software licenced under a modified X11 licence, see documentation or authors website for more details */ function sack(file) { this.xmlhttp = null; this.resetData = function() { this.method = "POST"; this.queryStringSeparator = "?"; this.argumentSeparator = "&"; this.URLString = ""; this.encodeURIString = true; this.execute = false; this.element = null; this.elementObj = null; this.requestFile = file; this.vars = new Object(); this.responseStatus = new Array(2); }; this.resetFunctions = function() { this.onLoading = function() { }; this.onLoaded = function() { }; this.onInteractive = function() { }; this.onCompletion = function() { }; this.onError = function() { }; this.onFail = function() { }; }; this.reset = function() { this.resetFunctions(); this.resetData(); }; this.createAJAX = function() { try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e1) { try { this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { this.xmlhttp = null; } } if (! this.xmlhttp) { if (typeof XMLHttpRequest != "undefined") { this.xmlhttp = new XMLHttpRequest(); } else { this.failed = true; } } }; this.setVar = function(name, value){ this.vars[name] = Array(value, false); }; this.encVar = function(name, value, returnvars) { if (true == returnvars) { return Array(encodeURIComponent(name), encodeURIComponent(value)); } else { this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true); } } this.processURLString = function(string, encode) { encoded = encodeURIComponent(this.argumentSeparator); regexp = new RegExp(this.argumentSeparator + "|" + encoded); varArray = string.split(regexp); for (i = 0; i < varArray.length; i++){ urlVars = varArray[i].split("="); if (true == encode){ this.encVar(urlVars[0], urlVars[1]); } else { this.setVar(urlVars[0], urlVars[1]); } } } this.createURLString = function(urlstring) { if (this.encodeURIString && this.URLString.length) { this.processURLString(this.URLString, true); } if (urlstring) { if (this.URLString.length) { this.URLString += this.argumentSeparator + urlstring; } else { this.URLString = urlstring; } } // prevents caching of URLString this.setVar("rndval", new Date().getTime()); urlstringtemp = new Array(); for (key in this.vars) { if (false == this.vars[key][1] && true == this.encodeURIString) { encoded = this.encVar(key, this.vars[key][0], true); delete this.vars[key]; this.vars[encoded[0]] = Array(encoded[1], true); key = encoded[0]; } urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0]; } if (urlstring){ this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator); } else { this.URLString += urlstringtemp.join(this.argumentSeparator); } } this.runResponse = function() { eval(this.response); } this.runAJAX = function(urlstring) { if (this.failed) { this.onFail(); } else { this.createURLString(urlstring); if (this.element) { this.elementObj = document.getElementById(this.element); } if (this.xmlhttp) { var self = this; if (this.method == "GET") { totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString; this.xmlhttp.open(this.method, totalurlstring, true); } else { this.xmlhttp.open(this.method, this.requestFile, true); try { this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") } catch (e) { } } this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState) { case 1: self.onLoading(); break; case 2: self.onLoaded(); break; case 3: self.onInteractive(); break; case 4: self.response = self.xmlhttp.responseText; self.responseXML = self.xmlhttp.responseXML; self.responseStatus[0] = self.xmlhttp.status; self.responseStatus[1] = self.xmlhttp.statusText; if (self.execute) { self.runResponse(); } if (self.elementObj) { elemNodeName = self.elementObj.nodeName; elemNodeName.toLowerCase(); if (elemNodeName == "input" || elemNodeName == "select" || elemNodeName == "option" || elemNodeName == "textarea") { self.elementObj.value = self.response; } else { self.elementObj.innerHTML = self.response; } } if (self.responseStatus[0] == "200") { self.onCompletion(); } else { self.onError(); } self.URLString = ""; break; } }; this.xmlhttp.send(this.URLString); } } }; this.reset(); this.createAJAX(); } /** * */ /************************************************************************************************************ (C) www.dhtmlgoodies.com, April 2006 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var ajaxBox_offsetX = 0; var ajaxBox_offsetY = 0; var ajax_list_externalFile = "https://www.euroavocatura.ro/ajax-get.php"; // Path to external file var minimumLettersBeforeLookup = 1; // Number of letters entered before a lookup is performed. var ajax_list_objects = new Array(); var ajax_list_cachedLists = new Array(); var ajax_list_activeInput = false; var ajax_list_activeItem; var ajax_list_optionDivFirstItem = false; var ajax_list_currentLetters = new Array(); var ajax_optionDiv = false; var ajax_optionDiv_iframe = false; var ajax_list_MSIE = false; if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)ajax_list_MSIE=true; var currentListIndex = 0; function ajax_getTopPos(inputObj) { var returnValue = inputObj.offsetTop; while((inputObj = inputObj.offsetParent) != null){ returnValue += inputObj.offsetTop; } return returnValue; } function ajax_list_cancelEvent() { return false; } function ajax_getLeftPos(inputObj) { var returnValue = inputObj.offsetLeft; while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft; return returnValue; } function ajax_option_setValue(e,inputObj) { if(!inputObj)inputObj=this; var tmpValue = inputObj.innerHTML; if(ajax_list_MSIE)tmpValue = inputObj.innerText;else tmpValue = inputObj.textContent; if(!tmpValue)tmpValue = inputObj.innerHTML; ajax_list_activeInput.value = tmpValue; if(document.getElementById(ajax_list_activeInput.name + '_hidden'))document.getElementById(ajax_list_activeInput.name + '_hidden').value = inputObj.id; ajax_options_hide(); } function ajax_options_hide() { if(ajax_optionDiv)ajax_optionDiv.style.display='none'; if(ajax_optionDiv_iframe)ajax_optionDiv_iframe.style.display='none'; } function ajax_options_rollOverActiveItem(item,fromKeyBoard) { if(ajax_list_activeItem)ajax_list_activeItem.className='optionDivA'; item.className='optionDivSelected'; ajax_list_activeItem = item; if(fromKeyBoard){ if(ajax_list_activeItem.offsetTop>ajax_optionDiv.offsetHeight){ ajax_optionDiv.scrollTop = ajax_list_activeItem.offsetTop - ajax_optionDiv.offsetHeight + ajax_list_activeItem.offsetHeight + 2 ; } if(ajax_list_activeItem.offsetTop= 0; i = i - 1){ item = listEvents[i]; if(item[0].removeEventListener){ item[0].removeEventListener(item[1], item[2], item[3]); }; /* From this point on we need the event names to be prefixed with 'on" */ if(item[1].substring(0, 2) != "on"){ item[1] = "on" + item[1]; }; if(item[0].detachEvent){ item[0].detachEvent(item[1], item[2]); }; item[0][item[1]] = null; }; } }; }(); var popup; function popUP() { var hlpProp = "toolbar=no,titlebar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=620,height=457"; if (popup) { if (popup.closed==false) { popup.close(); } } popup = window.open( "https://www.euroavocatura.ro/comments.php","Comentarii",hlpProp); //popup.focus(); } addEvent(window, 'load',ajaxContact, false); addEvent(window,'unload',EventCache.flush, false);