/* Prepare for Success - copyright (c) eLanguages / Univeristy of Southampton / UKCISA, 2008-2012. All rights reserved. Script (apart from Nifty Corners) copyright (c) Andrew Davey, A.Davey@soton.ac.uk */

/*Nifty Corners Cube - Rounded corners with CSS and Javascript Copyright 2006 Alessandro Fulciniti(a.fulciniti@html.it)This program is free software;you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation;either version 2 of the Licence, or(at your option)any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details.*/

function gef(){var isIE=navigator.appName.indexOf("Microsoft") != -1;return(isIE) ? window["fb"] : document["fb"];}
function pin(){gef().stf("moo");}
function de(d){return document.getElementById(d);}

var niftyOk=(de&&document.createElement&&Array.prototype.push);
String.prototype.find=function(what){return(this.indexOf(what)>=0 ? true : false);}
var oldol=window.onload;
if(typeof(NLd)!='function')NLd=function(){};
if(typeof(oldol)=='function')
window.onload=function(){oldol();NLd()};
else window.onload=function(){NLd()};

function Nifty(slt,ops){if(niftyOk==false)return;
var i,v=slt.split(","),h=0;
if(ops==null)ops="";
if(ops.find("fixed-height"))
h=gESl(v[0])[0].offsetHeight;
for(i=0;i<v.length;i++)
Rdd(v[i],ops);
if(ops.find("height"))SHi(slt,h);}

function Rdd(slt,ops){var i,top="",btm="",v=new Array();
if(ops!=""){ops=ops.replace("left","tl bl");ops=ops.replace("right","tr br");ops=ops.replace("top","tr tl");ops=ops.replace("bottom","br bl");ops=ops.replace("transparent","alias");
if(ops.find("tl")){top="both";if(!ops.find("tr"))top="left";}
else if(ops.find("tr"))top="right";
if(ops.find("bl")){
btm="both";
if(!ops.find("br"))btm="left";}
else if(ops.find("br"))btm="right";}
if(top==""&&btm==""&&!ops.find("none")){top="both";btm="both";}
v=gESl(slt);
for(i=0;i<v.length;i++){
FixIE(v[i]);
if(top!="")ATp(v[i],top,ops);
if(btm!="")ABt(v[i],btm,ops);}}

function ATp(el,side,ops){var d=CEl("b"),lim=4,border="",p,i,btype="r",bk,colour;
d.style.marginLeft="-"+gPd(el,"Left")+"px";
d.style.marginRight="-"+gPd(el,"Right")+"px";
if(ops.find("alias")||(colour=getBk(el))=="transparent"){colour="transparent";bk="transparent";border=getPB(el);btype="t";}
else{bk=getPB(el);border=Mix(colour,bk);}
d.style.background=bk;
d.className="niftycorners";
p=gPd(el,"Top");
if(ops.find("small")){d.style.marginBottom=(p-2)+"px";btype+="s";lim=2;}
else if(ops.find("big")){d.style.marginBottom=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginBottom=(p-5)+"px";
for(i=1;i<=lim;i++)
d.appendChild(CSt(i,side,colour,border,btype));
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);}

