// mouse tutorial stuff function InitSimpleNavMap_MouseTut() { var mousedir="html\\mouse\\"; g_SimpleNavMap.Add("mouse.htm", mousedir+"mouse_a.htm"); g_SimpleNavMap.Add("mouse_a.htm",mousedir+"mouse_b.htm"); g_SimpleNavMap.Add("mouse_b.htm",mousedir+"mouse_c.htm"); g_SimpleNavMap.Add("mouse_c.htm",mousedir+"mouse_d.htm"); g_SimpleNavMap.Add("mouse_d.htm",mousedir+"mouse_e.htm"); g_SimpleNavMap.Add("mouse_e.htm",mousedir+"mouse_f.htm"); g_SimpleNavMap.Add("mouse_f.htm",mousedir+"mouse_g.htm"); g_SimpleNavMap.Add("mouse_g.htm",mousedir+"mouse_h.htm"); g_SimpleNavMap.Add("mouse_h.htm",mousedir+"mouse_i.htm"); g_SimpleNavMap.Add("mouse_i.htm",mousedir+"mouse_j.htm"); g_SimpleNavMap.Add("mouse_j.htm",mousedir+"mouse_k.htm"); } var curRewardStr=0; // need individual defns for localization var L_RewardStr1_Text="Good job!"; var L_RewardStr2_Text="That's it!"; var L_RewardStr3_Text="You've got it!"; var L_RewardStr4_Text="Excellent!"; var L_RewardStr5_Text="It's that easy!"; var L_RewardStr6_Text="Outstanding!"; var L_RewardStr7_Text="Bravo!"; var L_RewardStr8_Text="Stupendous!"; var RewardStrs = new Array(8); { for(var i=1;i<=8;i++) { eval("RewardStrs["+(i-1).toString()+"]=L_RewardStr"+i.toString()+"_Text;"); } } function GetRewardStr(i) { return RewardStrs[i]; } var ButTouched = new Array(4); function MouseTut_LoadMe() { InitFrameRef('External'); if (g.btnNext != null) g_FirstFocusElement = g.btnNext; else if (g.btnSkip != null) g_FirstFocusElement = g.btnSkip; else if (g.btnBack != null) g_FirstFocusElement = g.btnBack; if (GetCurrentPageName() == "mouse.htm") { InitNewButtons(null, "SimpleNext"); g.btnSkip.onmouseover = HandleNextButtonMouseOver; g.btnSkip.onmouseout = HandleNextButtonMouseOut; g.btnSkip.onmousedown = HandleNextButtonMouseDown; g.btnSkip.className = "newbuttonsNext"; } else InitNewButtons("SimpleBack", "SimpleNext"); if (g_FirstFocusElement != null) g_FirstFocusElement.focus(); else g.document.body.focus(); } var g_MouseImgDir="images/"; function HandleButMouseUp() { if(this.tagName=="IMG") { if(g.event.button!=1) { return; } var butnumchar=this.id.substr(3,1); this.src=g_MouseImgDir+"but"+butnumchar+"_up.gif"; } } function HandleButMouseDown() { if(this.tagName=="IMG") { if(g.event.button!=1) { return; } var butnumchar=this.id.substr(3,1); this.src=g_MouseImgDir+"but"+butnumchar+"_dwn.gif"; } } function HandleButMouseOut() { if(this.tagName=="IMG") { var butnumchar=this.id.substr(3,1); var butnum=parseInt(butnumchar); this.src=g_MouseImgDir+"but"+butnumchar+"_idl.gif"; eval("g.rtxt"+butnumchar+".style.display='none';"); ButTouched[butnum]=false; } } // for mouse_c/e pages function HandleButMouseOver() { if(this.tagName=="IMG") { var butnumchar=this.id.substr(3,1); var butnum=parseInt(butnumchar); if(g.event.button==1) { this.src=g_MouseImgDir+"but"+butnumchar+"_dwn.gif"; } else { this.src=g_MouseImgDir+"but"+butnumchar+"_up.gif"; } if(!ButTouched[butnum]) { ButTouched[butnum]=true; eval("g.rtxt"+butnumchar+".innerText=GetRewardStr("+curRewardStr.toString()+");"); eval("g.rtxt"+butnumchar+".style.display='inline';"); curRewardStr=(curRewardStr+1) % RewardStrs.length; // Call Agent to move the character -- inserted by tandyt try { Agent_MouseOver(g.event.srcElement); } catch(e) { } } } } function HandleDragEvent() { g.event.cancelBubble=true; g.event.returnValue=false; return false; } // need to make sure "out" doesnt occur before "up" is this possible to do? function setToolBarButtonHandlers(but1,PageChar) { // set handlers for toolbar if(PageChar=="E") { but1.onmouseover=HandleButMouseOver_PageE; but1.onmousedown=HandleButMouseDown_PageE; but1.onmousemove=HandleButMouseOver_PageE; but1.onmouseup=HandleButMouseUp_PageE; } else { but1.onmouseover=HandleButMouseOver; but1.onmousedown=HandleButMouseDown; but1.onmousemove=HandleButMouseOver; but1.onmouseup=HandleButMouseUp; } but1.onmouseout=HandleButMouseOut; but1.ondragover=HandleDragEvent; but1.ondragenter=HandleDragEvent; } function MouseTut_LoadMe_PageC() { MouseTut_LoadMe(); for(var i=0;i