var ie = document.all;
var dom = document.getElementById;

var Xpos, Ypos;

if (document.layers) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = mtrack;
function mtrack(e) {
   if(ie){
      Ypos = event.clientY + document.body.scrollTop + 10;
      Xpos = event.clientX + document.body.scrollLeft + 10;
     if ((Xpos+250) > document.body.clientWidth)
         Xpos=event.x-260;  
   } else if(document.layers || dom)
   { 
     Xpos = e.pageX+10;
     Ypos = e.pageY+10;
     if ((Xpos+250)>window.innerWidth)
         Xpos=e.pageX-260;  
   }
}

function ShowDescCommon(strOut1) {
   if (ie || dom) {
      if(document.getElementById("Description")){
        dId = document.getElementById("Description");
        dId.style.visibility='visible';
        dId.innerHTML=strOut1;
      }
   }
   else {
      document.ant.document.alayer.document.write(strOut1);
      document.ant.document.alayer.document.close();}
   return;
}

function Check_ResultCommon(outputtext) {
   if (ie || dom){
      if(document.getElementById("QuizResult")){
        QuizResultId = document.getElementById("QuizResult");
        QuizResultId.innerHTML=outputtext;
      }
   } else {
      document.ant.document.alayer.document.write(outputtext);
      document.ant.document.alayer.document.close();}
   return;
 }

function ClearDesc() {
   if (ie || dom){
      if(document.getElementById("Description")){
        dId = document.getElementById("Description");
        dId.innerHTML="";
        dId.style.visibility='hidden';
      }
   } else {
      document.ant.document.alayer.document.write("");
      document.ant.document.alayer.document.close();}
   return;

}

function showDefinition(word,altword,definition) {
   var strTDstart, strTDend,htmltext, width, co;
   
   width=250;
   htmltext=word;
   if(word.length>0)
     co=': ';
   else
     co='';
  if (altword.length >0)
    htmltext+= "</span> <span class=BodyText>(" +altword + ")" + co + definition + "</span>";
  else
    htmltext+= "</span><span class=BodyText>" + co + definition + "</span>";
   if(htmltext.length<85) width=150;
   strTDstart= "<table border=0 cellspacing=0 cellpadding=1 bgcolor=black><tr><td><table border=0 cellspacing=0 cellpadding=2 width=" + width + " bgcolor=#fafad2 class=BodyText><tr><td width=" + width + "><span class=BodyTextBolded>";
   strTDend = "</td></tr></table></td></tr></table> ";
  htmltext= strTDstart + htmltext + strTDend;
  if (document.layers) {
     document.layers['glossary'].document.write(htmltext);
     document.layers['glossary'].left = Xpos;
     if((Ypos+document.layers['glossary'].clip.height)>window.innerHeight)
       document.layers['glossary'].top=window.innerHeight-document.layers['glossary'].clip.height;
     else
       document.layers['glossary'].top = Ypos;
     document.layers['glossary'].document.close();
     document.layers['glossary'].visibility ='show';

  } else if(ie){
     glossary.innerHTML = htmltext;
     glossary.style.left = Xpos;
     if((Ypos+glossary.clientHeight)>document.body.clientHeight)
       glossary.style.top=document.body.clientHeight-glossary.clientHeight;
     else
       glossary.style.top = Ypos;
     glossary.style.visibility='visible';
  
  } else if(dom){
     //alert("X is " + Xpos + " Y is " + Ypos);
     if(document.getElementById("glossary")){
       glossaryId = document.getElementById("glossary");
       glossaryId.innerHTML = htmltext;
       glossaryId.style.left = Xpos;
       if((Ypos+glossaryId.clientHeight)>document.body.clientHeight)
         glossaryId.style.top=document.body.clientHeight-glossaryId.clientHeight;
       else
         glossaryId.style.top = Ypos;
       glossaryId.style.visibility='visible';
     }

  }
}

