
Lycos.use("ui");Lycos.webon.modules.pagecounter=function(instId,subInstId){this.type="pagecounter";this.instId=instId;this.subInstId=subInstId;this.lyModule=Lycos.webon.module;this.counter=document.getElementById('pagecount'+instId+'_'+subInstId);this.lyModule(instId,subInstId);var tmp=this;this.addEventListener("lightbox",function(e){tmp.onLightbox(e);});this.addEventListener("saveInfo",function(e){tmp.onSaveInfo(e);});this.addEventListener("increment",function(e){tmp.onIncrement(e);});this.showSomething=function(msg){var obj={"message":msg,"id":"showMessage"};this.lyAjaxObj(obj,"lightbox");return false;}
this.onLightbox=function(evt){var data=evt.lyResponse;if(data.error){Lycos.ui.lightbox.hide();alert(data.error);return;}
Lycos.ui.lightbox.populate(data.html);if(data.id=="showMessage"){}}
this.saveInfo=function(form){this.lyAjaxForm(form);return false;}
this.onSaveInfo=function(evt){if(evt.lyResponse.error){alert(evt.lyResponse.error);}}
this.onIncrement=function(evt){var data=evt.lyResponse;if(typeof(data.count)!="undefined"&&data.count>=0)
{this.counter.innerHTML=data.count;}}
this.incrementCounter=function(){this.lyAjaxObj({"webonurl":this.webonurl},"increment");}
this.incrementCounter();}