// boxes.js
// Code for left sidebar and tree widget

function putJavaBox() {
	myHTML = '<div class="contentJava" style="margin-top:5px; z-index:1; clear:both;">'
	myHTML += '<img src="images/ijava16.png" alt="icon" class="leftIcon"\/> <b>Java</b>\n'
	myHTML += '<p class="smalltext">\n'
	myHTML += 'This page uses Java applets.\n'
	myHTML += '<br \/><i>It may take a little while to download the required files for the Java applets on your first visit. It should be much quicker for subsequent visits.</i>\n'
	myHTML += '<br \/>If you cannot see all the content you may need to install a Java plugin.\n'
	myHTML += '<\/p>\n<\/div>\n'
	document.write(myHTML);
}
function putFlash6(width, height, filename, theID, bgcolour) {
	document.write(getFlash6HTML(width, height, filename, theID, bgcolour));
}
function getFlash6HTML(w, h, fn, id, colour) {
	// hopefully this will bypass IE's new behaviour
	// w=width, h=height, fn=filename, id=id, colour=bg colour
		if (!id) {
			// if the id is not defined then make it (file-name up to first dot) + 'Obj'/'Embed'
			// this probably is inadequate, but...
			var temp = "";
			var fnParts = fn.split(".");
			id = fnParts[0];
		}
		if (!colour) {colour="#dddddd";}
	var myHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,0,0"/n width="' + w + '" height="' + h + '" id="' + (id+'Obj') + '">\n';
 		myHTML += '<param name="movie" value="' + fn + '"\/> ';
		myHTML += '<param name="quality" value="high"\/> <param name="bgcolor" value="' + colour + '"\/> ';
		myHTML += '<param name="menu" value="false"\/> '
		myHTML += '<embed src="' + fn  + '" quality="high" bgcolor="' + colour + '" ';
		myHTML += 'menu="false" width="' + w + '" height="' + h + '" type="application\/x-shockwave-flash" ';
		myHTML += 'pluginspage="http:\/\/www.macromedia.com\/shockwave\/download/\index.cgi?P1_Prod_Version=ShockwaveFlash" ';
		myHTML += 'swLiveConnect="true" id="' + (id+'Embed') + '" name="' + fn + '"><\/embed>\n';
   	 myHTML += '</object>\n';
		return (myHTML);
}

function putLevBox(strKS3,strGCSE,strAL) {
	if (!strKS3) {strKS3 = "N\/A";};
	if (!strGCSE) {strGCSE = "N\/A";};
	if (!strAL) {strAL = "assumed knowledge";};
	myHTML = '<div class="contentLevel" style="margin-top:5px; z-index:1; clear:both;">'
	myHTML += '<img src="images/iinfo16b.png" alt="icon" class="leftIcon"\/> <b>Levels<\/b>\n'
	myHTML += '<p class="smalltext">\n'
	myHTML += 'This page is designed for:\n'
	myHTML += '<br \/><b>KS3</b>\n<br \/>'
	myHTML += strKS3 + '\n'
	myHTML += '<br \/><b>GCSE</b>\n<br \/>'
	myHTML += strGCSE + '\n'
	myHTML += '<br \/><b>AS/A2</b>\n<br \/>'
	myHTML += strAL + '\n'
	myHTML += '<\/p>\n<\/div>\n'
	document.write(myHTML);
}

function putDlBoxTop() {
	myHTML = '<div class="headingDl" style="margin-top:5px; z-index:1; clear:both;">'
	if (myTheme.hasIcons) {
		myHTML += '<img src="' + myTheme.fileStem + 'links-icon.gif" class="smallicon" \/>'
	}
	myHTML += 'Downloads' + '<\/div>\n'
	myHTML += '<div class="contentDl">\n'
	myHTML += '<span class="smalltext">\n'
	document.write(myHTML);
}

function putDlBoxBottom() {
	myHTML = '<\/span>\n<\/div>\n'
	if (myTheme.isPanel) {
		myHTML += '<div class="bottomDl"></div>\n'
	}
	document.write(myHTML);
}