function hideDefinition() {
  if (document.layers) {
    document.layers['glossary'].visibility ='hide';
  } else if(ie){
    glossary.style.visibility='hidden';
    glossary.style.left=40;
    glossary.style.top=40;
  } else if(dom){
     if(document.getElementById("glossary")){
       glossaryId = document.getElementById("glossary");
       glossaryId.style.visibility='hidden';
       glossaryId.style.left=40;
       glossaryId.style.top=40;
     }
   }
}

function PopUp(url) {
   NewWin=window.open(url,'NewWin','toolbar=yes,status=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes');
}
function MenuMain() {
var RequestID;
if (location.href.indexOf("otec") != -1 || location.href.indexOf("OTEC") != -1){
RequestID = "otec"
}
else {
RequestID = "cboe"
}
   document.location.href = "/LearnCenter/Tutorials.aspx?id="+RequestID;
}
function MenuHelp() {
   document.location.href = "/LearnCenter/cboeeducation/Info/index.aspx";
}
function MenuGlossary() {
   PopUp('/LearnCenter/Glossary.aspx');
}
function MenuInstHome() {
   PopUp('/LearnCenter/');
}
function MenuCBOEHome() {
   PopUp('/');
}

function PrintMenuBar(Lesson, CurrPage,TotalPage) {

   var strPage, strLesson, tempPage;

   document.write("<table border=0 cellpadding=0 cellspacing=0><tr>");
   document.write("<td rowspan=7><IMG height=310 src='/LearnCenter/cboeeducation/Images/CntrColumn.GIF' width=33></td>");
   document.write("<td rowspan=7><IMG height=310  src='/LearnCenter/cboeeducation/Images/LeftColumn.GIF' width=26></td>");
   document.write("<td><IMG height=22 src='/LearnCenter/cboeeducation/Images/BttnTop.GIF' width=53></td></tr>");
                             
   document.write("<tr><td><A onmouseover=\"MM_swapImage('MainMenu','','/LearnCenter/cboeeducation/Images/MainMenu_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuMain();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/MainMenu_Off.GIF' width=53 border=0 name=MainMenu></A></td></tr>");
                     
   document.write("<tr><td><A onmouseover=\"MM_swapImage('Help','','/LearnCenter/cboeeducation/Images/Help_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuHelp();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/Help_Off.GIF' width=53 border=0 name=Help></A></td></tr>");
              
   document.write("<tr><td><A onmouseover=\"MM_swapImage('Glossary','','/LearnCenter/cboeeducation/Images/Glossary_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuGlossary();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/Glossary_Off.GIF' width=53 border=0 name=Glossary></A></td></tr>");

   document.write("<tr><td><A onmouseover=\"MM_swapImage('InstHome','','/LearnCenter/cboeeducation/Images/InstHome_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuInstHome();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/InstHome_Off.GIF' width=53 border=0 name=InstHome></A></td></tr>");

   document.write("<tr><td><A onmouseover=\"MM_swapImage('CBOEHome','','/LearnCenter/cboeeducation/Images/CBOEHome_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuCBOEHome();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/CBOEHome_Off.GIF' width=53 border=0 name=CBOEHome></A></td></tr>");

   document.write("<tr><td><IMG height=48 src='/LearnCenter/cboeeducation/Images/Vacant.GIF' width=53></td></tr>");


   if(CurrPage == 1)
   {
      document.write("<tr><td><IMG height=31 src='/LearnCenter/cboeeducation/Images/Back_Nil.GIF' width=33 border=0 name=Back></td>");      
   }        
   else
   {
      tempPage=CurrPage-1;
      
      if(tempPage <10)
      { strPage = "0" + tempPage;}
      else
      { strPage = tempPage;}
      
      if(Lesson <10)
      { strLesson = "0" + Lesson;}
      else
      { strLesson = Lesson;}
      
      document.write("<tr><td><a href='mod_" + strLesson + "_" + strPage + ".aspx' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Back','','/LearnCenter/cboeeducation/Images/Back_On.GIF',1)\"><img name=Back border=0 src='/LearnCenter/cboeeducation/Images/Back_Off.GIF' width=33 height=31></a></td>");
   }

   if(CurrPage == TotalPage)
   {
      document.write("<td><img name=Next border=0 src='/LearnCenter/cboeeducation/Images/Next_Nil.GIF' width=26 height=31></td>");
   }
   else
   {

      tempPage=CurrPage+1;
      
      if(tempPage <10)
      { strPage = "0" + tempPage;}
      else
      { strPage = tempPage;}
      
      if(Lesson <10)
      { strLesson = "0" + Lesson;}
      else
      {  strLesson = Lesson;}
      
      document.write("<td><A onmouseover=\"MM_swapImage('Next','','/LearnCenter/cboeeducation/Images/Next_On.GIF',1)\" onmouseout=MM_swapImgRestore() href='mod_" + strLesson + "_" + strPage + ".aspx'><IMG height=31 src='/LearnCenter/cboeeducation/Images/Next_Off.GIF' width=26 border=0 name=Next></A></td>");

   }

   document.write("<td><IMG height=31 src='/LearnCenter/cboeeducation/Images/BttnBttm.GIF' width=53></td></tr></table>");

}
//end PrintMenuBar

