
function WDVisit(a,b)
{this.StorageKey=a;this.Visited=b;}
WDVisit.prototype.Change=function()
{var me=this;var d=document.body.appendChild(document.createElement('div'));d.className='wdvisit_container';var dd=Common.RoundedPanel(d,'main_cssleftgap','g0b','b9p','g9b','b0p');var h=dd.appendChild(document.createElement('div'));h.className='b9i b9p eck_link wdvisit_header';Common.TextAdd(h,'Visited');Common.Drag(document.body,d,h);var c=Common.CurtainShow(d);Common.ClassNameAdd(c,'main_cssmodaldialogbackground');var t=dd.appendChild(document.createElement('div'));t.className='wdvisit_content';var v=t.appendChild(document.createElement('div'));v.className='wdvisit_field';v.title='You have visited this place'
var vv=v.appendChild(document.createElement('input'));vv.name=Common.Unique();vv.id=Common.Unique();vv.type='radio';if(this.Visited)
{vv.checked=true;}
var vl=v.appendChild(document.createElement('label'));vl.htmlFor=vv.id;Common.TextAdd(vl,'Visited');var n=t.appendChild(document.createElement('div'));n.className='wdvisit_field';n.title='You have not visited this place'
var nn=n.appendChild(document.createElement('input'));nn.name=vv.name;nn.type='radio';nn.id=Common.Unique();if(!this.Visited)
{nn.checked=true;}
var nl=n.appendChild(document.createElement('label'));nl.htmlFor=nn.id;Common.TextAdd(nl,'Not Visited');var r=function(ev)
{d.style.top=''+(document.documentElement.scrollTop+((document.documentElement.clientHeight-d.clientHeight)/2))+'px';d.style.left=''+(document.documentElement.scrollLeft+((document.documentElement.clientWidth-d.clientWidth)/2))+'px';}
var e=Common.EventAdd(window,Common.EventType.Scroll,r);var ee=Common.EventAdd(window,Common.EventType.Resize,r);var a=function()
{d.parentNode.removeChild(d);Common.CurtainHide(c,d);Common.EventRemove(e);Common.EventRemove(ee);}
var s=function()
{if(me.Visited!=vv.checked)
{JavaService.Visit(Common.SessionID(),me.StorageKey,vv.checked,'',me.Complete,me.Error,'');me.Visited=vv.checked;}
a();}
var b=dd.appendChild(document.createElement('div'));b.className='wdvisit_button';b.appendChild(Common.ACButton('Submit','Save your changes',s));b.appendChild(Common.ACButton('Abort','Cancel changing setting',a));self.setTimeout(r,1);}
WDVisit.prototype.Complete=function(result,context,senderFunction)
{}
WDVisit.prototype.Error=function(error,context,senderFunction)
{alert(error.get_message());}