function ABt(el,side,ops){
var d=CEl("b"),lim=4,border="",p,i,btype="r",bk,colour;
d.style.marginLeft="-"+gPd(el,"Left")+"px";
d.style.marginRight="-"+gPd(el,"Right")+"px";
if(ops.find("alias")||(colour=getBk(el))=="transparent"){
colour="transparent";bk="transparent";border=getPB(el);btype="t";}
else{bk=getPB(el);border=Mix(colour,bk);}
d.style.background=bk;
d.className="niftycorners";
p=gPd(el,"Bottom");
if(ops.find("small")){
d.style.marginTop=(p-2)+"px";
btype+="s";lim=2;}
else if(ops.find("big")){d.style.marginTop=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginTop=(p-5)+"px";
for(i=lim;i>0;i--)
d.appendChild(CSt(i,side,colour,border,btype));
el.style.paddingBottom=0;
el.appendChild(d);}

function CSt(index,side,colour,border,btype){var x=CEl("b");x.className=btype+index;x.style.backgroundColor=colour;x.style.borderColor=border;if(side=="left"){x.style.borderRightWidth="0";x.style.marginRight="0";}else if(side=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0";}return(x);}

function CEl(x){return(document.createElement(x));}

function FixIE(el){
tempstyle=0;
if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false){
if(el.style.display=="none"){tempstyle=1;}else{tempstyle=0;};
el.style.display="inline-block";
if(tempstyle==1){el.style.display="none";}}}

function SHi(slt,maxh){
var i,v=slt.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
t=gESl(v[i]);
els=els.concat(t);}
for(i=0;i<els.length;i++){
if(els[i].offsetHeight>maxh)maxh=els[i].offsetHeight;
els[i].style.height="auto";}
for(i=0;i<els.length;i++){
gap=maxh-els[i].offsetHeight;
if(gap>0){
t=CEl("b");t.className="niftyfill";t.style.height=gap+"px";
nc=els[i].lastChild;
if(nc.className=="niftycorners")
els[i].insertBefore(t,nc);
else els[i].appendChild(t);}}}

function gESl(slt){
var i,j,selid="",selclass="",tag=slt,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(slt.find("#")){
if(slt.find(" ")){
s=slt.split(" ");
var fs=s[0].split("#");
if(fs.length==1)return(objlist);
f=de(fs[1]);
if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++)objlist.push(v[i]);}
return(objlist);}else{
s=slt.split("#");
tag=s[0];
selid=s[1];
if(selid!=""){
f=de(selid);
if(f)objlist.push(f);
return(objlist);}}}
if(slt.find(".")){
s=slt.split(".");
tag=s[0];
selclass=s[1];
if(selclass.find(" ")){
s=selclass.split(" ");
selclass=s[0];
tag2=s[1];}}
var v=document.getElementsByTagName(tag);
if(selclass==""){for(i=0;i<v.length;i++)objlist.push(v[i]);return(objlist);}
for(i=0;i<v.length;i++){c=v[i].className.split(" ");for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2=="")objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++)objlist.push(v2[k]);}}}}return(objlist);}

function getPB(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent")el=el.parentNode;if(c=="transparent")c="#FFFFFF";return(c);}

function getBk(x){var c=gSP(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)"))return("transparent");if(c.find("rgb"))c=r2h(c);return(c);}

function gPd(x,side){var p=gSP(x,"padding"+side);if(p==null||!p.find("px"))return(0);return(parseInt(p));}

function gSP(x,prop){if(x.currentStyle)return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)return(document.defaultView.getComputedStyle(x,'')[prop]);return(null);}

function r2h(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}return("#"+hex);}

function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}return("#"+r[0]+r[1]+r[2]);}

var qnum=46;var feqnum=42;var qn=new Array(12);var qs=new Array(12);var as=new Array(12);var reqajax;

