function status(a){document.getElementById("status").innerHTML=a}function stopNow(){timeID=0;player.sendEvent("PLAY","false");playing=false}function stopNow2(){timeID=0;player2.sendEvent("PLAY","false");playing=false}function playAt(a){player.sendEvent("SEEK",a);player.sendEvent("PLAY","true")}function playAt2(a){player2.sendEvent("SEEK",a)}function play(){player.sendEvent("PLAY","true")}function activateQuizModeSet(){set();activateQuizMode()}
if(document.all){docObj="document.all.";styleObj=".style";ie=true}else{docObj="document.";styleObj="";ie=false}var controlKeyDown=false,savedHTML;document.onkeyup=function(a){keyUp(a)};document.onkeypress=function(a){keyListener(a)};document.onkeydown=function(a){keyListener(a)};
function keyUp(a){if(ie)a=window.event;value=a.keyCode;if(value==17){controlKeyDown=false;if(newForm){a=document.getElementById("popup");if(a.style.visibility="visible")a.innerHTML=savedHTML;a.style.background="#DDDDFF"}else flip("T"+savedValue,"A"+savedValue)}}var log="";
function keyListener(a){if(ie)a=window.event;value=a.keyCode;if(value==81){toggleQuizMode();quiz_button.checked=_quizModeOn?true:false}else if(value==17)if(!controlKeyDown){controlKeyDown=true;if(newForm){a=document.getElementById("popup");if(a.style.visibility="visible"){savedHTML=a.innerHTML;a.innerHTML=eval("e"+savedValue)}a.style.background="pink"}else flip("A"+savedValue,"T"+savedValue)}}
function flip(a,b){a=document.getElementById(a);b=document.getElementById(b);a.style.visibility="hidden";b.style.visibility="visible";b.style.top=a.style.top;b.style.left=a.style.left}var ctrldown=false,_quizModeOn=false,hover_over_array;function toggleQuizMode(){if(quiz_button=document.getElementById("quiz_button"))if(_quizModeOn){quiz_button.value="Quiz Mode";deactivateQuizMode()}else{quiz_button.value="Normal Mode";activateQuizMode()}}
function activateQuizMode(){_quizModeOn=true;hover_over_array=[];for(i=0;i<hoverover_total;i++){element=document.getElementById("h"+i);hover_over_array.push(element.innerHTML);element.innerHTML="******"}}function deactivateQuizMode(){_quizModeOn=false;for(i=0;i<hoverover_total;i++)document.getElementById("h"+i).innerHTML=hover_over_array[i]}function hoverOver(a,b){hoverOver2(a,b,b+1)}
function hoverOver2(a,b,c){newid="h"+c;if(_quizModeOn&a.ctrlKey){document.getElementById(newid).innerHTML=hover_over_array[c];ctrldown=true}clearid!=-1&&window.clearTimeout(clearid);if(id!=newid){playSound(a,b);id=newid;currentvalue=b}if(ie)document.getElementById(newid).style.color="#9900FF"}var currentvalue=id=-1;function clearID(){id=-1}var clearid=-1;
function hoverOut(){if(ie)document.getElementById(id).style.color="#152588";clearid=setTimeout("clearID()",200);if(_quizModeOn&ctrldown){document.getElementById(id).innerHTML="******";ctrldown=false}}var loaded=false,paused=false,playing=false,ap,ap2;function display(a){}timeID2=timeID=showtimeID2=showtimeID=0;function startExit(){showtimeID!=0&&window.clearTimeout(showtimeID);showtimeID=setTimeout("noHover()",750)}
function startExit2(){showtimeID2!=0&&window.clearTimeout(showtimeID2);showtimeID2=setTimeout("noHover2()",750)}var popDownTables=[""];
function generate(a,b,c,d){showtimeID!=0&&window.clearTimeout(showtimeID);inBetween=d-c;if(inBetween>24)if(popDownTables[0].length==0){d=getMoreWords(1,c+25,d,"Below");generatePopdown(c,c+24,24,d,"");popDownTables[0]=generated}else generated=popDownTables[0];else if(popDownTables[0].length==0){generatePopdown(c,d,inBetween,"","");popDownTables[0]=generated}else generated=popDownTables[0];dropDown(a,b)}
function generateWithIndex(a,b,c,d){if(timeId==0){timeId=window.setInterval("advanceSlide()",100);window.clearTimeout(showtimeID);if(popDownTables.length>d)generated=popDownTables[d];else{a=getMoreWords(d-1,0,0,"Above");inBetween=c-b;if(inBetween>21){c=getMoreWords(d+1,b+22,c,"Below");generatePopdown(b,b+21,21,c,a);popDownTables[d]=generated}else generatePopdown(b,c,inBetween,"",a,true)}showie.innerHTML=generated}}var timeId=0;
function clearTimer(){if(timeId!=0){window.clearInterval(timeId);timeId=0}}function getMoreWords(a,b,c,d){a="generateWithIndex(event, "+b+", "+c+", "+a+")";return"<tr  onMouseOver='"+a+"'><td colspan=2 align=center><a href='javascript:"+a+"'>View Words "+d+"&nbsp;&nbsp;<img border=no src='/images/"+d+"arrow.gif'></a></td></tr>"}function generatePopdown(a,b,c,d,e,f){generatePopDown(a,b,c,d,e,false)}
function generatePopdown(a,b,c,d,e,f){generated="";generated+="<table bgcolor='#FFFFCC' cellspacing=0 cellpadding=0 width=600 border=0 ><tbody>"+e+"<tr><td valign='top' ><table cellpadding='2' cellspacing='2' border='0' width='100%'><tbody><tr><td valign='top'>";half=c/2;num=Math.floor(half);num<half&&num++;num+=a;c=0;for(i=a;i<num;i++){value=eval("t"+i);valueToCheck=eval("f"+i);if(valueToCheck=="X"||value=="X"){value=valueToCheck="";subtractBy++}value=="<br>"&&subtractBy++;generated+=secondSound?
"<tr><td><a href='javascript:display("+i+")'   onmouseover='playSound(event,"+(i-subtractBy)+", true)'>"+value+"</a></td><td><i>"+valueToCheck+"</i></td>":"<tr><td><b>"+value+"</b></td><td><i>"+valueToCheck+"</i></td>";c++}f&&addRows(c);c=0;generated+="</td></tr></tbody></table></td><td valign='top'><table cellpadding='2' cellspacing='2' border='0' width='100%'><tbody><tr><td valign='top'>";for(i=num;i<b;i++){value=eval("t"+i);valueToCheck=eval("f"+i);if(valueToCheck=="X"||value=="X"){value=valueToCheck=
"";subtractBy++}value=="<br>"&&subtractBy++;generated+=secondSound?"<tr><td><a href='javascript:display("+i+")'   onmouseover='playSound(event,"+(i-subtractBy)+", true)'>"+value+"</a></td><td><i>"+valueToCheck+"</i></td>":"<tr><td><b>"+value+"</b></td><td><i>"+valueToCheck+"</i></td>";c++}f&&addRows(c);generated+="</td></tr> </tbody></table></td></tr><tr><td valign='top' colspan='2'>";if(note!="X")generated+="<tr><td colspan='2'><div align='center'>"+note+subtractBy+"</div></td></tr>";generated+=
"</td></tr>"+d+"</tbody></table>"}function addRows(a){for(;a<12;){a++;generated+="<tr><td>&nbsp;</td></tr>"}}var subtractBy=0;function stopAt(a){timeID!=0&&window.clearTimeout(timeID);timeID=setTimeout("stopNow()",a*1E3)}function stopAt2(a){timeID2!=0&&window.clearTimeout(timeID2);timeID2=setTimeout("stopNow2()",a*1E3)}function play(a,b,c){if(genderMode)c=="m"?popUp(a,"ab"):popUp(a,"ac");else play(a,b)}
function popUp(a,b){id=b;if(ie){xc=document.body.clientWidth<a.x+151?parseInt(a.x)-150:parseInt(a.x);xy=document.body.clientHeight<a.y+60?parseInt(a.y)-60:parseInt(a.y);popUpWin=eval(docObj+b+styleObj);popUpWin.top=xy+20+document.body.scrollTop;popUpWin.left=Math.max(2,xc)+20;popUpWin.visibility="visible";popUpWin.status=""}else{xc=window.innerWidth<a.pageX+150?a.pageX-150:a.pageX+10;xy=window.innerHeight+window.pageYOffset<a.pageY+80?a.pageY-80:a.pageY+20;document.getElementById(id).style.top=xy+
"px";document.getElementById(id).style.left=xc+3+"px";document.getElementById(id).style.visibility="visible"}}function popDown(){document.getElementById(id).style.visibility="hidden"}function hover(){showtimeID!=0&&window.clearTimeout(showtimeID);showtimeID2!=0&&window.clearTimeout(showtimeID2);hovering=true}function noHover(){document.getElementById("Show").style.visibility="hidden"}function noHover2(){document.getElementById("Show2").style.visibility="hidden"}
function showPopup(a,b){popUp(a,b)}function showComment(a,b){document.getElementById("comments").innerHTML=""+eval(b);popUp(a,"comments")}function showPopupDisplay(a,b){id=b;document.getElementById("popup").innerHTML=""+eval(b);popUp(a,"popup")}function show(a,b){popUp(a,"A"+b)}function playSound(a,b){playSound(a,b,false)}var toStopAt=-1;
function playSound(a,b,c){if(loaded){playingSeg=b;if(b==-1){playing=true;toStopAt=times[0]-0.1;playAt(0);stopAt(toStopAt)}else if(c){playing=true;toPlay=times2[b];playAt2(toPlay);stop=times2[b+1]-toPlay;stopAt2(stop)}else{if(playing){window.clearTimeout(timeID);stopNow()}playing=true;toPlay=times[b];toStopAt=times[b+1]-toPlay;playAt(toPlay);stopAt(toStopAt-0.05)}}}function startTimer(){popDown("")}
function dropDown(a,b){showie=document.getElementById(b);showie.innerHTML=generated;id=b;if(ie){popUpWin=eval(docObj+b+styleObj);popUpWin.top=document.body.scrollTop+75;popUpWin.left=70;popUpWin.visibility="visible";popUpWin.status=""}else{document.getElementById(id).style.top=50;document.getElementById(id).style.left=70;document.getElementById(id).style.visibility="visible"}}var playingSeg,timeID,id,showPopups=true,new_form=false,englishPopupOn=false,newForm=false,translationShown=false;
function move(a,b){if(showPopups)if(newForm)controlKeyDown?showPopupDisplay(a,"e"+b):showPopupDisplay(a,"a"+b);else if(controlKeyDown){popUp(a,"T"+b);document.getElementById("A"+b).style.visibility="hidden";translationShown=true}else{if(translationShown){document.getElementById("T"+b).style.visibility="hidden";translationShown=false}popUp(a,"A"+b)}}
function playNow(){if(savedValue==-1){playAt(0);stopAt(times[0]-0.1)}else{toPlay=times[savedValue];playAt(toPlay);stop=times[savedValue+1]-toPlay;stopAt(stop-0.1)}}var savedValue;
function play(a,b){if(showPopups){savedValue=b;if(newForm)controlKeyDown?showPopupDisplay(a,"e"+b):showPopupDisplay(a,"a"+b);else controlKeyDown?popUp(a,"T"+b):popUp(a,"A"+b)}if(loaded){timeID!=0&&window.clearTimeout(timeID);playingSeg=b;playing=true;if(b==-1){playAt(0);stopAt(times[0]-0.1)}else{toPlay=times[b]+0.1;playAt(toPlay);stop=times[b+1]-toPlay;stopAt(stop-0.15)}}};