function PrintMenuBarQuiz(Lesson, CurrPage,TotalPage) {

   var strPage, strLesson, tempPage;

   document.write("<table border=0 cellpadding=0 cellspacing=0><tr>");
   document.write("<td rowspan=7><IMG height=310 src='/LearnCenter/cboeeducation/Images/CntrColumn.GIF' width=33></td>");
   document.write("<td rowspan=7><IMG height=310  src='/LearnCenter/cboeeducation/Images/LeftColumn.GIF' width=26></td>");
   document.write("<td><IMG height=22 src='/LearnCenter/cboeeducation/Images/BttnTop.GIF' width=53></td></tr>");
                             
   document.write("<tr><td><A onmouseover=\"MM_swapImage('MainMenu','','/LearnCenter/cboeeducation/Images/MainMenu_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuMain();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/MainMenu_Off.GIF' width=53 border=0 name=MainMenu></A></td></tr>");
                     
   document.write("<tr><td><A onmouseover=\"MM_swapImage('Help','','/LearnCenter/cboeeducation/Images/Help_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuHelp();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/Help_Off.GIF' width=53 border=0 name=Help></A></td></tr>");
              
   document.write("<tr><td><A onmouseover=\"MM_swapImage('Glossary','','/LearnCenter/cboeeducation/Images/Glossary_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuGlossary();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/Glossary_Off.GIF' width=53 border=0 name=Glossary></A></td></tr>");

   document.write("<tr><td><A onmouseover=\"MM_swapImage('InstHome','','/LearnCenter/cboeeducation/Images/InstHome_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuInstHome();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/InstHome_Off.GIF' width=53 border=0 name=InstHome></A></td></tr>");

   document.write("<tr><td><A onmouseover=\"MM_swapImage('CBOEHome','','/LearnCenter/cboeeducation/Images/CBOEHome_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuCBOEHome();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/CBOEHome_Off.GIF' width=53 border=0 name=CBOEHome></A></td></tr>");

   document.write("<tr><td><IMG height=48 src='/LearnCenter/cboeeducation/Images/Vacant.GIF' width=53></td></tr>");


   if(CurrPage == 1)
   {
      document.write("<tr><td><IMG height=31 src='/LearnCenter/cboeeducation/Images/Back_Nil.GIF' width=33 border=0 name=Back></td>");      
   }        
   else
   {
      tempPage=CurrPage-1;
      
      if(tempPage <10)
      { strPage = "0" + tempPage;}
      else
      { strPage = tempPage;}
      
      if(Lesson <10)
      { strLesson = "0" + Lesson;}
      else
      { strLesson = Lesson;}
      
      //document.write("<tr><td><a href='mod_" + strLesson + "_" + strPage + ".aspx' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Back','','/LearnCenter/cboeeducation/Images/Back_On.GIF',1)\"><img name=Back border=0 src='/LearnCenter/cboeeducation/Images/Back_Off.GIF' width=33 height=31></a></td>");
      document.write("<tr><td><img name=Back border=0 src='/LearnCenter/cboeeducation/Images/BackQuiz_L_Off.GIF' width=33 height=31></td>");
   }

   if(CurrPage == TotalPage)
   {
      document.write("<td><A onmouseover=\"MM_swapImage('Back','','/LearnCenter/cboeeducation/Images/BackQuiz_L_On.GIF','Next','','/LearnCenter/cboeeducation/Images/BackQuiz_R_On.GIF',2)\" onmouseout=MM_swapImgRestore() href='mod_" + strLesson + "_" + strPage + ".aspx'><IMG height=31 src='/LearnCenter/cboeeducation/Images/BackQuiz_R_Off.GIF' width=33 border=0 name=Next></A></td>");
   }
   else
   {

      tempPage=CurrPage;
      
      if(tempPage <10)
      { strPage = "0" + tempPage;}
      else
      { strPage = tempPage;}
      
      if(Lesson <10)
      { strLesson = "0" + Lesson;}
      else
      {  strLesson = Lesson;}           
     //document.write("<td><A onmouseover=\"MM_swapImage('Back','','/LearnCenter/cboeeducation/Images/BackQuiz_L_On.GIF','Next','','/LearnCenter/cboeeducation/Images/BackQuiz_R_On.GIF',2)\" onmouseout=MM_swapImgRestore() href='mod_" + strLesson + "_" + strPage + ".aspx'><IMG height=31 src='/LearnCenter/cboeeducation/Images/BackQuiz_R_Off.GIF' width=26 border=0 name=Next></A></td>");           
     document.write("<td><A onmouseover=\"MM_swapImage('Back','','/LearnCenter/cboeeducation/Images/BackQuiz_L_On.GIF','Next','','/LearnCenter/cboeeducation/Images/BackQuiz_R_On.GIF',2)\" onmouseout=MM_swapImgRestore() href='mod_" + strLesson + "_" + strPage + ".aspx'><IMG height=31 src='/LearnCenter/cboeeducation/Images/BackQuiz_R_Off.GIF' width=26 border=0 name=Next></A></td>");           
   }

   document.write("<td><IMG height=31 src='/LearnCenter/cboeeducation/Images/BttnBttm.GIF' width=53></td></tr></table>");

}

