function navRoll2(id,image)
{var button=document.getElementById(id);button.src=image;}
function navRoll(id)
{var but=document.getElementById(id);var rollover='_omo';var suffix=but.src.substring(but.src.lastIndexOf('.'));var omo=but.src.substring((but.src.lastIndexOf('.')-(rollover.length)),but.src.lastIndexOf('.'));var newsrc;if(omo==rollover){newsrc=but.src.substring(0,(but.src.lastIndexOf('.')-(rollover.length)));newsrc=newsrc+suffix;}
else{newsrc=but.src.substring(0,but.src.lastIndexOf('.'));newsrc=newsrc+rollover+suffix;}
but.src=newsrc;}
ctad_require("functions.js");m01=new Properties(1);m01.add('margin-left',"32px");m01.add(0,"subject-verb agreement");m01.add(1,"Using tenses");m01.add(2,"to be and to have");m01.add(3,"Common errors");m02=new Properties(3);m02.add('margin-left',"54px");m02.add(0,"Working with tables");m02.add(1,"Working with bar charts");m02.add(2,"Working with pie charts");m02.add(3,"Working with line graphs");m03=new Properties(2);m03.add('margin-left',"29px");m03.add(0,"text types");m03.add(1,"Using paragraphs");m03.add(2,"Using headings");m03.add(3,"Other text features");m04=new Properties(4);m04.add('margin-left',"20px");m04.add(0,"simplify");m04.add(1,"finding parts");m04.add(2,"sales");m05=new Properties(5);m05.add('margin-left',"45px");m05.add(0,"capitals");m05.add(1,"Sentences");m05.add(2,"Questions");HT_title=new Properties('titles');HT_title.add(5,"Punctuation");HT_title.add(4,"Fractions");HT_title.add(3,"Table, charts and graphs");HT_title.add(2,"Format and structure");HT_title.add(1,"Verbs and Tenses");function topNavigator()
{if(location.href.match(/sco_(\d+)/)!=null)
var	SCO=parseInt(location.href.match(/sco_(\d+)/)[1]);if(location.href.match(/(\/(\d{2})\/)sco_.*/)!=null)
HID=parseInt(location.href.match(/(\/(\d{2})\/)sco_.*/)[2]);var TitleImage=document.getElementById("title_img");if(TitleImage&&typeof HID!="undefined"){TitleImage.setAttribute("alt",HT_title.get(HID));TitleImage.src=TitleImage.src.replace(/\/images\/(\d)/,"/images/"+HID);}
Images=new Properties('images');var ImageListInit=document.getElementById('header');var AnchorListInit=document.getElementById('subnavigation')
if(!ImageListInit||!AnchorListInit)
return;var ImageList=ImageListInit.getElementsByTagName("img");var AnchorList=AnchorListInit.getElementsByTagName("a");var links=ImageListInit.getElementsByTagName("a");for(x in links){if(typeof links[x]!="object")continue;Location=location.href.substring(0,eval(location.href.lastIndexOf("/")+1));LinkLoca=links[x].href.substring(0,eval(links[x].href.lastIndexOf("/")+1));if(LinkLoca.search(Location)>-1&&links[x].innerHTML.match(/\<img/ig)!=null){startPos=links[x].innerHTML.substring(links[x].innerHTML.indexOf("src=\"")+5,links[x].innerHTML.length); 
ActiveLink = startPos.substring(0,startPos.indexOf("\""))
}}
if(SCO>=3&&SCO<7){TryOutBtn=document.getElementById("btn_p");if(TryOutBtn!=null){TryOutBtn.src=TryOutBtn.src.substring(0,TryOutBtn.src.lastIndexOf("."))+"_1_sel.jpg"
}
document.getElementById("subnavigation").style.visibility='visible';}
var y=0;for(x=0;x<ImageList.length;x++)
{o=ImageList[x];ext=o.getAttribute("src").match(/\S+\.(.*)/);if(ext!=null)
ext=ext[1];this.$status=false;if(o.src.match(/\/menu\/\d/)&&typeof HID!="undefined"){if(typeof getProperty(HID,y)=="undefined")
o.style.display='none';o.setAttribute("alt",getProperty(HID,y));if(y==0)
o.style.paddingLeft=getProperty(HID,'margin-left')
o.setAttribute("src","../images/menu/"+HID+"/buttonsselected_"+eval(13+y)+".jpg");if(typeof AnchorList[y]!="undefined")
AnchorList[y].setAttribute("title",getProperty(HID,y));y++;}
ActiveLink=ActiveLink.substring(ActiveLink.lastIndexOf("/"));if(o.src.search(ActiveLink)>-1)
o.$status=true;o.$sco=SCO;o.$mouseOut=LoadImage(o.src.replace("_omo",""));o.$mouseOver=LoadImage(o.src.substring(0,o.src.lastIndexOf('.'))+'_omo.'+ext);if(o.$status)
o.src=o.$mouseOver.src.replace("_omo","_sel");o.onmouseover=function(){if(this.$status||this.id=="title_img")return;if(this.$sco>=3&&this.$sco<7&&this.id=="btn_p")return;this.src=this.$mouseOver.src;}
o.onmouseout=function(){if(this.$status)return;if(this.$sco>=3&&this.$sco<7&&this.id=="btn_p")return;this.src=this.$mouseOut.src;}}}
function LoadImage(Path)
{var image=new Image()
image.src=Path;image.onerror=function(){}
return image;}
function Properties(id)
{if(typeof document.env=="undefined")
document.env=new Object();document.env[id]=new Object();this.$length=0;this.$_hWnd=document.env[id];this.add=function(name,value){this.$_hWnd[name]=value;this.$length++;}
this.get=function(name){return this.$_hWnd[name];}}
function getProperty(instance,name){return document.env[instance][name];}
event_install(window,"onload",topNavigator);
