<!---- buttons  and roll over images -->

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) { //v3.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); 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];}

}

<!--- Script for quiz --->
 
// Extract score from URL
function setScore()
{
        var reScore = /score=(\d+)/;
        if(reScore.exec(location.search))
                {
                document.frmQuiz.score.value = RegExp.$1;
                //window.alert(RegExp.$1);
                }
        else
                {
                document.frmQuiz.score.value = 0;
                //window.alert("Score not found");
                }
} // setScore()
 
function setAction(value)
{
        var address;
 
        address = "question" + document.frmQuiz.page.value + value + ".html" + location.search;
        //window.alert(address);
        document.frmQuiz.action = address;
        //window.alert(document.frmQuiz.action);
        return true;
} // setAction()

function incScore()
{
        document.frmQuiz.score.value++;
} // incScore()
 
function getScore()
{
        var reScore = /score=(\d+)/;
        if(reScore.exec(location.search))
                {
                return RegExp.$1;
                }
        else
                {
                return 0;
                }
} // getScore()
 
function checkAnswer()
{
        var answer = document.frmQuiz.answer;
        var count = 0;
 
        //  check if more than one answer is given
        if ( answer.length == null )
                {
                if ( answer.checked ) count++;
                }
        else
                {
                for( k = 0; k < answer.length; k++ )
                        {
                        if ( answer[k].checked ) count++;
                        }
                }
 
        if ( count == 0 )
                alert( 'Please select an answer.' );
        else
                {
                document.frmQuiz.submit();
                }
} // checkSelection()

<!--- ***** Quick Time Movie java script -->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  	window.open(theURL,winName,features);
}
 
function openWindow(URL, WinName, options) {
       myWindow=open(URL, WinName, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=448,height=420");
}
 
function open_window(url)
{
	box = window.open(url, "box", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=448,height=450");
}
var slates = null;
var transcript = null;
var help = null;
function openTranscript(TRANSCRIPT)
{
 transcript = window.open(TRANSCRIPT,"transcript",config="left=430,screenx=0,top=20,screeny=0,height=530,width=370,menubar=yes,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes");
 transcript.focus();
}
function openHelp()
{
 help = window.open("videohelp.html","help",config="left=20,screenx=20,top=20,screeny=20,height=530,width=620,menubar=yes,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes");
 help.focus();
}
function openSlate(URL)
{
 slates = window.open(URL,"video",config="height=530,width=400,left=20,screenx=20,top=20,screeny=20,menubar=yes,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes");
 slates.focus();
}
function openMac(URL)
{
 slates = window.open(URL,"video",config="height=530,width=400,left=0,screenx=0,top=20,screeny=0,menubar=yes,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes");
 slates.focus();
}
function openMacTranscript(TRANSCRIPT)
{
 transcript = window.open(TRANSCRIPT,"transcript",config="left=430,screenx=0,top=20,screeny=0,height=530,width=370,menubar=yes,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes");
 transcript.focus();
}
function openMacHelp()
{
 help = window.open("/videohelp.html","help",config="left=20,screenx=20,top=yes,screeny=20,height=530,width=620,menubar=yes,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes");
 help.focus();
}