function randq(){
qn[0]=(Math.floor(Math.random()*qnum))+1;
do{qn[1]=(Math.floor(Math.random()*qnum))+1;}while(qn[0]==qn[1]);
do{qn[2]=(Math.floor(Math.random()*qnum))+1;}while(qn[0]==qn[2]||qn[1]==qn[2]);
do{qn[3]=(Math.floor(Math.random()*qnum))+1;}while(qn[0]==qn[3]||qn[1]==qn[3]||qn[2]==qn[3]);
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=1&a="+qn[0]+"&b="+qn[1]+"&c="+qn[2]+"&d="+qn[3];
reqajax.onreadystatechange=randqr;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function randfeq(){
qn[0]=(Math.floor(Math.random()*feqnum))+1;
do{qn[1]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[1]);
do{qn[2]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[2]||qn[1]==qn[2]);
do{qn[3]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[3]||qn[1]==qn[3]||qn[2]==qn[3]);
do{qn[4]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[4]||qn[1]==qn[4]||qn[2]==qn[4]||qn[3]==qn[4]);
do{qn[5]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[5]||qn[1]==qn[5]||qn[2]==qn[5]||qn[3]==qn[5]||qn[4]==qn[5]);
do{qn[6]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[6]||qn[1]==qn[6]||qn[2]==qn[6]||qn[3]==qn[6]||qn[4]==qn[6]||qn[5]==qn[6]);
do{qn[7]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[7]||qn[1]==qn[7]||qn[2]==qn[7]||qn[3]==qn[7]||qn[4]==qn[7]||qn[5]==qn[7]||qn[6]==qn[7]);
do{qn[8]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[8]||qn[1]==qn[8]||qn[2]==qn[8]||qn[3]==qn[8]||qn[4]==qn[8]||qn[5]==qn[8]||qn[6]==qn[8]||qn[7]==qn[8]);
do{qn[9]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[9]||qn[1]==qn[9]||qn[2]==qn[9]||qn[3]==qn[9]||qn[4]==qn[9]||qn[5]==qn[9]||qn[6]==qn[9]||qn[7]==qn[9]||qn[8]==qn[9]);
do{qn[10]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[10]||qn[1]==qn[10]||qn[2]==qn[10]||qn[3]==qn[10]||qn[4]==qn[10]||qn[5]==qn[10]||qn[6]==qn[10]||qn[7]==qn[10]||qn[8]==qn[10]||qn[9]==qn[10]);
do{qn[11]=(Math.floor(Math.random()*feqnum))+1;}while(qn[0]==qn[11]||qn[1]==qn[11]||qn[2]==qn[11]||qn[3]==qn[11]||qn[4]==qn[11]||qn[5]==qn[11]||qn[6]==qn[11]||qn[7]==qn[11]||qn[8]==qn[11]||qn[9]==qn[10]||qn[10]==qn[11]);
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=7&a="+qn[0]+"&b="+qn[1]+"&c="+qn[2]+"&d="+qn[3]+"&e="+qn[4]+"&f="+qn[5]+"&g="+qn[6]+"&h="+qn[7]+"&i="+qn[8]+"&j="+qn[9]+"&k="+qn[10]+"&l="+qn[11];
reqajax.onreadystatechange=randqrfe;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function xan(xd,xq){return xd.getElementsByTagName(xq)[0].firstChild.data;}

function randqrfe(){try{if(reqajax.readyState==4){var xdoc=reqajax.responseXML.documentElement;
qn[0]=xan(xdoc,"na");qs[0]=xan(xdoc,"qa");as[0]=xan(xdoc,"aa");
qn[1]=xan(xdoc,"nb");qs[1]=xan(xdoc,"qb");as[1]=xan(xdoc,"ab");
qn[2]=xan(xdoc,"nc");qs[2]=xan(xdoc,"qc");as[2]=xan(xdoc,"ac");
qn[3]=xan(xdoc,"nd");qs[3]=xan(xdoc,"qd");as[3]=xan(xdoc,"ad");
qn[4]=xan(xdoc,"ne");qs[4]=xan(xdoc,"qe");as[4]=xan(xdoc,"ae");
qn[5]=xan(xdoc,"nf");qs[5]=xan(xdoc,"qf");as[5]=xan(xdoc,"af");
qn[6]=xan(xdoc,"ng");qs[6]=xan(xdoc,"qg");as[6]=xan(xdoc,"ag");
qn[7]=xan(xdoc,"nh");qs[7]=xan(xdoc,"qh");as[7]=xan(xdoc,"ah");
qn[8]=xan(xdoc,"ni");qs[8]=xan(xdoc,"qi");as[8]=xan(xdoc,"ai");
qn[9]=xan(xdoc,"nj");qs[9]=xan(xdoc,"qj");as[9]=xan(xdoc,"aj");
qn[10]=xan(xdoc,"nk");qs[10]=xan(xdoc,"qk");as[10]=xan(xdoc,"ak");
qn[11]=xan(xdoc,"nl");qs[11]=xan(xdoc,"ql");as[11]=xan(xdoc,"al");
gef().stf(qs[0],qs[1],qs[2],qs[3],qs[4],qs[5],qs[6],qs[7],qs[8],qs[9],qs[10],qs[11]);
de("ans").innerHTML="<span class='midq'><br/>Click on a question and the answer will appear in this box.<br/><br/></span>";}}catch(e){}}

function topq(){
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=2";
reqajax.onreadystatechange=randqr;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function topfeq(){
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=9";
reqajax.onreadystatechange=randqrfe;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function randqr(){try{if(reqajax.readyState==4)
{var xdoc=reqajax.responseXML.documentElement;
qn[0]=xan(xdoc,"na");qs[0]=xan(xdoc,"qa");as[0]=xan(xdoc,"aa");
qn[1]=xan(xdoc,"nb");qs[1]=xan(xdoc,"qb");as[1]=xan(xdoc,"ab");
qn[2]=xan(xdoc,"nc");qs[2]=xan(xdoc,"qc");as[2]=xan(xdoc,"ac");
qn[3]=xan(xdoc,"nd");qs[3]=xan(xdoc,"qd");as[3]=xan(xdoc,"ad");
try{de("q0").innerHTML=qs[0];
de("q1").innerHTML=qs[1];
de("q2").innerHTML=qs[2];
de("q3").innerHTML=qs[3];
de("q0b").innerHTML=qs[0];
de("q1b").innerHTML=qs[1];
de("q2b").innerHTML=qs[2];
de("q3b").innerHTML=qs[3];
de("faq0").style.display="";
de("faq1").style.display="";
de("faq2").style.display="";
de("faq3").style.display="";
de("faq0b").style.display="none";
de("faq1b").style.display="none";
de("faq2b").style.display="none";
de("faq3b").style.display="none";
if(qs[0]=="'"){de("faq0").style.display="none";}
if(qs[1]=="'"){de("faq1").style.display="none";}
if(qs[2]=="'"){de("faq2").style.display="none";}
if(qs[3]=="'"){de("faq3").style.display="none";}
de("ans").innerHTML="<span class='midq'><br/><br/>Click on a question and the answer will appear in this box.<br/><br/><br/></span>";}catch(e){;}}}catch(e){;}}

function rready(){try{if(reqajax.readyState==4){;}}catch(e){;}}

function qr(qnu){
try{de("ans").innerHTML=as[qnu];}catch(e){;}
for(var qq=0;qq<4;qq++){
if(!(qq==qnu)){
de("faq"+qq).style.display="";
de("faq"+qq+"b").style.display="none";
if(de("q"+qq).innerHTML=="'"){de("faq"+qq).style.display="none";}}}
de("faq"+qnu).style.display="none";
de("faq"+qnu+"b").style.display="";
de("qr"+qnu+"b").focus();
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=3&a="+qn[qnu];
reqajax.onreadystatechange=rready;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function qrfe(qnu){
try{de("ans").innerHTML=as[qnu];}catch(e){;}
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=8&a="+qn[qnu];
reqajax.onreadystatechange=rready;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function kwbut(kwnum){
try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=6&w="+kwnum;
reqajax.onreadystatechange=randqr;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}}

function toggle(x){if(x.style.display=="none"){x.style.display="" ;}else{x.style.display="none";}}
function gnx(sbro){ebro=sbro.nextSibling;while(ebro.nodeType!=1){ebro=ebro.nextSibling;}return ebro;}
function gpx(sbro){ebro=sbro.previousSibling;while(ebro.nodeType!=1){ebro=ebro.previousSibling;}return ebro;}

function sbutt(bnum){
var butlist=document.getElementsByTagName("button");
for(var ii=0;ii<13;ii++){
de("listt"+ii).style.display="none";
butlist[ii+4].style.background="transparent";}
for(var ii=0;ii<4;ii++){
if(!(ii==bnum)){
de("lists"+ii).style.display="none";
butlist[ii].style.background="transparent";}}
de("lists"+bnum).style.display="";
butlist[bnum].style.background="#f9dba4";
de("bltab").className="blue_tab";
de("ortab").className="orange_tab curro";
de("brock").style.display="none";

try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=4&a="+(bnum+1);
reqajax.onreadystatechange=rready;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}
var expday=new Date();
expday.setTime(expday.getTime()+604800000);
document.cookie="but=0"+bnum+";expires="+expday.toGMTString()+";path=/";}

function tbutt(bnum){
var butlist=document.getElementsByTagName("button");
for(var ii=0;ii<4;ii++){
de("lists"+ii).style.display="none";
butlist[ii].style.background="transparent";}
for(var ii=0;ii<13;ii++){
if(!(ii==bnum)){
de("listt"+ii).style.display="none";
butlist[ii+4].style.background="transparent";}}
de("listt"+bnum).style.display="";
butlist[bnum+4].style.background="#9be4f4";
de("ortab").className="orange_tab";
de("bltab").className="blue_tab currb";
de("brock").style.display="";

try{reqajax=new XMLHttpRequest();}catch(e){try{reqajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{reqajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}
var qtimtest=new Date().getTime();
qstring="http://www.prepareforsuccess.org.uk/q.php?time="+qtimtest+"&mode=5&a="+(bnum+1);
reqajax.onreadystatechange=rready;
reqajax.open("GET",qstring,true);
try{reqajax.send(null);}catch(e){;}
var expday=new Date();
expday.setTime(expday.getTime()+604800000);
var bp=bnum+4;
if(bp<=9){var bput="but=0"+bp;}else{var bput="but="+bp;}
document.cookie=bput+";expires="+expday.toGMTString()+";path=/";}

function cook(){
var ca=document.cookie.split(';');
for(var ai=0;ai<ca.length;ai++){
var c=ca[ai];
while(c.charAt(0)==' ')c=c.substring(1,c.length);
if(c.indexOf("but=")==0){var dcook=c.substring(4,c.length);}}
if(!dcook){return null;}
dco=parseInt(dcook,10);
if(dco<4){sbutt(dco);}else{tbutt(dco-4);}}

function uncook(){
var expday=new Date();
expday.setTime(expday.getTime()-604800000);
document.cookie="but=;expires="+expday.toGMTString()+";path=/";}

function watchdemo(){
if(de("wdem").style.display=="none"){
de("wdem").style.display="";
de("hdem").style.display="none";
de("wdemo").style.display="none";
de("wdemo").innerHTML="";
}else{
de("wdem").style.display="none";
de("hdem").style.display="";
de("wdemo").style.display="";
de("wdemo").innerHTML="<p><object type=\"application/x-shockwave-flash\" width=\"640\" height=\"293\" data=\"http://www.prepareforsuccess.org.uk/supportfiles/ukcisa_demo.swf\"><param name=\"movie\" value=\"http://www.prepareforsuccess.org.uk/supportfiles/ukcisa_demo.swf\"/></object></p><h3 class=\"pdf\"><a href=\"http://www.prepareforsuccess.org.uk/flash_demo_ukcisa.pdf\" target=\"_blank\">Audio transcript</a> (pdf, 9kb).</h3>";}}

function iehack(){try{
de("qr0").style.width=(de("lfaq").offsetWidth-66);
de("qr0b").style.width=(de("lfaq").offsetWidth-66);
de("qr1").style.width=(de("lfaq").offsetWidth-66);
de("qr1b").style.width=(de("lfaq").offsetWidth-66);
de("qr2").style.width=(de("rfaq").offsetWidth-66);
de("qr2b").style.width=(de("rfaq").offsetWidth-66);
de("qr3").style.width=(de("rfaq").offsetWidth-66);
de("qr3b").style.width=(de("rfaq").offsetWidth-66);}catch(e){;}}

function ft(){try{var ft=new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');return true;}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var ft=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return true;}}catch(e){}}return false;}

function prepare_elements(){
if(!ft()){var fl=document.getElementsByTagName("p");for(var fi=0;fi<fl.length;fi++){if(fl[fi].className=="aud"){fl[fi].style.display="none";gnx(fl[fi]).style.display="";}}};
var ieh=0;
if(navigator.appName=="Microsoft Internet Explorer")
{var ua=navigator.userAgent;
var re=new RegExp("MSIE([0-9]{1,}[\.0-9]{0,})");
var rv;
if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1);}
if(rv>=7.0){ieh=1;}}
var butlist=document.getElementsByTagName("button");
for(var t=0;t<butlist.length;t++)
{if((butlist[t].className=="feedback")||(butlist[t].className=="help")||(butlist[t].className=="review")){butlist[t].onclick=function(){var next=gnx(this);var next_again=gnx(next);toggle(this);toggle(next);toggle(next_again);next.focus();};}
if((butlist[t].className=="hidefeedback")||(butlist[t].className=="hidehelp")||(butlist[t].className=="hidereview")){butlist[t].onclick=function(){var prev=gpx(this);var next=gnx(this);toggle(this);toggle(prev);toggle(next);prev.focus();};}
if(butlist[t].className=="lbutr"){butlist[t].onclick=function(){randq();};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if(butlist[t].className=="lbutt"){butlist[t].onclick=function(){topq();};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if(butlist[t].className=="lbuttf"){butlist[t].onclick=function(){topfeq();};butlist[t].onmouseover=function(){de("lbh1").style.borderBottom="2px solid #069";};butlist[t].onmouseout=function(){de("lbh1").style.borderBottom="none";}}
if(butlist[t].className=="lbutrf"){butlist[t].onclick=function(){randfeq();};butlist[t].onmouseover=function(){de("lbh2").style.borderBottom="2px solid #069";};butlist[t].onmouseout=function(){de("lbh2").style.borderBottom="none";}}
if(butlist[t].className=="lbutd"){butlist[t].onclick=function(){watchdemo();};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="sbut")&&(t==0)){butlist[t].onclick=function(){sbutt((0));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="sbut")&&(t==1)){butlist[t].onclick=function(){sbutt((1));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="sbut")&&(t==2)){butlist[t].onclick=function(){sbutt((2));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="sbut")&&(t==3)){butlist[t].onclick=function(){sbutt((3));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==4)){butlist[t].onclick=function(){tbutt((0));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==5)){butlist[t].onclick=function(){tbutt((1));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==6)){butlist[t].onclick=function(){tbutt((2));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==7)){butlist[t].onclick=function(){tbutt((3));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==8)){butlist[t].onclick=function(){tbutt((4));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==9)){butlist[t].onclick=function(){tbutt((5));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==10)){butlist[t].onclick=function(){tbutt((6));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==11)){butlist[t].onclick=function(){tbutt((7));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==12)){butlist[t].onclick=function(){tbutt((8));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==13)){butlist[t].onclick=function(){tbutt((9));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==14)){butlist[t].onclick=function(){tbutt((10));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==15)){butlist[t].onclick=function(){tbutt((11));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="tbut")&&(t==16)){butlist[t].onclick=function(){tbutt((12));};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==2)){butlist[t].onclick=function(){kwbut(1)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==3)){butlist[t].onclick=function(){kwbut(2)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==4)){butlist[t].onclick=function(){kwbut(3)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==5)){butlist[t].onclick=function(){kwbut(4)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==6)){butlist[t].onclick=function(){kwbut(5)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==7)){butlist[t].onclick=function(){kwbut(6)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==8)){butlist[t].onclick=function(){kwbut(7)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==9)){butlist[t].onclick=function(){kwbut(8)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==10)){butlist[t].onclick=function(){kwbut(9)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==11)){butlist[t].onclick=function(){kwbut(10)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==12)){butlist[t].onclick=function(){kwbut(11)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==13)){butlist[t].onclick=function(){kwbut(12)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}
if((butlist[t].className=="kword")&&(t==14)){butlist[t].onclick=function(){kwbut(13)};butlist[t].onmouseover=function(){this.style.textDecoration="underline";};butlist[t].onmouseout=function(){this.style.textDecoration="none";};}}

var alist=document.getElementsByTagName("a");
for(var i=0;i<alist.length;i++){
if(alist[i].id=="qr0"||alist[i].id=="qr0b"){alist[i].onclick=function(){qr(0);return false;};}
if(alist[i].id=="qr1"||alist[i].id=="qr1b"){alist[i].onclick=function(){qr(1);return false;};}
if(alist[i].id=="qr2"||alist[i].id=="qr2b"){alist[i].onclick=function(){qr(2);return false;};}
if(alist[i].id=="qr3"||alist[i].id=="qr3b"){alist[i].onclick=function(){qr(3);return false;};}}
Nifty("div.round","big");Nifty("a.round","big");
if(de("lbh1")){de("lbh1").onmouseover=function(){de("lbh1").style.borderBottom="2px solid #069";};de("lbh1").onmouseout=function(){this.style.borderBottom="none";};de("lbh2").onmouseover=function(){this.style.borderBottom="2px solid #069";};de("lbh2").onmouseout=function(){this.style.borderBottom="none";};de("lbp").onmouseover=function(){this.style.borderBottom="2px solid #069";this.style.borderTop="2px solid #fff";};de("lbp").onmouseout=function(){this.style.borderBottom="none";this.style.borderTop="none";};}
if(de("lfaq")){randq();}
if(de("fb")){randfeq();}
if(de("lfaq")&&ieh){window.onresize=iehack;}
if(de("lists0")){cook();}
if(de("wdemo")){uncook();de("wdemo").innerHTML="";de("wdemo").style.display="";de("wdemo").style.display="none";}}
function updateScore0(){var a=0;if(de("tf1").GetVariable('/:myvar')=="false"){a++};if(de("tf2").GetVariable("/:myvar")=="true"){a++};if(de("tf3").GetVariable("/:myvar")=="false"){a++};if(de("tf4").GetVariable("/:myvar")=="false"){a++};if(de("tf5").GetVariable("/:myvar")=="true"){a++};if(de("tf6").GetVariable("/:myvar")=="false"){a++};if(de("tf7").GetVariable("/:myvar")=="false"){a++};if(de("tf8").GetVariable("/:myvar")=="true"){a++};de("yourScore").innerHTML=a;}
function updateScore0a(){var a=0;if(de('tf1').checked==true){a++};if(de('tf2').checked==true){a++};if (de('tf3').checked==true){a++};if(de('tf4').checked==true){a++};if(de('tf5').checked==true){a++};if(de('tf6').checked==true){a++};if(de('tf7').checked==true){a++};if(de('tf8').checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore1(){var a=0;if(de('tf1').GetVariable('/:myvar')=="true"){a++};if(de("tf2").GetVariable("/:myvar")=="true"){a++};if(de("tf3").GetVariable("/:myvar")=="true"){a++};if(de("tf4").GetVariable("/:myvar")=="true"){a++};if(de("tf5").GetVariable("/:myvar")=="true"){a++};if(de("tf6").GetVariable("/:myvar")=="true"){a++};if(de("tf7").GetVariable("/:myvar")=="true"){a++};if(de("tf8").GetVariable("/:myvar")=="true"){a++};if(de("tf9").GetVariable("/:myvar")=="true"){a++};if(de("tf10").GetVariable("/:myvar")=="true"){a++};de("yourScore").innerHTML=a;}
function updateScore1a(){var a=0;if(de('tf1').checked==true){a++};if(de('tf2').checked==true){a++};if (de('tf3').checked==true){a++};if(de('tf4').checked==true){a++};if(de('tf5').checked==true){a++};if(de('tf6').checked==true){a++};if(de('tf7').checked==true){a++};if(de('tf8').checked==true){a++};if(de('tf9').checked==true){a++};if(de('tf10').checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore2(){var a=0;if(de('tf1').checked==true){a++};if(de('tf2').checked==true){a++};if (de('tf3').checked==true){a++};if(de('tf4').checked==true){a++};if(de('tf5').checked==true){a++};if(de('tf6').checked==true){a++};if(de('tf7').checked==true){a++};if(de('tf8').checked==true){a++};if(de('tf9').checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore3(){var a=0;if(de('tf1').GetVariable('/:myvar')=="false"){a++};if(de("tf2").GetVariable("/:myvar")=="false"){a++};if(de("tf3").GetVariable("/:myvar")=="true"){a++};if(de("tf4").GetVariable("/:myvar")=="false"){a++};if(de("tf5").GetVariable("/:myvar")=="false"){a++};if(de("tf6").GetVariable("/:myvar")=="false"){a++};de("yourScore").innerHTML=a;}
function updateScore3a(){var a=0;if(de('tf1').checked==true){a++};if(de('tf2').checked==true){a++};if (de('tf3').checked==true){a++};if(de('tf4').checked==true){a++};if(de('tf5').checked==true){a++};if(de('tf6').checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore3b(){var a=0;if(de('tfa1').checked==true){a++};if(de('tfa2').checked==true){a++};if(de('tfa3').checked==true){a++};if(de('tfa4').checked==true){a++};if(de('tfa5').checked==true){a++};if(de('tfa6').checked==true){a++};if(de('tfa7').checked==true){a++};if (de('tfa8').checked==true){a++};if(de('tfa9').checked==true){a++};if(de('tfa10').checked==true){a++};de("yourScore2").innerHTML=a;}
function updateScore4(){var a=0;if(de('tf1').GetVariable('/:myvar')=="false"){a++};if(de("tf2").GetVariable("/:myvar")=="false"){a++};if(de("tf3").GetVariable("/:myvar")=="true"){a++};if(de("tf4").GetVariable("/:myvar")=="false"){a++};if(de("tf5").GetVariable("/:myvar")=="true"){a++};if(de("tf6").GetVariable("/:myvar")=="false"){a++};de("yourScore").innerHTML=a;}
function updateScore4a(){var a=0;if(de('tf1').checked==true){a++};if(de('tf2').checked==true){a++};if (de('tf3').checked==true){a++};if(de('tf4').checked==true){a++};if(de('tf5').checked==true){a++};if(de('tf6').checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore5(){var a=0;if(de('tf1').GetVariable('/:myvar')=="false"){a++};if(de("tf2").GetVariable("/:myvar")=="true"){a++};if(de("tf3").GetVariable("/:myvar")=="false"){a++};if(de("tf4").GetVariable("/:myvar")=="false"){a++};if(de("tf5").GetVariable("/:myvar")=="true"){a++};if(de("tf6").GetVariable("/:myvar")=="false"){a++};de("yourScore").innerHTML=a;}
function updateScore5a(){var a=0;if(de('tf1').checked==true){a++};if(de("tf2").checked==true){a++};if (de("tf3").checked==true){a++};if(de("tf4").checked==true){a++};if(de("tf5").checked==true){a++};if(de("tf6").checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore6(){var a=0;if(de("ans1").checked==true){a++};if(de("ans2").checked==true){a++};if (de("ans3").checked==true){a++};if(de("ans4").checked==true){a++};if(de("ans5").checked==true){a++};if(de("ans6").checked==true){a++};if(de("ans7").checked==true){a++};if (de("ans8").checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore6a(){var a=0;if(de("ans1").checked==true){a++};if(de("ans2").checked==true){a++};if(de("ans3").checked==true){a++};if(de("ans4").checked==true){a++};if(de("ans5").checked==true){a++};if(de("ans6").checked==true){a++};if(de("ans7").checked==true){a++};if (de("ans8").checked==true){a++};de("yourScore").innerHTML=a;}
function updateScore6b(){var a=0;if(de('tfa1').checked==true){a++};if(de('tfa2').checked==true){a++};if(de('tfa3').checked==true){a++};if(de('tfa4').checked==true){a++};if(de('tfa5').checked==true){a++};if(de('tfa6').checked==true){a++};if(de('tfa7').checked==true){a++};if (de('tfa8').checked==true){a++};de("yourScore2").innerHTML=a;}
window.onload=prepare_elements;
