var cDelFavoTitle="",cDelFavoMenu="",cAddFavoTitle="",cAddFavoMenu="",cMessageAdded="",cMessageDeleted="";if(cLanguage=="en"){cDelFavoTitle="Delete from your favorites";cDelFavoMenu="Unsubscribe";cAddFavoTitle="Add to your favorites";cAddFavoMenu="Subscribe";cMessageAdded="Subsribe completed";cMessageDeleted="Unsubscribe completed"}else{cDelFavoTitle="Verwijder uit je favorieten";cDelFavoMenu="Afmelden";cAddFavoTitle="Voeg toe aan je favorieten";cAddFavoMenu="Word fan";cMessageAdded="Aanmelden is voltooid";cMessageDeleted="Je bent afgemeld"}function favolocation_add(d,e){var c="",a="",b;$.ajax({type:"GET",url:cDomain+"/ajax/ajaxfavomodify.p",data:{idlocation:e,scope:"location",action:"add"},dataType:"xml",success:function(f){$(f).find("result").each(function(){c=$("qtyfans",this).text();a=$("error",this).text();if(a!=""){alert(a)}else{b=document.getElementById("ico_favolocation");if($(b).length>0){b.src=cStaticPathSite+"/image/icons/favorite_remove.png";b.alt="-";b.title=cDelFavoTitle}b=document.getElementById("menu_favolocation");if($(b).length>0){b.src=cStaticPathSite+"/image/icons/favorite_remove.png";b.alt="-";b.title=cDelFavoTitle;$(b).parent().find("span.textinlink").html(cDelFavoMenu);$(b).parents("span.showaslink").find("span.textinlink").html(cDelFavoMenu);$(b).parents("span.showaslink").attr("title",cDelFavoTitle)}$("#btn_favolocation").find("span.ui-button-text").html(cDelFavoMenu);$("#fans").html(c);$("#favostar").show();$("#favobuzz").show();$("#favobuzz input[type='checkbox']").attr("checked",true);showmessage(d,"succes",cMessageAdded,true)}})},error:function(g,f){alert("Oeps")}})}function favolocation_delete(d,e){var c="",a="",b;$.ajax({type:"GET",url:cDomain+"/ajax/ajaxfavomodify.p",data:{idlocation:e,scope:"location",action:"delete"},dataType:"xml",success:function(f){$(f).find("result").each(function(){c=$("qtyfans",this).text();a=$("error",this).text();if(a!=""){alert(a)}else{b=document.getElementById("ico_favolocation");if($(b).length>0){b.src=cStaticPathSite+"/image/icons/favorite_add.png";b.alt="+";b.title=cAddFavoTitle}b=document.getElementById("menu_favolocation");if($(b).length>0){b.src=cStaticPathSite+"/image/icons/favorite_add.png";b.alt="+";b.title=cAddFavoTitle;$(b).parents("span.showaslink").find("span.textinlink").html(cAddFavoMenu);$(b).parents("span.showaslink").attr("title",cAddFavoTitle)}$("#btn_favolocation").find("span.ui-button-text").html(cAddFavoMenu);$("#fans").html(c);$("#favostar").hide();$("#favobuzz").hide();showmessage(d,"succes",cMessageDeleted,true)}})},error:function(g,f){alert("Oeps")}})}function locationfavomodify(b,d){var a=document.getElementById("ico_favolocation"),c="";if($(a).length===0){a=document.getElementById("menu_favolocation")}c=a.src;if(c.indexOf("favorite_add")>0){favolocation_add(b,d)}else{favolocation_delete(b,d)}}function memberajaxcall(f,e,b,a,c){var d="",h="",g;$.ajax({type:"GET",url:cDomain+"/ajax/ajaxmembergeneral.p",data:{iduserprofileloggedin:a,iduserprofile:c,scope:e,scopevalue:b,Language:cLanguage},dataType:"xml",success:function(i){$(i).find("result").each(function(){g=$(this).find("message");if(g.length>0){h=$(g).text();d=$(g).attr("type");showmessage(f,d,h,true)}})},error:function(j,i){alert("Oeps "+j.statusText)}})}function locationnotifications(h){var g=-1,f=-1,d=$(h).attr("id"),b="",c="",a="",e="";g=d.indexOf("_");if(g>0){e=d.substring(0,g);f=d.indexOf("_",g+1);b=d.substring(g+1,f);c=d.substring(f+1);if($(h).attr("checked")){a="startnotify"}else{a="stopnotify"}memberajaxcall(h,e,a,b,c)}};