function PrintMenuBarPrevPage(Lesson,PrevPage,CurrPage,TotalPage) {

   var strPage, strLesson, tempPage,strPrevPage;
   strPrevPage=PrevPage;

   document.write("<table border=0 cellpadding=0 cellspacing=0><tr>");
   document.write("<td rowspan=7><IMG height=310 src='/LearnCenter/cboeeducation/Images/CntrColumn.GIF' width=33></td>");
   document.write("<td rowspan=7><IMG height=310  src='/LearnCenter/cboeeducation/Images/LeftColumn.GIF' width=26></td>");
   document.write("<td><IMG height=22 src='/LearnCenter/cboeeducation/Images/BttnTop.GIF' width=53></td></tr>");
                             
   document.write("<tr><td><A onmouseover=\"MM_swapImage('MainMenu','','/LearnCenter/cboeeducation/Images/MainMenu_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuMain();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/MainMenu_Off.GIF' width=53 border=0 name=MainMenu></A></td></tr>");
                     
   document.write("<tr><td><A onmouseover=\"MM_swapImage('Help','','/LearnCenter/cboeeducation/Images/Help_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuHelp();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/Help_Off.GIF' width=53 border=0 name=Help></A></td></tr>");
              
   document.write("<tr><td><A onmouseover=\"MM_swapImage('Glossary','','/LearnCenter/cboeeducation/Images/Glossary_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuGlossary();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/Glossary_Off.GIF' width=53 border=0 name=Glossary></A></td></tr>");

   document.write("<tr><td><A onmouseover=\"MM_swapImage('InstHome','','/LearnCenter/cboeeducation/Images/InstHome_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuInstHome();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/InstHome_Off.GIF' width=53 border=0 name=InstHome></A></td></tr>");

   document.write("<tr><td><A onmouseover=\"MM_swapImage('CBOEHome','','/LearnCenter/cboeeducation/Images/CBOEHome_On.GIF',1)\" onmouseout=MM_swapImgRestore() href=\"Javascript:MenuCBOEHome();\"><IMG height=48 src='/LearnCenter/cboeeducation/Images/CBOEHome_Off.GIF' width=53 border=0 name=CBOEHome></A></td></tr>");

   document.write("<tr><td><IMG height=48 src='/LearnCenter/cboeeducation/Images/Vacant.GIF' width=53></td></tr>");


   if(CurrPage == 1)
   {
      document.write("<tr><td><IMG height=31 src='/LearnCenter/cboeeducation/Images/Back_Nil.GIF' width=33 border=0 name=Back></td>");      
   }        
   else
   {
      tempPage=CurrPage-1;
      
      if(tempPage <10)
      { strPage = "0" + tempPage;}
      else
      { strPage = tempPage;}
      
      if(Lesson <10)
      { strLesson = "0" + Lesson;}
      else
      { strLesson = Lesson;}
      
      document.write("<tr><td><a href='mod_" + strLesson + "_" + strPrevPage + ".aspx' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Back','','/LearnCenter/cboeeducation/Images/Back_On.GIF',1)\"><img name=Back border=0 src='/LearnCenter/cboeeducation/Images/Back_Off.GIF' width=33 height=31></a></td>");
   }

   if(CurrPage == TotalPage)
   {
      document.write("<td><img name=Next border=0 src='/LearnCenter/cboeeducation/Images/Next_Nil.GIF' width=26 height=31></td>");
   }
   else
   {

      tempPage=CurrPage+1;
      
      if(tempPage <10)
      { strPage = "0" + tempPage;}
      else
      { strPage = tempPage;}
      
      if(Lesson <10)
      { strLesson = "0" + Lesson;}
      else
      {  strLesson = Lesson;}
      
      document.write("<td><A onmouseover=\"MM_swapImage('Next','','/LearnCenter/cboeeducation/Images/Next_On.GIF',1)\" onmouseout=MM_swapImgRestore() href='mod_" + strLesson + "_" + strPage + ".aspx'><IMG height=31 src='/LearnCenter/cboeeducation/Images/Next_Off.GIF' width=26 border=0 name=Next></A></td>");

   }

   document.write("<td><IMG height=31 src='/LearnCenter/cboeeducation/Images/BttnBttm.GIF' width=53></td></tr></table>");

}
//end PrintMenuBar


