// Test on WW_isloaded = 1 to see if all loaded var WWTango_status = 2; var WWTango_canmovepointer = true; var WWTango_canchangepointer = true; var WWTango_acceptmasterstyle = true; var WWTango_isrunning = false; var WWTango_doorkeeper = null; var WWTango_version = 1; var WWTango_pointertarget = true; var WW_parentwidth =0; var WW_parentheight =0; var WW_IntervalID = null; var WW_countInterval = 0; function WW_setasmaster(doorkeeper,wid,hgt,version) { if(WW_isitawindow(WWTango_doorkeeper)) return true; WWTango_doorkeeper = doorkeeper; WW_parentwidth = wid; WW_parentheight = hgt; WWTango_isrunning = true; WWTango_canchangepointer = true; WWTango_canmovepointer = true; WWTango_status = 0; WW_messageobjectlist[0].document.open(); WW_messageobjectlist[0].document.writeln('Master Pointer Mode
Click outside pointer rectangle to move
Click on Pointer to Hide
Click on Pointer + ALT to toggle message hiding
Click on Pointer + CNTL to abolish pointer
Click on Pointer + Shift to cycle families
Click outside + Alt is Change Image
Click outside + Control is Double Size
Click outside + Shift is Halve Size'); WW_messageobjectlist[0].document.close(); WW_messageobjectlist[1].document.open(); WW_messageobjectlist[1].document.writeln('Master Pointer Mode
Mouse Move on non pointer object gives confused Browser!
Cure with Mouse-Down and Up in No Mans Land
With Mouse Down on Current Pointer
h hides This Message while m restores
a Abolishes Pointer while CNTL-Click restores
f cycles through pointer families
c cycles through members of a family
u increases Size Up and d decreases Down
Mouse Up-Down between changes of
Pointer to process new option
'); WW_messageobjectlist[1].document.close(); if( WWTango_version >= version) return true; return false; } // End WW_setasmaster(doorkeeper) function WW_setasnonmaster(doorkeeper,wid,hgt,version) { if(WW_isitawindow(WWTango_doorkeeper)) return true; WWTango_doorkeeper = doorkeeper; WW_parentwidth = wid; WW_parentheight = hgt; WWTango_isrunning = true; WWTango_canchangepointer = true; WWTango_canmovepointer = false; WWTango_status = 1; WW_messageobjectlist[0].document.open(); WW_messageobjectlist[0].document.writeln('
Followed Pointer Mode
Use Dialog Window to Control Pointer Image Choice
Click outside pointer rectangle
to delete message or restore
Click on Pointer to Hide
Click on Pointer + ALT to toggle message hiding
Click on Pointer + CNTL to abolish pointer
Click on Pointer + Shift to cycle families
Click outside + Alt is Change Image
Click outside + Control is Double Size
Click outside + Shift is Halve Size
'); WW_messageobjectlist[0].document.close(); WW_messageobjectlist[1].document.open(); WW_messageobjectlist[1].document.writeln('
Followed Pointer Mode
With Mouse Down on Current Pointer
h hides This Message while m restores
a Abolishes Pointer while CNTL-Click restores
f cycles through pointer families
c cycles through members of a family
u increases Size Up and d decreases Down
Mouse Up-Down between changes of
Pointer to process new option
'); WW_messageobjectlist[1].document.close(); if( WWTango_version >= version) return true; return false; } // End WW_setasclient(doorkeeper) // Send Current Parameters -- flag = 0 is heartbeat function WW_updatefullpointerparms(flag) { if(WW_isundefined(WW_pointerlayer)) return; var clickX = WW_getlayerleft(WW_pointerlayer); var clickY = WW_getlayertop(WW_pointerlayer); WW_sendpointerparm(clickX,clickY,1,flag); return; } // end WW_updatefullpointerparms(flag) // Input x,y is top,left of master pointer -- send actual pointer position itself function WW_sendpointerparm(x,y,redo,flag) { if( WWTango_status != 0 ) return; wwevent = new WW_generatedevent('pointerdefn') wwevent.divxpos = x + WW_localpointer.ptx*WW_pointerfamily_used.scalefactor; wwevent.divypos = y + WW_localpointer.pty*WW_pointerfamily_used.scalefactor; var label = ' Set Pointer x,y'; if( redo != 0 ) { wwevent.divfamily = WW_pointerfamily_num; wwevent.divmood = WW_pointerentry_num; wwevent.divscale = WW_pointerfamily_used.scalefactor; if( WW_layerishidden(WW_pointerlayer) ) wwevent.divhide =1; else { wwevent.divhide = 0; } label = ' Reset Pointer'; wwevent.innerheight = WW_parentheight; wwevent.innerwidth = WW_parentwidth; } WWTango_dispatch(wwevent,label,flag); return; } // End WW_sendpointerxy(x,y) function WWTango_dispatch(wwevent,label,flag) { if(!WW_isitawindow(WWTango_doorkeeper)) return; WWTango_doorkeeper.WW_accumandsendevent(wwevent,WW_Eventnonmastername,label,flag); return; } // End WW_dispatch(wwevent,label) function WW_processlocalqueue() { // Run through Queue formed in Tango_receive if(!WW_isitawindow(WWTango_doorkeeper)) { ++WW_countInterval; if(WW_countInterval>100) clearInterval(WW_IntervalID); return; } if(WWTango_status == 0) { clearInterval(WW_IntervalID); return; } while( WWTango_doorkeeper.WW_numpointereventsdone < WWTango_doorkeeper.WW_numallevents) { var receivedevent = WWTango_doorkeeper.WW_eventrecord[WWTango_doorkeeper.WW_numpointereventsdone]; ++WWTango_doorkeeper.WW_numpointereventsdone ; if( WW_isdefined(receivedevent.processed)) { if(receivedevent.processed>0) continue; } var outputurltype = ''; if( WW_isdefined(receivedevent.type)) outputurltype = receivedevent.type; if( outputurltype != 'pointerdefn' ) continue; receivedevent.processed = 1; WW_processeventfromtango(receivedevent); } } // End WW_processlocalqueue() function WW_processeventfromtango(receivedevent) { var testtype = receivedevent.type; if(WW_isundefined(testtype)) return; if( testtype != 'pointerdefn' ) return; if( WWTango_acceptmasterstyle ) { var redo = 0; if(WW_isdefined(receivedevent.divfamily) && WW_isdefined(receivedevent.divmood ) ) { if( (receivedevent.divfamily < WW_pointerfamilyct) && (receivedevent.divfamily >=0) ) { if( receivedevent.divfamily != WW_pointerfamily_num ) { redo = 1; WW_pointerfamily_num = receivedevent.divfamily; WW_pointerentry_num = 0; WW_pointersetup(); } } if( (receivedevent.divmood < parseInt(WW_pointerfamily_used.familyct)) && (receivedevent.divmood >= 0 ) ) { if( receivedevent.divmood != WW_pointerentry_num) { redo = 1; WW_pointerentry_num = receivedevent.divmood; WW_pointersetup(); } } } if(WW_isdefined(receivedevent.divscale)) { var curscale = WW_pointerfamily_used.scalefactor; var diff =Math.abs(receivedevent.divscale-curscale); WW_pointerfamily_used.scalefactor = receivedevent.divscale; WW_setcookie("pointerscale",receivedevent.divscale); if(diff > .1*curscale) redo=1; } if( redo == 1) { WW_makenewpointer(1); } } if(WW_isdefined(receivedevent.divxpos)&&WW_isdefined(receivedevent.divypos)) { WW_layershiftto(WW_pointerlayer,receivedevent.divxpos - WW_localpointer.ptx*WW_pointerfamily_used.scalefactor,receivedevent.divypos - WW_localpointer.pty*WW_pointerfamily_used.scalefactor); if( WW_pointerabolish == 0 ) WW_layershow(WW_pointerlayer); } if(WW_isdefined(receivedevent.divhide) && (WW_pointerabolish == 0) ) { if( receivedevent.divhide == 1 ) { WW_layerhide(WW_pointerlayer); WW_offpointerblock(); } else WW_layershow(WW_pointerlayer); } return; } // End WW_processeventfromtango(receivedevent) // *** Start Non Tango Part ********************************** var WW_defaultpointerfamily = 0; var WW_defaultpointerentry = 0; var WW_defaulthidemessages = 0; var WW_defaultpointerabolish = 0; var WW_defaultpointerscale = 1.0; var WW_isloaded =0; var WW_draghappening =0; var WW_pointerlayer = null; var WW_messagetotalnumber = 2; var WW_messagecount =1; WW_messageobjectlist = new Array(); var WW_updown =0; var WW_ctupdown=0; var WW_ctupdown_last=0; var WW_xposition=0; var WW_yposition=0; var WW_firstxposition=0; var WW_firstyposition=0; var WW_hidemessages=0; var WW_hidepointer=0; var WW_pointerabolish =0; function WW_pointerdefn(num,angle,width,height,ptx,pty) { this.num = num; this.angle = angle; this.width = width; this.height = height; this.ptx = ptx; this.pty = pty; this.urladdon = num.toString(); } // End WW_pointerdefn defining a single pointer function WW_pointerfamily(urlstem,urlsuffix,familyname,initialscale) { this.urlstem = urlstem; this.urlsuffix = urlsuffix; this.familyname = familyname; this.scalefactor=initialscale; this.familyct = WW_pointerfamily.arguments.length; this.entries = new Array(); for(var m =4; m < this.familyct; m++) { this.entries[m-4] = WW_pointerfamily.arguments[m]; } this.familyct = this.familyct -4; } // End WW_pointerfamily defining a family of pointers at different angles of attack WW_norkaaddonons = new Array("_normal","_confused","_angry","_cry","_happy","_laugh","_sad","_scared","_shout"); function WW_norkacharfamily(urlstem,familyname,initialscale,width,height) { this.urlstem = urlstem; this.urlsuffix = '.gif'; this.familyname = familyname; this.scalefactor=initialscale; this.familyct = 9; this.entries = new Array(); for(var m =0; m < this.familyct; m++) { this.entries[m] = new WW_pointerdefn(m,0,width,height,width,0); this.entries[m].urladdon = familyname + WW_norkaaddonons[m]; } } // End WW_norkacharfamily defining a family of pointers from Norka's characters function WW_pointersetup() { WW_pointerfamily_used = WW_pointerfamilyarray[WW_pointerfamily_num]; WW_setcookie("pointerfamily",WW_pointerfamily_num); WW_localpointer = WW_pointerfamily_used.entries[WW_pointerentry_num]; WW_setcookie("pointerentry",WW_pointerentry_num); WW_localpointerurl = WW_pointerfamily_used.urlstem + WW_localpointer.urladdon + WW_pointerfamily_used.urlsuffix; } // End WW_pointersetup() Setting up Current Pointer // Set Current Pointers and their families ************************ WW_hand0 = new WW_pointerdefn(0,0,64,48,60,18); WW_hand1 = new WW_pointerdefn(1,45,64,46,56,42); WW_hand2 = new WW_pointerdefn(2,90,48,64,28,62); WW_hand3 = new WW_pointerdefn(3,135,44,54,0,53); WW_hand4 = new WW_pointerdefn(4,180,64,48,2,19); WW_hand5 = new WW_pointerdefn(5,225,44,54,0,0); WW_hand6 = new WW_pointerdefn(6,270,48,64,28,1); WW_hand7 = new WW_pointerdefn(7,315,44,54,43,0); WW_handfamily = new WW_pointerfamily("http://www.npac.syr.edu/users/gcf/sbwisdom/dragger/",".gif","realhand",1.0,WW_hand0,WW_hand1,WW_hand2,WW_hand3,WW_hand4,WW_hand5,WW_hand6,WW_hand7) WW_redarrow0 = new WW_pointerdefn(0,0,20,39,0,0); WW_redarrowfamily = new WW_pointerfamily("http://www.npac.syr.edu/users/gcf/sbwisdom/dragger/redarrow",".gif","redarrow",1.0,WW_redarrow0); WW_oldhand0 = new WW_pointerdefn(0,0,27,17,27,0); WW_oldhandfamily = new WW_pointerfamily("http://www.npac.syr.edu/users/gcf/sbwisdom/dragger/oldhand",".gif","oldhand",1.0,WW_oldhand0); WW_alien = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/alien/","alien",0.5,200,250); WW_baby = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/baby/","baby",1.0,78,90); WW_daniel = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/daniel/","daniel",0.5,147,240); WW_ghost = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/ghost/","ghost",0.5,206,250); WW_jenny = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/jenny/","jenny",0.5,117,185); WW_jerry = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/jerry/","jerry",0.5,137,190); WW_kily = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/kily/","kily",0.5,175,250); WW_marsian = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/marsian/","marsian",0.5,171,260); WW_rosie = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/rosie/","rosie",0.5,153,250); WW_sarah = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/sarah/","sarah",0.5,116,250); WW_snake = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/snake/","snake",0.5,177,200); WW_tom = new WW_norkacharfamily("http://www.npac.syr.edu/users/gcf/WWgamedata/characters/tom/","tom",0.5,187,250); WW_pointerfamilyarray = new Array(); WW_pointerfamilyarray[0] = WW_handfamily; WW_pointerfamilyarray[1] = WW_redarrowfamily; WW_pointerfamilyarray[2] = WW_oldhandfamily; WW_pointerfamilyarray[3] = WW_alien; WW_pointerfamilyarray[4] = WW_baby; WW_pointerfamilyarray[5] = WW_daniel; WW_pointerfamilyarray[6] = WW_ghost; WW_pointerfamilyarray[7] = WW_jenny; WW_pointerfamilyarray[8] = WW_jerry; WW_pointerfamilyarray[9] = WW_kily; WW_pointerfamilyarray[10] = WW_marsian; WW_pointerfamilyarray[11] = WW_rosie; WW_pointerfamilyarray[12] = WW_sarah; WW_pointerfamilyarray[13] = WW_snake; WW_pointerfamilyarray[14] = WW_tom; // End Set Current Pointers and their families ********************* var WW_pointerfamilyct = WW_pointerfamilyarray.length; var WW_pointerfamily_num = 0; var WW_pointerentry_num = 0; var WW_pointerfamily_used = WW_pointerfamilyarray[WW_pointerfamily_num]; var WW_localpointer = WW_pointerfamily_used.entries[WW_pointerentry_num]; var WW_localpointerurl = WW_pointerfamily_used.urlstem + WW_localpointer.urladdon + WW_pointerfamily_used.urlsuffix; function WW_startdrag(e) { // Mouse Down ++WW_ctupdown; WW_updown =1; var clickX = WW_eventx(e); var clickY = WW_eventy(e); WW_xposition = clickX; WW_yposition = clickY; WW_firstxposition = WW_xposition; WW_firstyposition = WW_yposition; if( WW_pointerlayer == null ) return true; localobject = WW_getclickedobject(clickX,clickY); if(!WW_isundefined(localobject)) { if(WW_pointerlayer!= localobject) { window.status= 'Down - ' + localobject.name; WW_draghappening =0; return true; } if( WW_layerishidden(WW_pointerlayer) ) { if(WW_Netscape4) { if( WW_draghappening == 1) { window.releaseEvents(Event.KEYDOWN); if(WWTango_canmovepointer) WW_pointerlayer.releaseEvents(Event.MOUSEMOVE); } } WW_draghappening = 0; return true; } if(WW_Netscape4) { window.captureEvents(Event.KEYDOWN ); if(WWTango_canmovepointer) WW_pointerlayer.captureEvents(Event.MOUSEMOVE);} if(WWTango_canmovepointer) WW_pointerlayer.onmousemove = WW_processdrag; window.onkeydown = WW_processkeydown; WW_draghappening = 1; window.status = 'Moving'; return true; } window.status= 'Down - nothing ' + WW_ctupdown + ' ' + e.target; WW_draghappening =0; if(WW_Netscape4) { if( WW_pointerlayer != null) { window.releaseEvents(Event.KEYDOWN); if(WWTango_canmovepointer) WW_pointerlayer.releaseEvents(Event.MOUSEMOVE); } } return true; } // End WW_startdrag(e) function WW_getclickedobject(xval,yval) { var localobject; if(WW_Netscape4) { for(var i=document.layers.length-1; i>=0; i--) { localobject = document.layers[i]; if( (xval > localobject.left) && ( xval < localobject.left+localobject.clip.width) && (yval > localobject.top) && ( yval < localobject.top+localobject.clip.height) ) return localobject; } } else { // Internet Explorer return window.event.srcElement.parentElement; } } // End WW_getclickedobject(xval,yval) function WW_processkeydown(e) { var redo =0; var keypressed =0; if( WW_Netscape4) { keypressed = e.which} else { keypressed = window.event.keyCode; if( (keypressed >= 16) && (keypressed <= 18) ) return true; } WW_updown =0; var localflag = String.fromCharCode(keypressed); window.status = 'Keydown ' + localflag + ' ' + keypressed; if( localflag == 'h' || localflag == 'H' ) { WW_hidemessages =1; WW_setcookie("hidemessages",WW_hidemessages); WW_offpointerblock(); return true; } if( localflag == 'm' || localflag == 'M' ) { WW_hidemessages =0; WW_setcookie("hidemessages",WW_hidemessages); WW_overpointerblock(); return true; } if( localflag == 'a' || localflag == 'A' ) { WW_pointerabolish = 1; WW_setcookie("pointerabolish",WW_pointerabolish); WW_layerhide(WW_pointerlayer); WW_offpointerblock(); return true; } if(!WWTango_canchangepointer) return true; // cannot allow changein pointer if( localflag == 'f' || localflag == 'F' ) { WW_pointerfamily_num++; if( WW_pointerfamily_num >= WW_pointerfamilyct ) WW_pointerfamily_num = 0; WW_pointerentry_num = 0; WW_pointersetup(); redo =1; } var fwidth = WW_pointerfamily_used.scalefactor; if( localflag == 'c' || localflag == 'C' ) { ++WW_pointerentry_num; if(parseInt(WW_pointerentry_num) >= parseInt(WW_pointerfamily_used.familyct) ) WW_pointerentry_num = 0; WW_pointersetup(); redo =1; } if( localflag == 'u' || localflag == 'U' ) { fwidth = fwidth * 2.; if( fwidth > 8. ) fwidth=8.; redo =2; } if( localflag == 'd' || localflag == 'D' ) { fwidth = fwidth * 0.5; if(fwidth < .25) fwidth =0.25; redo =2; } if(redo == 0 ) return true; WW_pointerfamily_used.scalefactor = fwidth; WW_setcookie("pointerscale",fwidth); if(WW_Netscape4) { window.releaseEvents(Event.KEYDOWN); WW_pointerlayer.releaseEvents(Event.MOUSEMOVE); } WW_makenewpointer(redo); var ex = WW_eventx(e); var ey = WW_eventy(e); var delx = WW_localpointer.width*WW_pointerfamily_used.scalefactor*.5; var dely = WW_localpointer.height*WW_pointerfamily_used.scalefactor*.5; WW_layershiftto(WW_pointerlayer,ex-delx,ey-dely); WW_sendpointerparm(ex-delx,ey-dely,redo,1); WW_offpointerblock(); if(WW_Netscape4) { window.captureEvents(Event.KEYDOWN ); if( WWTango_canmovepointer ) WW_pointerlayer.captureEvents(Event.MOUSEMOVE); } WW_pointerlayer.onmousemove = WW_processdrag; window.onkeydown = WW_processkeydown; return true; } // End WW_processkeydown(e) function WW_processdrag(e) { // Mouse Move if(!WWTango_canmovepointer ) { WW_offpointerblock(); return; } WW_updown =0; if(WW_draghappening == 0 ) return true; if( WW_pointerlayer == null ) return true; window.status= 'dragging'; WW_offpointerblock(); var ex = WW_eventx(e); var ey = WW_eventy(e); WW_layershiftby(WW_pointerlayer,ex-WW_xposition,ey-WW_yposition) WW_xposition = ex; WW_yposition = ey; return false; } // End WW_processdrag(e) function WW_enddrag(e) { // Mouse Up if( !WWTango_canmovepointer ) { WW_offpointerblock(); window.status = 'User Click'; return WW_internalclick(e); } if( WW_pointerlayer != null) { if( (WW_draghappening == 1) && (WW_Netscape4) && WWTango_canmovepointer ) WW_pointerlayer.releaseEvents(Event.MOUSEMOVE); WW_draghappening = 0; } var ex = WW_eventx(e); var ey = WW_eventy(e); if( (ex > WW_firstxposition-5) && (ex < WW_firstxposition+5) && (ey > WW_firstyposition-5) && (ey < WW_firstyposition+5) ) { window.status = 'User Click'; return WW_internalclick(e); } window.status = 'Stop'; WW_ctupdown_last = WW_ctupdown; WW_updown=0; WW_draghappening =0; WW_sendpointerparm(WW_getlayerleft(WW_pointerlayer),WW_getlayertop(WW_pointerlayer),0,1); return true; } // End WW_enddrag(e) function WW_processclick(e) { // System Click if( WW_draghappening > 0 ) { WW_enddrag(e); return true; } WW_draghappening=0; window.status = 'click'; return WW_internalclick(e); } // End WW_processclick(e) function WW_internalclick(e) { // Process System or User Click without duplication if( WW_ctupdown == WW_ctupdown_last) return true; WW_ctupdown_last = WW_ctupdown; WW_updown =0; var mouseoption = WW_mousemodifiers(e); if( WW_pointerabolish == 1 ) { if( mouseoption == 2 ) { if(WW_isdefined(WW_pointerlayer) ) WW_layershow(WW_pointerlayer); mouseoption = 0; WW_pointerabolish = 0; WW_setcookie("pointerabolish",WW_pointerabolish); } else { return true; } } var clickX = WW_eventx(e); var clickY = WW_eventy(e); var curclicked = null; if(WW_Netscape4) { var localobject; for(var i=document.layers.length-1; i>=0; i--) { localobject = document.layers[i]; if( (clickX > localobject.left) && ( clickX < localobject.left+localobject.clip.width) && (clickY > localobject.top) && ( clickY < localobject.top+localobject.clip.height) ) { curclicked = localobject; break; } } } else { curclicked = window.event.srcElement.parentElement; } if(WW_pointerlayer !=null) { if( (WW_pointerlayer == curclicked) && (!WW_layerishidden(WW_pointerlayer)) ) { if( mouseoption == 0 ) { WW_layertobottom(WW_pointerlayer); WW_layerhide(WW_pointerlayer); if( WWTango_status == 0 ) WW_updatefullpointerparms(1); WW_offpointerblock(); } if( mouseoption == 1) { if( WW_hidemessages == 0 ) { WW_hidemessages = 1; WW_setcookie("hidemessages",WW_hidemessages); WW_offpointerblock(); } else { WW_hidemessages = 0; WW_setcookie("hidemessages",WW_hidemessages); WW_overpointerblock(); } } if( mouseoption == 2 ) { WW_pointerabolish = 1; WW_setcookie("pointerabolish",WW_pointerabolish); WW_layerhide(WW_pointerlayer); WW_offpointerblock(); } if( (mouseoption == 4) && WWTango_canchangepointer ) { WW_pointerfamily_num++; if( WW_pointerfamily_num >= WW_pointerfamilyct ) WW_pointerfamily_num = 0; WW_pointerentry_num = 0; WW_pointersetup(); WW_makenewpointer(1); var delx = WW_localpointer.width*WW_pointerfamily_used.scalefactor*.5; var dely = WW_localpointer.height*WW_pointerfamily_used.scalefactor*.5; WW_layershiftto(WW_pointerlayer,clickX-delx,clickY-dely); WW_sendpointerparm(clickX-delx,clickY-dely,1,1); WW_offpointerblock(); } return true; } if( !WWTango_canchangepointer ) return true; if( !WWTango_canmovepointer ) { // Restore to old position clickX = WW_getlayerleft(WW_pointerlayer)+WW_localpointer.ptx*WW_pointerfamily_used.scalefactor; clickY = WW_getlayertop(WW_pointerlayer)+WW_localpointer.pty*WW_pointerfamily_used.scalefactor; } var fwidth = WW_pointerfamily_used.scalefactor; if( mouseoption == 1) { ++WW_pointerentry_num; if(parseInt(WW_pointerentry_num) >= parseInt(WW_pointerfamily_used.familyct) ) WW_pointerentry_num = 0; WW_pointersetup(); } if( mouseoption == 2) { fwidth = fwidth * 2.; if( fwidth > 8. ) fwidth=8.; } if( mouseoption == 4) { fwidth = fwidth * 0.5; if(fwidth < .25) fwidth =0.25; } WW_pointerfamily_used.scalefactor = fwidth; WW_setcookie("pointerscale",fwidth); WW_makenewpointer(mouseoption); WW_layershiftto(WW_pointerlayer,clickX-WW_localpointer.ptx*WW_pointerfamily_used.scalefactor,clickY-WW_localpointer.pty*WW_pointerfamily_used.scalefactor); WW_sendpointerparm(clickX-WW_localpointer.ptx*WW_pointerfamily_used.scalefactor,clickY-WW_localpointer. pty*WW_pointerfamily_used.scalefactor,mouseoption,1); } return true; } // End WW_internalclick(e) function WW_mousemodifiers(e) { // Interpret Mouse Modifiers var mouseoption =0; if(WW_Netscape4) { var testit = e.modifiers; if( testit == Event.ALT_MASK ) mouseoption = 1; if( testit == Event.CONTROL_MASK) mouseoption = 2; if( testit == Event.SHIFT_MASK) mouseoption = 4; } else { var actualevent = window.event; if( actualevent.altKey ) mouseoption = 1; if( actualevent.ctrlKey ) mouseoption = 2; if( actualevent.shiftKey ) mouseoption = 4; } return mouseoption; } // End WW_mousemodifiers(e) function WW_makenewpointer(option) { // Set up new Pointer size/image/orientation if(option > 0 ) { var totalwidth = WW_pointerfamily_used.scalefactor*WW_localpointer.width; if(WW_Netscape4) { WW_pointerlayer.document.open(); WW_pointerlayer.document.writeln(''); WW_pointerlayer.document.close(); } else { WW_pointerlayer.innerHTML = ''; WW_pointerlayer.style.width = totalwidth; } } WW_layertotop(WW_pointerlayer); WW_layershow(WW_pointerlayer); WW_pointerlayer.onmouseover = WW_overpointerblock; WW_pointerlayer.onmouseout = WW_offpointerblock; } // End WW_makenewpointer() function WW_overpointerblock() { // Mouse Over Pointer or Message shown if(WW_hidemessages == 1 ) return true; if(WW_isundefined(WW_pointerlayer)) return true; if( WW_layerishidden(WW_pointerlayer)) return true; ++WW_messagecount; if(WW_messagecount>=WW_messagetotalnumber) WW_messagecount=0; WW_messageobject = WW_messageobjectlist[WW_messagecount]; if(WW_isundefined(WW_messageobject)) return true; WW_displaymessage(); return true; } // End WW_overpointerblock() function WW_displaymessage() { var pointerheight = WW_getlayerheight(WW_pointerlayer); var localy = WW_getlayertop(WW_pointerlayer) + pointerheight; var localx = WW_getlayerleft(WW_pointerlayer); var messageheight = WW_getlayerheight(WW_messageobject); var messagewidth = WW_getlayerwidth(WW_messageobject); var windowwidth = WW_getwindowwidth(); var windowheight = WW_getwindowheight(); if( localx + messagewidth > windowwidth) localx = windowwidth - messagewidth; if( localy + messageheight > windowheight) localy = WW_getlayertop(WW_pointerlayer) - messageheight; WW_layershow(WW_messageobject); WW_layertotop(WW_messageobject); WW_setbackgroundcolor(WW_messageobject,'peachpuff'); WW_layershiftto(WW_messageobject,localx,localy); return true; } // End WW_displaymessage() function WW_offpointerblock() { // Mouse leaves Pointer or Message Abolished for( var m=0; m < WW_messagetotalnumber; m++) { if(!WW_isundefined(WW_messageobjectlist[m])) WW_layerhide(WW_messageobjectlist[m]); } return true; } // End WW_offpointerblock() function WW_setcapture() { if( WW_Netscape4 ) { window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK); window.onmousedown=WW_startdrag; window.onmouseup=WW_enddrag; window.onclick=WW_processclick; } else { document.onmousedown=WW_startdrag; document.onmouseup=WW_enddrag; document.onclick=WW_processclick; } return true; } // End WW_setcapture() function WW_pageisloaded() { // Initialize when page loaded WW_isloaded=1; if(WW_oldbrowser) return; WW_setcapture(); WW_pointerlayer = WW_getlayer('WWpointerblock'); WW_pointerlayer.onmouseover = WW_overpointerblock; WW_pointerlayer.onmouseout = WW_offpointerblock; WW_messageobjectlist[0] = WW_getlayer('WWpointermessage1'); WW_messageobjectlist[1] = WW_getlayer('WWpointermessage2'); WW_messageobject = WW_messageobjectlist[0]; if(!WW_Netscape4 ) { if( !WW_isundefined(WW_messageobjectlist[0]) ) WW_messageobjectlist[0].style.width =300; if( !WW_isundefined(WW_messageobjectlist[1]) ) WW_messageobjectlist[1].style.width =300; } // Process Cookies ************************ WW_pointerfamily_num = parseInt(WW_getCookie("pointerfamily",WW_defaultpointerfamily)); if(WW_pointerfamily_num < 0 ) WW_pointerfamily_num =0; if(WW_pointerfamily_num >= WW_pointerfamilyct) WW_pointerfamily_num = WW_pointerfamilyct-1; WW_setcookie("pointerfamily",WW_pointerfamily_num); WW_pointerfamily_used = WW_pointerfamilyarray[WW_pointerfamily_num]; WW_pointerentry_num = parseInt(WW_getCookie("pointerentry",WW_defaultpointerentry)); if(WW_pointerentry_num < 0 ) WW_pointerentry_num =0; if(WW_pointerentry_num >= parseInt(WW_pointerfamily_used.familyct)) WW_pointerentry_num = parseInt(WW_pointerfamily_used.familyct)-1; WW_setcookie("pointerentry",WW_pointerentry_num); WW_pointersetup(); var pointerscale = parseFloat(WW_getCookie("pointerscale",WW_defaultpointerscale)); if(pointerscale < 0.125 ) pointerscale = 0.125; if(pointerscale >= 8.0 ) pointerscale = 8.0; WW_setcookie("pointerscale",pointerscale); WW_pointerfamily_used.scalefactor = pointerscale; WW_makenewpointer(1); WW_pointerabolish = parseInt(WW_getCookie("pointerabolish",WW_defaultpointerabolish)); if( WW_pointerabolish != 1 ) WW_pointerabolish == 0; WW_setcookie("pointerabolish",WW_pointerabolish); if( WW_pointerabolish == 1 ) WW_layerhide(WW_pointerlayer); WW_hidemessages = parseInt(WW_getCookie("hidemessages",WW_defaulthidemessages)); if( WW_hidemessages != 1 ) WW_hidemessages == 0; WW_setcookie("hidemessages",WW_hidemessages); if( WW_hidemessages == 1 ) WW_offpointerblock(); // Initialize Tango Link -- setInterval killed later if Tango does not join WW_localprocessed = 0; WW_localeventqueue = 0; WW_IntervalID = setInterval("WW_processlocalqueue()",500); return; } // End WW_pageisloaded()