
		////*************************  default.htm    ***************
var divertOpera,newwindow;
function browserSniff()
	{
	var brwsversion = parseInt(navigator.appVersion.substring(0,1));
	if(navigator.appName == 'Opera')
	    {  
		if(brwsversion < 6)
			{ 	//Opera 5 won't display sliding image correctly
			divertOpera = window.open("defaultOp2.htm", newwindow, "menubar,statusbar,location")
			}
		else
			{
			document.getElementById('wel1').style.top = -3+'px';
			document.getElementById('wel1').style.left = -316+'px';
			document.getElementById('wel2').style.top = -2+'px';
			}
		}
	else if(navigator.appName == "Netscape")
		{
		if(brwsversion < 5)
			{
			alert("Sorry, but you should really update your browser to the new Netscape 7 or at least Netscape 6. Your browser is not capable of using this site.")
			}
		}
	document.getElementById('welcome1').style.visibility = 'visible';
	}  	

var item,thisitem,changer,i=0,changeColor,divwidth = 100;
var shadeArray = new Array();function shadeChange(){if(i < 5){thisitem.style.color = shadeArray[i];i++;}else{clearInterval(changeColor);thisitem.style.color = '#000000';i = 5;}}
var wi=0,j=0;function show(item){wi = 1;j++;while(wi < 9){document.getElementById('welcome'+wi).style.visibility = 'hidden';
wi++;}thisitem = document.getElementById(item);shadeArray[0] = '#bfbfbf';shadeArray[1] = '#a1a1a1';
shadeArray[2] = '#808080';shadeArray[3] = '#404040';shadeArray[4] = '#000000';if(i < 5 && item != 'technical' ){
thisitem.style.color='#e0e0e0';shadeChange();changeColor = setInterval("shadeChange()", 500);}else{clearInterval(changeColor);}
thisitem.style.visibility = 'visible';var thisdesc = document.getElementById('desc');if(item == 'browser'){
thisdesc.innerHTML = 'to '+item+' compatability';}else if(item == 'timer'){thisdesc.innerHTML = 'to automatic timing';}else if(item == 'delta'){
thisdesc.innerHTML = 'to '+item +' weighting';}else if(item == 'assess'){thisdesc.innerHTML = 'to administration';}
else if(item == 'technical'){stayopen = 5;}else{thisdesc.innerHTML = 'to '+item;}
thisdesc.style.visibility = 'visible';}function hide(item){var thisitem = document.getElementById(item);thisitem.style.visibility = 'hidden';
var thisdesc = document.getElementById('desc');thisdesc.innerHTML = "";clearInterval(changeColor);i = 0;if(j < 9){
document.getElementById('welcome'+j).style.visibility = 'visible';}else{document.getElementById('welcome1').style.visibility = 'visible';j = 2;}}
var i,nshow=false;function showpurpose(i){document.getElementById('purpose'+i).style.visibility = 'visible';
document.getElementById('entry').style.visibility = 'hidden';var k = 1;while(k < 9){document.getElementById('welcome'+k).style.visibility = 'hidden';
k++;}nshow = true;}function hidepurpose(i){document.getElementById('purpose'+i).style.visibility = 'hidden';
document.getElementById('entry').style.visibility = 'visible';var randomno = (Math.floor(Math.random()*8)+1);
document.getElementById('welcome'+randomno).style.visibility = 'visible';}var targ,other;function changeImage(targ,other)
{var activeimage = document.getElementById(targ+'Btn');activeimage.src = other;}var timervar,stayopen = 0;function showdrop(){
document.getElementById('technical').style.visibility = 'visible';stayopen = 3;}function hidedrop(){if(stayopen < 1){
document.getElementById('technical').style.visibility = 'hidden';countdown();}}function countdown(){
timervar = setInterval("openless()",1000);}function openless(){if(stayopen > 0){stayopen--;}else{document.getElementById('techtable').style.visibility = 'hidden';
stayopen == 0;clearInterval(timervar);}}function keepopen(){stayopen =5;clearInterval(timervar);}var oldtext;function resumeclose(oldtext)
{document.getElementById(oldtext).style.visibility = 'hidden';}var techwindow;function opentechnical(){var windowParams = "width=500px,height=350px,resizable,top=230px,left=270px";
techwindow = window.open("technical.htm", "newWindow", windowParams);}var submenu;function showme(submenu){var wwi = 1;while(wwi < 8){
document.getElementById(wwi).style.visibility = 'hidden';wwi++;}document.getElementById(submenu).style.visibility = 'visible';}function closesub(){
techwindow.close();}function closechildWind(){if(techwindow != null){if(techwindow.closed == false){techwindow.close()}}}
var texttoalter;function enlarge(texttoalter){
texttoalter.style.fontSize=14+'px';texttoalter.style.color='#ffffff';}function shrink(texttoalter){texttoalter.style.fontSize=12+'px';
texttoalter.style.color='#ffff00';};var oth,target;function changeImages(target,oth){var activeimage = document.getElementById(target);activeimage.src = oth;}function gobuycd()
{document.forms[0].action = 'cdprices.cfm';document.forms[0].submit();}
function gobuylms(){
document.forms[0].action = 'lmsdetails.cfm';
document.forms[0].submit();
}