function PrintPageIndex(Course, Lesson, CurrPage, TotalPage) {

      document.write("<table border=0 cellpadding=0 cellspacing=0 width=668>");
      document.write("<tr><td width=421><IMG height=22 src='/LearnCenter/cboeeducation/Images/Corner_Bttm.GIF'></td>");
        
      document.write("<td background='/LearnCenter/cboeeducation/Images/PageIndex.GIF' width=247 valign=top align=middle class='PageIndex'><table border=0 valign=middle cellspacing=0 cellpadding=0 width=247 height=18>");
      document.write("<tr><td align=middle class='PageIndex'>&nbsp;<span class='CourseIndex'>Course " + Course + " Lesson " + Lesson + "</span>&nbsp;&nbsp;&nbsp;Page " + CurrPage + " / " + TotalPage + "&nbsp;</td>");
      document.write("</tr></table></td></tr></table>");
}

function PrintCornerImage() {
  document.write("<img src='/LearnCenter/cboeeducation/Images/Corner_Left.GIF' width=50 height=80>");
}

function NoLink() {
  return;
}

function printBanner() {
   //document.write("<img src='/LearnCenter/cboeeducation/Images/SampleAd.GIF'>");
   return;
}

<!--

MM_preloadImages('/LearnCenter/cboeeducation/Images/MainMenu_On.GIF','/LearnCenter/cboeeducation/Images/Help_On.GIF','/LearnCenter/cboeeducation/Images/Glossary_On.GIF','/LearnCenter/cboeeducation/Images/InstHome_On.GIF','/LearnCenter/cboeeducation/Images/CBOEHome_On.GIF','/LearnCenter/cboeeducation/Images/Back_On.GIF','/LearnCenter/cboeeducation/Images/Next_On.GIF');

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


