nav=navigator.appName.indexOf("Microsoft")!=-1?1:2;function setCookie(name,thevalue){var theDate=new Date();var oneYearLater=new Date(theDate.getTime()+31536000000);var expiryDate=oneYearLater.toGMTString();document.cookie=name+'='+thevalue+';path=/;expires='+expiryDate;}
function closeAllObjFavBoxes(){for(i=0;i<50;i++){if(document.getElementById('boxFav'+i)){document.getElementById('boxFav'+i).style.display='none';}}}
function checkconditions(strField,str){var formName='frmSearch';var frmSeach=document.getElementById(formName);if(document.getElementById(strField).value==str){alert($__l.print_err);return false;}else{var selectName='servicefieldid';var select=document.getElementById(selectName);subcategoryid=select.value;if(subcategoryid==0){alert($__l.print_err2);return false;}else{show_generalloading(1);subcategoryname=document.getElementById('servicefieldname').value;if(subcategoryid==""){subcategoryid=0;}
address='list-services/'+subcategoryid+'-'+subcategoryname.replace(/[^a-z0-9]+/ig,'-')+'-[in]-'+document.getElementById('textfieldid').value+'?srq';window.location=address;return false;}}}
function str_replace(search,replace,subject,count){f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0;}
for(i=0,sl=s.length;i<sl;i++){if(s[i]===''){continue;}
for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=(temp).split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length;}}}
return sa?s:s[0];}
function popup(url,name,width,height,scroll,modal,resizable){width=Math.min(screen.availWidth,width);height=Math.min(screen.availHeight-40,height);var poz_x=(screen.availWidth-width)/2;var poz_y=(screen.availHeight-height-30)/2;newwin=window.open(url,name,'scrollbars='+scroll+', menubar=no, width='+width+', height='+height+', resizable=no,toolbar=no, left='+poz_x+', top='+poz_y+', location=no, status=no');if(modal){popInt=setInterval(function(n){if(typeof(newwin.name)=="string"){if(newwin.document.body){openerfocus=function(){if(typeof(newwin.name)=="string"){newwin.focus();}else{document.body.onfocus=null;}}
document.body.onfocus=openerfocus;newwin.window.document.body.onunload=function(){}
newwin.focus();clearInterval(popInt);}}else{clearInterval(popInt)}},1)}}
function changeButtonAddServicesStyle(care,focus,color){if(focus==1){if(care==1){if(document.getElementById('button_remove')){document.getElementById('button_remove').style.borderColor=color;}
if(document.getElementById('button_remove_all')){document.getElementById('button_remove_all').style.borderColor=color;}
if(document.getElementById('button_reset')){document.getElementById('button_reset').style.borderColor=color;}}else{if(document.getElementById('button_add')){document.getElementById('button_add').style.borderColor=color;}}}else{if(care==1){if(document.getElementById('button_remove')){document.getElementById('button_remove').style.borderColor='';}
if(document.getElementById('button_remove_all')){document.getElementById('button_remove_all').style.borderColor='';}
if(document.getElementById('button_reset')){document.getElementById('button_reset').style.borderColor='';}}else{if(document.getElementById('button_add')){document.getElementById('button_add').style.borderColor='';}}}}
function clickOnMore(){if(document.getElementById('popMore')){document.getElementById('popMore').style.display='';}}
function clickOnMoreOption(option_value,option_id){document.getElementById('servicefieldname').value=option_value;document.getElementById('servicefieldid').value=option_id;document.getElementById('popMore').style.display='none';}
function escape_string(str){return str.replace(/['\"]/g,"");}
function ajax_pooling(id_survey,id_response,elementdeschimbat,viewResults){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(id_survey){var queryString=queryString+"id_survey="+id_survey;}
if(id_response){var queryString=queryString+"&id_response="+id_response;}
if(viewResults){var queryString=queryString+"&viewResults="+viewResults;}
ajaxRequest.open("GET","./util/ajax_pool.php?"+queryString,true);ajaxRequest.send(null);}
function pingosearchlogin(firsttime,elementdeschimbat){if(document.getElementById('email_login')){var username=document.getElementById('email_login').value;}else{var username='';}
if(document.getElementById('pass_logare')){var pass=document.getElementById('pass_logare').value;}else{var pass='';}
var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){finalstuff=ajaxRequest.responseText;finalstuff=str_replace('\\"','"',finalstuff);if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=finalstuff;}
document.getElementById(elementdeschimbat).innerHTML=finalstuff;}}
if(username){var queryString=queryString+"username="+username;}
if(pass){var queryString=queryString+"&pass="+pass;}
if(firsttime){var queryString=queryString+"&firsttime="+firsttime;}
queryString=queryString+"&sid="+Math.random();ajaxRequest.open("GET","./pingosearchlogin.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_charitySelect(id_user,id_charity,elementdeschimbat){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;Effect.BlindDown(elementdeschimbat,{delay:0.0});Effect.BlindUp(elementdeschimbat,{delay:4.0});}}
if(id_user){var queryString=queryString+"id_user="+id_user;}
if(id_charity){var queryString=queryString+"&id_charity="+id_charity;}
ajaxRequest.open("GET","./util/ajax_charitySelect.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_thumbing(id_rating,up,down,elementdeschimbat){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(id_rating){var queryString=queryString+"id_rating="+id_rating;}
if(up){var queryString=queryString+"&up="+up;}
if(down){var queryString=queryString+"&down="+down;}
ajaxRequest.open("GET","./util/ajax_thumbing.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_voting(id_business,score,elementdeschimbat,completeurl){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(id_business){var queryString=queryString+"id_business="+id_business;}
if(score){var queryString=queryString+"&score="+score;}
ajaxRequest.open("GET",completeurl+"util/ajax_voting.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_voting_objects(id_object,score,elementdeschimbat,completeurl){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(id_object){var queryString=queryString+"id_object="+id_object;}
if(score){var queryString=queryString+"&score="+score;}
ajaxRequest.open("GET",completeurl+"util/ajax_voting_objects.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_nick(nickname,elementdeschimbat,completeurl){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(nickname){var queryString=queryString+"nickname="+nickname;}
ajaxRequest.open("GET",completeurl+"util/ajax_verifyNick.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_report_abuse(id_object,elementdeschimbat,completeurl){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(id_object){var queryString=queryString+"id_object="+id_object;}
ajaxRequest.open("GET",completeurl+"util/ajax_report_abuse.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_favorites(id_business,id_user,deletethis,elementdeschimbat,sequenceBox,id_object){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;if(document.getElementById('rowtohide'+id_business)&&deletethis==1){document.getElementById('rowtohide'+id_business).style.display='none';}}}
if(id_business){var queryString=queryString+"id_business="+id_business;}
if(deletethis){var queryString=queryString+"&deletethis="+deletethis;}
if(id_user){var queryString=queryString+"&id_user="+id_user;}
if(sequenceBox){var queryString=queryString+"&sequenceBox="+sequenceBox;}
if(id_object){var queryString=queryString+"&id_object="+id_object;}
ajaxRequest.open("GET","./util/ajax_favorites.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_showTabsIndex(selectedTab,elementdeschimbat){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(selectedTab){var queryString=queryString+"selectedTab="+selectedTab;}
ajaxRequest.open("GET","./util/ajax_showTabsIndex.php?"+queryString,true);ajaxRequest.send(null);}
function TooltipSelectedService(id_service,elementdeschimbat){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(id_service){var queryString=queryString+"id_service="+id_service;}
ajaxRequest.open("GET","./util/ajax_showSelectServiceAliases.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_showSelectIndex(selectedTab,elementdeschimbat){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
if(selectedTab){var queryString=queryString+"selectedTab="+selectedTab;}
ajaxRequest.open("GET","./util/ajax_showSelectIndex.php?"+queryString,true);ajaxRequest.send(null);}
function ajax_validindex(interogationstring){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById('validindex')){if(ajaxRequest.responseText=="no"){document.getElementById('validindex').value=0;}else if(ajaxRequest.responseText=="ok"){document.getElementById('validindex').value=1;}}}}
ajaxRequest.open("GET","util/ajax_verifyINDEX.php?interogationstring="+interogationstring,true);ajaxRequest.send(null);}
function ajax_objectsFilterSubcat(elementdeschimbat,category_id){if(document.getElementById(elementdeschimbat)){document.getElementById(elementdeschimbat).innerHTML="<font color=grey><i>"+$__l.please_wait+"</i></font>";}
if(document.getElementById('buttonNext')){document.getElementById('buttonNext').disabled='true';}
var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
ajaxRequest.open("GET","util/ajax_objectsFilterSubcat.php?category_id="+category_id,true);ajaxRequest.send(null);}
function ajax_statusRequestAnswer(idAnswer,elementdeschimbat,godo){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(ajaxRequest.responseText=="hiddenbox"){arraystringHiddenBoxes.push('bigboxRequestAnswer'+idAnswer);document.getElementById('buttonRequestAnswer'+idAnswer).style.display='none';parent.revealAllHidden('hiddeonly');document.getElementById(elementdeschimbat).innerHTML='<img src="img/icon_answer_notok.png" align="absmiddle"> '+$__l.rejected;}else{document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}}
ajaxRequest.open("GET","util/ajax_statusRequestAnswer.php?idAnswer="+idAnswer+"&godo="+godo,true);ajaxRequest.send(null);}
function ajax_verifyCUPON(idCupon,elementdeschimbat,emailCupon){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;if(typeof findFinalPrice=="function"){findFinalPrice(1);}}}
ajaxRequest.open("GET","util/ajax_verifyCUPON.php?emailCupon="+emailCupon+"&elementdeschimbat="+elementdeschimbat+"&idCupon="+idCupon,true);ajaxRequest.send(null);}
function ajax_address(elementdeschimbat,address,zipcode,show_provincename,show_cityname,editing){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;if(typeof findFinalPrice=="function"){findFinalPrice(1);}}}
ajaxRequest.open("GET","util/ajax_address.php?address="+address+"&elementdeschimbat="+elementdeschimbat+"&zipcode="+zipcode+'&editing='+editing+'&show_provincename='+show_provincename+'&show_cityname='+show_cityname,true);ajaxRequest.send(null);}
function ajax_tooltip(elementdeschimbat,tooltipText){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){document.getElementById(elementdeschimbat).innerHTML=ajaxRequest.responseText;}}
ajaxRequest.open("GET","util/ajax_tooltip.php?tooltipText="+tooltipText,true);ajaxRequest.send(null);}
function ajax_validzip(ajaxzipcode){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
nogoodzip=0;if(ajaxRequest.responseText=="no"){nogoodzip=1;document.getElementById('zipok').style.display='none';document.getElementById('zipno').style.display='';}else if(ajaxRequest.responseText=="ok"){nogoodzip=0;document.getElementById('zipok').style.display='';document.getElementById('zipno').style.display='none';if(document.getElementById('zipcode')){PostBusinessMap(document.getElementById('zipcode').value);}
if(document.getElementById('zip_reg')){PostBusinessMap(document.getElementById('zip_reg').value);}
if(document.getElementById('toappear1')){document.getElementById('toappear2').style.display='';document.getElementById('toappear3').style.display='';document.getElementById('toappear4').style.display='';document.getElementById('toappear5').style.display='';document.getElementById('toappear6').style.display='';}}}}
ajaxRequest.open("GET","util/ajax_verifyZIP.php?string_zip="+ajaxzipcode,true);ajaxRequest.send(null);}
function ajaxLoginFacebook(facebookid,pinbudid,facebookEmail,facebookName,facebookSex,facebookPic,facebookUsername,facebookAbout_me,refreshURL){var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText+" ...";}
if(ajaxRequest.responseText=="go"){document.location.href=refreshURL;}}}
ajaxRequest.open("GET","util/ajaxLoginFacebook.php?facebookid="+facebookid+"&pinbudid="+pinbudid+"&facebookEmail="+facebookEmail+"&facebookName="+facebookName+"&facebookSex="+facebookSex+"&facebookPic="+facebookPic+"&facebookUsername="+facebookUsername+"&facebookAbout_me="+facebookAbout_me,true);ajaxRequest.send(null);}
function ajax_validzipmodify(ajaxzipcode){var addressFound=0;GeoCode(document.getElementById('address_reg').value+','+$country_name,function(shapeLayer,findResults,places,moreResults,errorMsg){if(places!=null&&places.length==1&&places[0].Precision==0){document.getElementById('latitudeByAddress').value=places[0].LatLong.Latitude;document.getElementById('longitudeByAddress').value=places[0].LatLong.Longitude;GeocodeCallback(shapeLayer,findResults,places,moreResults,errorMsg);addressFound=1;}
var ajaxRequest;var queryString="";try{ajaxRequest=new XMLHttpRequest();}catch(e){try{ajaxRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Your browser broke!");return false;}}}
ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(document.getElementById("ajax_feed_verify")){document.getElementById("ajax_feed_verify").value=ajaxRequest.responseText;}
responseTemp=ajaxRequest.responseText.split('~');nogoodzip=0;if(responseTemp[0]=="no"){if(document.getElementById('forModifAccountZip')){document.getElementById('saveButtonBox').innerHTML=saveButtonBoxDiss;ajax_address('editingAddressBox',document.getElementById('address_reg').value,document.getElementById('zipcode').value,responseTemp[2],responseTemp[3],1);}
nogoodzip=1;document.getElementById('zipok').style.display='none';document.getElementById('zipno').style.display='';}else if(responseTemp[0]=="ok"){if(document.getElementById('forModifAccountZip')){document.getElementById('saveButtonBox').innerHTML=saveButtonBox;ajax_address('editingAddressBox',document.getElementById('address_reg').value,document.getElementById('zipcode').value,responseTemp[2],responseTemp[3],0);}
nogoodzip=0;document.getElementById('zipok').style.display='';document.getElementById('zipno').style.display='none';if(!addressFound){if(document.getElementById('zipcode')){PostBusinessMap(document.getElementById('zipcode').value);}
if(document.getElementById('zip_reg')){PostBusinessMap(document.getElementById('zip_reg').value);}}}}}
ajaxRequest.open("GET","util/ajax_verifyZIPmodify.php?string_zip="+ajaxzipcode,true);ajaxRequest.send(null);},0);}
function strip_tags(str){return str.replace(/<\/?[^>]+>/gi,"");}
function limit_input_string_size(id_input_source,id_input_info,str_size,info_string,stripingtags){var inputSourceFull=document.getElementById(id_input_source).value;if(stripingtags==1){var inputSource=strip_tags(inputSourceFull);}else{var inputSource=inputSourceFull;}
if((str_size-inputSource.length)>=0){if(document.getElementById(id_input_info)){document.getElementById(id_input_info).value=(str_size-inputSource.length)+info_string;}}else{document.getElementById(id_input_source).value=inputSource.substr(0,str_size);document.getElementById(id_input_info).value='0'+info_string+'/Text truncated';if(document.getElementById('truncated_inputs')){document.getElementById('truncated_inputs').value++;}}}
function verif_form_zipcode(){ajax_validzip(document.getElementById('zipcode').value);if(document.getElementById('zipcode').value==''){return false;}}
function addnewtag(maxtagslimit,maxlimiterrtext){tagstringelement=document.getElementById('newTagField').value;array_tag=tagstringelement.split(',');for(i=0;i<array_tag.length;i++){if(realcounttag<maxtagslimit){document.getElementById('new_tag'+addnew).innerHTML='<span id="tohide'+addnew+'" style="word-wrap: break-word;line-hight;line-height: 25px;"><a onclick=\'document.getElementById("tohide'+addnew+'").style.display="none";document.getElementById("tohidehidden'+addnew+'").value="";realcounttag=(realcounttag-1);\' style=cursor:pointer;><img src=\"img/delete-tag.png\" style=\"vertical-align:middle;margin-right:5px;\" title=\"Delete\" /></a>'+array_tag[i]+'<input type="hidden" name="valid_reg_tag'+addnew+'" id="tohidehidden'+addnew+'" value="'+array_tag[i].replace('"','&quot;')+'" /> </span><span id="new_tag'+(addnew+1)+'"></span>';addnew=(addnew+1);realcounttag=(realcounttag+1);maxcounttag=(maxcounttag+1);}else{if(!maxlimiterrtext){maxlimiterrtext=$__l.tags_limit_reached;}
alert(maxlimiterrtext.replace('%s',maxtagslimit));}}
document.getElementById('newTagField').value='';}
function rand(min,max){var argc=arguments.length;if(argc==0){min=0;max=2147483647;}else if(argc==1){throw new Error('Warning: rand() expects exactly 2 parameters, 1 given');}
return Math.floor(Math.random()*(max-min+1))+min;}
function urlencode(str){str=escape(str);str=str_replace('+','%2B',str);str=str_replace('%20','+',str);str=str_replace('*','%2A',str);str=str_replace('/','%2F',str);str=str_replace('@','%40',str);return str;}
function urldecode(str){str=str_replace('+',' ',str);str=unescape(str);return str;}
var v_array=[8,35,36,37,39,46,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105];Array.prototype.in_array=function(p_val){for(var i=0,l=this.length;i<l;i++){if(this[i]==p_val){return true;}}
return false;}
var email_exp=new RegExp("^[\\w\\+-]+(\\.[\\w\\+-]+)?@((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\|([\\w\\+-]+\\.[a-zA-Z0-9\.]{2,}))$");var cnp_exp=new RegExp("^[128][0-9]\{12\}$");function valideaza_email(sName,mesaj){if(document.getElementsByName(sName)){var objEmail=document.getElementsByName(sName);for(i=0;i<objEmail.length;i++){if(objEmail[i].value.replace(/^\s+|\s+$/,'')==''||(!email_exp.test(objEmail[i].value))){mesaj_eroare=mesaj_eroare+mesaj+' \n';}}}}
function valideaza_cnp(sName,mesaj){if(document.getElementsByName(sName)){var objCNP=document.getElementsByName(sName);for(i=0;i<objCNP.length;i++){if(objCNP[i].value.replace(/^\s+|\s+$/,'')==''||(!email_exp.test(objCNP[i].value))){mesaj_eroare=mesaj_eroare+mesaj+' \n';}}}}
function valideaza_text(sName,mesaj){if(document.getElementsByName(sName)){var objTXT=document.getElementsByName(sName);for(i=0;i<objTXT.length;i++){if(objTXT[i].value.replace(/^\s+|\s+$/,'')==''){mesaj_eroare=mesaj_eroare+mesaj+' \n';}}}}
function valideaza_radio(sName,mesaj){if(document.getElementsByName(sName)){var objRadio=document.getElementsByName(sName);for(i=0;i<objRadio.length;i++){if(objRadio[i].checked){}else{mesaj_eroare=mesaj_eroare+mesaj+' \n';}}}}
function valideaza_bifa(sName,mesaj){if(document.getElementsByName(sName)){var objCheck=document.getElementsByName(sName);for(i=0;i<objCheck.length;i++){if(objCheck[i].checked==true){}else{mesaj_eroare=mesaj_eroare+mesaj+' \n';}}}}
function verif_dblk(maxlimit,list_from,list_to){if(document.getElementById('emailuri_alese').options.length>=maxlimit){alert($__l.services_max_reached.replace('%s',maxlimit));}else{schimba_opt(list_from,list_to);}}
function verif_dblk_v2(maxlimit,list_to,show,value){verifexistence=0;for(k=0;k<list_to.options.length;k++){if(list_to[k]['value']==value){verifexistence=verifexistence+1;}}
if(verifexistence==0){if(document.getElementById('emailuri_alese').options.length>=maxlimit){alert($__l.services_max_reached.replace('%s',maxlimit));}else{var new_opt=new Option();var props=["text","value"];new_opt["text"]=show;new_opt["value"]=value;i=list_to.options.length;try{list_to.add(new_opt,null);}
catch(ex){list_to.add(new_opt,i);}}}}
function schimba_opt(list_from,list_to){if(list_from.selectedIndex!=-1){var old_opt=list_from.options[list_from.selectedIndex];var new_opt=new Option();var props=["text","value"];for(var i=0;i<props.length;i++){new_opt[props[i]]=old_opt[props[i]];}
i=list_to.options.length;list_from.remove(list_from.selectedIndex);try{list_to.add(new_opt,null);}
catch(ex){list_to.add(new_opt,i);}}
list_from.focus();list_to.focus();}
function schimba_all_opt(list_from,list_to){for(var j=list_from.options.length-1;j>=0;j--){var old_opt=list_from.options[j];var new_opt=new Option();var props=["text","value"];for(var i=0;i<props.length;i++){new_opt[props[i]]=old_opt[props[i]];}
i=list_to.options.length;list_from.remove(j);try{list_to.add(new_opt,null);}
catch(ex){list_to.add(new_opt,i);}}
list_from.focus();list_to.focus();}
dublu_click=0;function dubluclick(){dublu_click++;if(dublu_click>=5){popup('rights.php','drepturi',2000,2000,1,0,0);}}
function show_generalloading(yesno){if(yesno==1){if(document.getElementById('generalloading')){document.getElementById('generalloading').style.display='';}}
if(yesno==0){if(document.getElementById('generalloading')){document.getElementById('generalloading').style.display='none';}}}
var persistclose=0;var startX=0;var startY=438;var verticalpos="fromtop";function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function get_cookie(Name){var search=Name+"=";var returnvalue="";if(document.cookie.length>0){offset=document.cookie.indexOf(search)
if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;returnvalue=unescape(document.cookie.substring(offset,end));}}
return returnvalue;}
function closebar(){if(persistclose)
document.cookie="remainclosed=1";if(document.getElementById("floatmap"))
document.getElementById("floatmap").style.visibility="hidden";}
function staticbar(){if(document.getElementById("floatmap")){barheight=document.getElementById("floatmap").offsetHeight;var ns=(navigator.appName.indexOf("Netscape")!=-1)||window.opera;var d=document;function ml(id){var el=d.getElementById(id);if(!persistclose||persistclose&&get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};el.x=startX;if(verticalpos=="fromtop")
el.y=startY;else{el.y=ns?pageYOffset+innerHeight:iecompattest().scrollTop+iecompattest().clientHeight;el.y-=startY;}
return el;}
window.stayTopLeft=function(){if(verticalpos=="floatmap"){var pY=ns?pageYOffset:iecompattest().scrollTop;ftlObj.y+=(pY+startY-ftlObj.y)/8;}else{var pY=ns?pageYOffset+innerHeight-barheight:iecompattest().scrollTop+iecompattest().clientHeight-barheight;ftlObj.y+=(pY-startY-ftlObj.y)/8;}
ftlObj.sP(ftlObj.x,ftlObj.y);setTimeout("stayTopLeft()",20);}
ftlObj=ml("floatmap");stayTopLeft();}}
if(window.addEventListener)
window.addEventListener("load",staticbar,false)
else if(window.attachEvent)
window.attachEvent("onload",staticbar)
else if(document.getElementById)
window.onload=staticbar
function doHighlight(bodyText,searchTerm,highlightStartTag,highlightEndTag){if((!highlightStartTag)||(!highlightEndTag)){highlightStartTag="<font style='color:blue; background-color:yellow;'>";highlightEndTag="</font>";}
var newText="";var i=-1;var lcSearchTerm=searchTerm.toLowerCase();var lcBodyText=bodyText.toLowerCase();while(bodyText.length>0){i=lcBodyText.indexOf(lcSearchTerm,i+1);if(i<0){newText+=bodyText;bodyText="";}else{if(bodyText.lastIndexOf(">",i)>=bodyText.lastIndexOf("<",i)){if(lcBodyText.lastIndexOf("/script>",i)>=lcBodyText.lastIndexOf("<script",i)){newText+=bodyText.substring(0,i)+highlightStartTag+bodyText.substr(i,searchTerm.length)+highlightEndTag;bodyText=bodyText.substr(i+searchTerm.length);lcBodyText=bodyText.toLowerCase();i=-1;}}}}
return newText;}
function highlightSearchTerms(searchText,treatAsPhrase,warnOnFailure,highlightStartTag,highlightEndTag){if(treatAsPhrase){searchArray=[searchText];}else{searchArray=searchText.split(" ");}
if(!document.body||typeof(document.body.innerHTML)=="undefined"){if(warnOnFailure){alert($__l.err_search_not_available);}
return false;}
var bodyText=document.body.innerHTML;for(var i=0;i<searchArray.length;i++){bodyText=doHighlight(bodyText,searchArray[i],highlightStartTag,highlightEndTag);}
document.body.innerHTML=bodyText;return true;}
function searchPrompt(defaultText,treatAsPhrase,textColor,bgColor){if(!defaultText){defaultText="";}
if((!textColor)||(!bgColor)){highlightStartTag="";highlightEndTag="";}else{highlightStartTag="<font style='color:"+textColor+"; background-color:"+bgColor+";'>";highlightEndTag="</font>";}
if(treatAsPhrase){promptText=$__l.search_please_enter_terms+":";}else{promptText=$__l.search_please_enter_words+":";}
searchText=defaultText;if(!searchText){alert($__l.search_no_terms_exit);return false;}
return highlightSearchTerms(defaultText,treatAsPhrase,true,highlightStartTag,highlightEndTag);}
var allreadyplayedswf='';var allreadysaved=get_cookie('allreadysaved');if(allreadysaved!=1){allreadysaved=0;}
var RecaptchaOptions={theme:'white',lang:$lext,tabindex:5,tabindex:2};function noenter(e){var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13){return false;}}
function phonenumberFormat(phnumber,eventonclick){if($country_id==1||$country_id==2){var real_str=phnumber.value;var intIndexOfMatch=real_str.indexOf('-');while(intIndexOfMatch!=-1){real_str=real_str.replace('-','')
intIndexOfMatch=real_str.indexOf('-');}
var intIndexOfMatch=real_str.indexOf('_');while(intIndexOfMatch!=-1){real_str=real_str.replace('_','')
intIndexOfMatch=real_str.indexOf('_');}
if(eventonclick==8){real_str=real_str.substr(0,real_str.length-1);}
phnumber_temp=real_str;phnumber_final='';for(ph=0;ph<10;ph++){if(ph==2){if(phnumber_temp.substr(ph,1)){phnumber_final+=phnumber_temp.substr(ph,1).replace(/[^0-9\s]/g,'')+'-';}else{phnumber_final+='_'+'-';}}else if(ph==5){if(phnumber_temp.substr(ph,1)){phnumber_final+=phnumber_temp.substr(ph,1).replace(/[^0-9\s]/g,'')+'-';}else{phnumber_final+='_'+'-';}}else{if(phnumber_temp.substr(ph,1)){phnumber_final+=phnumber_temp.substr(ph,1).replace(/[^0-9\s]/g,'');}else{phnumber_final+='_';}}}
phnumber.value=phnumber_final;}else if($country_id==3){phnumber.value=phnumber.value.replace(/[^0-9\s]/g,'');}}
function strrpos(haystack,needle,offset){var i=(haystack+'').lastIndexOf(needle,offset);return i>=0?i:false;}
function GetSelectedItem(thing_orig){chosen="";thing=thing_orig;len=thing.length;for(i=0;i<len;i++){if(thing[i].checked){chosen=thing[i].value}}
return chosen;}
function CopyToClipboard(whatid){what=document.getElementById(whatid);what.focus();what.select();CopiedTxt=document.selection.createRange();CopiedTxt.execCommand("Copy");}