var cdorder= new Array();
var s=0,cds="",orderdetail='';
cdorder[0] = new Array('Biology CDs (site)','Chemistry CDs (site)','ICT CDs (site)','MulteGraph CD (site)','Science CDs (site)','Maths Foundation (site)','Maths Higher (site)','Biology CDs (student)','Chemistry CDs (student)','ICT CDs (student)','MulteGraph CDs (student)','Science CDs (student)','Maths Foundation (student)','Maths Higher (student)')
cdorder[1]=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0);
//0;cdorder[1][1] = 0;cdorder[1][2] = 0;cdorder[1][3] = 0;cdorder[1][4] = 0;cdorder[1][10] = 0;cdorder[1][12] = 0;cdorder[1][11] = 0;cdorder[1][12] = 0;
//cdorder[1][5] = 0;cdorder[1][6] = 0;cdorder[1][7] = 0;cdorder[1][8] = 0;cdorder[1][9] = 0;
cdorder[2]=new Array('59.00','59.00','59.00','49.00','59.00','10.00','10.00','10.00','10.00','49.00','49.00','10.00','10.00','10.00');
function addup(s){var dt=0,gt=0,pt=0,rt=0,tt=0,n=0,p=0,st=0,t=0,dc=0,i=0,cost=0,cumtot=0;
n=document.getElementById(s).value;
if(isNaN(n)==true){alert("You must enter a valid number less than 100");document.getElementById(s).focus();document.getElementById(s).value=1;}
else if(n > 100){alert("You can order a maximum of 100. If you really do require more please contact us");document.getElementById(s).focus();document.getElementById(s).value=1;}
else if(n < 0){alert("You must order a minimum of 1 unit please");	document.getElementById(s).focus();	document.getElementById(s).value=1;	
}else{
	var i=1,j=0;
	while (i<14)
		{
		if(parseInt(document.getElementById(i).value)>0)
			{
			switch (i)
			{
			case 1:cost=cdorder[2][0];cdorder[1][0]=n;break;
			case 2:cost=cdorder[2][1];cdorder[1][1]=n;break;
			case 3:cost=cdorder[2][2];cdorder[1][2]=n;break;
			case 4:cost=cdorder[2][3];cdorder[1][3]=n;break;
			case 5:cost=cdorder[2][4];cdorder[1][4]=n;break;
			case 6:cost=cdorder[2][5];cdorder[1][5]=n;break;
			case 7:cost=cdorder[2][6];cdorder[1][6]=n;break;
			case 8:cost=cdorder[2][7];cdorder[1][7]=n;break;
			case 9:cost=cdorder[2][8];cdorder[1][8]=n;break;
			case 10:cost=cdorder[2][9];cdorder[1][9]=n;break;
			case 10:cost=cdorder[2][10];cdorder[1][10]=n;break;
			case 11:cost=cdorder[2][11];cdorder[1][11]=n;break;
			case 12:cost=cdorder[2][12];cdorder[1][12]=n;break;
			case 13:cost=cdorder[2][13];cdorder[1][13]=n;break;
			}
		orderdetail = orderdetail +cdorder[1][j]+" x "+cdorder[0][j]+" @ £"+cdorder[2][j]+"<br />"
		st =  parseFloat(cost * document.getElementById(i).value);
		cumtot=parseFloat(cumtot)+parseFloat(st);
		}
	i++;
	j++;
	}
	//orderdetail = cdorder[1][0]+" x "+cdorder[0][0]+" @ £"+cdorder[2][0]+"<br />"+cdorder[1][1]+" x "+cdorder[0][1]+" @ £"+cdorder[2][1]+"<br />"+cdorder[1][2]+" x "+cdorder[0][2]+" @ £"+cdorder[2][2]+"<br />"+cdorder[1][3]+" x "+cdorder[0][3]+" @ £"+cdorder[2][3]+"<br />"+cdorder[1][4]+" x "+cdorder[0][4]+" @ £"+cdorder[2][4]+"<br />"+cdorder[1][5]+" x "+cdorder[0][5]+" @ £"+cdorder[2][5]+"<br />"+cdorder[1][6]+" x "+cdorder[0][6]+" @ £"+cdorder[2][6]+"<br />"+cdorder[1][7]+" x "+cdorder[0][7]+" @ £"+cdorder[2][7]+"<br />"+cdorder[1][8]+" x "+cdorder[0][8]+" @ £"+cdorder[2][8]+"<br />"+cdorder[1][9]+" x "+cdorder[0][9]+" @ £"+cdorder[2][9];
	document.getElementById('goods').innerHTML = "£ " +cumtot+".00";
	pt=1.50;
	if(cumtot==0){pt=0};
	document.getElementById('post').innerHTML = "£ " +pt+"0";
	rt = parseFloat(cumtot) + parseFloat(pt);
	document.getElementById('total').innerHTML = "£ " +rt+"0";
	document.forms[0].cdsordered.value=orderdetail;
	document.forms[0].goodsval.value=cumtot;
	document.forms[0].postval.value=pt;
	document.forms[0].totalval.value=rt;
	}
}
var isvalidNum=false;
var thistext;
function checkisN(thistext)
{
var n = document.getElementById(thistext).value;
if(isNaN(n)==true){alert("This is not a valid number");document.getElementById(thistext).focus();document.getElementById(thistext).value=""; }
}
function resetform(){var i=1;while (i<14){document.getElementById(i).value =0;i++;}
document.getElementById('goods').innerHTML = "";document.getElementById('post').innerHTML = "";
document.getElementById('total').innerHTML = "";}
function sendNprint()
{
	document.forms[0].action='confirmorder.cfm';
	checkform('sp')
var ch;
}
function printorder(){checkform('po');}
var h;function showhow(h)
{if(h =='r'){document.getElementById('howto').innerHTML = 'Reset Form';}
else if(h =='s'){document.getElementById('howto').innerHTML = 'Print Form and send order';}
else if(h =='p'){document.getElementById('howto').innerHTML = 'Print Form for fax/posting';}
else if(h =='e'){document.getElementById('howto').innerHTML = 'Contact / Send Email';}
else document.getElementById('howto').innerHTML = "";
}
function hidehow(h)
{
document.getElementById('howto').innerHTML = "";
}
function checkform(ch)
{
if(document.forms[0].name.value==""){alert("You must complete your name please");document.forms[0].name.focus();}
else if (document.forms[0].position.value==""){alert("You must give your position please");document.forms[0].position.focus();}
else if (document.forms[0].dfes.value==""){alert("You must give your schools'LEA/DfES Number please");document.forms[0].dfes.focus();}
else if (document.forms[0].school.value==""){alert("You must give your school's name please");document.forms[0].school.focus();}
else if (document.forms[0].ad1.value==""){alert("You must give your school's address please");document.forms[0].ad1.focus();}
else if (document.forms[0].ad3.value==""){alert("You must give your school's town/city please");document.forms[0].ad3.focus();}
else if (document.forms[0].pcode.value==""){alert("You must give your school's Postcode please");document.forms[0].pcode.focus();}
else if (document.forms[0].order.value==""){alert("You must supply a valid school's order number please");document.forms[0].order.focus();}
else if (document.forms[0].phone.value==""){alert("You must supply a contact number within the  school number please");document.forms[0].phone.focus();}
else if (document.forms[0].email.value==""){alert("Is there an email address of your schools main contact?");document.forms[0].email.value="none";}
else{print();if(ch=='sp'){sendemail();}}
}
function sendemail(){document.forms[0].submit();}
function checkcountry(){if(document.forms[0].country.options[document.forms[0].country.selectedIndex].value != "UK") alert("Quoted Postage only applies to UK and Eire, please 'Send and Print' and let us to quote you for delivery to your location");}
var spanid;function revealspan(spanid){document.getElementById(spanid).style.visibility="visible";document.getElementById('default').style.visibility="hidden";}function hidespan(spanid){document.getElementById(spanid).style.visibility="hidden";document.getElementById('default').style.visibility="visible";}
var h,j;function changebg(h,j){document.getElementById(h).bgColor=j;}