﻿var ans = new Array;
				var done = new Array;
				var score = 0;
				ans[1] = "b";
				ans[2] = "b";
				ans[3] = "c";
				ans[4] = "b";
				ans[5] = "c";
				ans[6] = "b";
				ans[7] = "a";
				ans[8] = "b";
				ans[9] = "c";
				ans[10] = "c";
				ans[11] = "b";
				ans[12] = "c";
				ans[13] = "b";
				ans[14] = "a";
				ans[15] = "a";
				ans[16] = "c";
				ans[17] = "a";
				ans[18] = "a";
				ans[19] = "b";
				ans[20] = "c";
				ans[21] = "b";
				ans[22] = "a";
				ans[23] = "b";
				ans[24] = "c";
				
				
	 


					function Engine(question, answer) {
					if (answer != ans[question]) {
					if (!done[question]) {
					done[question] = -1;
						alert("That answer is incorrect. Please try again.");
					}
					else {
						alert("That answer is incorrect. Please try again.");
					   }
					}
					else {
					if (!done[question]) {
						done[question] = -1;
						document.getElementById('idHidden').style.display='block';
					}
					else {
						document.getElementById('idHidden').style.display='block';
						  }
					   }
					}

					function NextLevel () {
					if (score > 1) {
						alert("Please answer correctly before proceeding.");
					}
					if (score >= 1 && score <= 2) {
						document.getElementById('idHidden').style.display='block';
					}
					else {
						alert("Please answer correctly before proceeding.")
					   }
					}

function NavTo(url)
		{
		window.location = url
		}
	
		var current, min, max;
	    
	    function init()
	    {
			current = 100;
			min = 60;
			max = 300;
	    }
	
		/*function enlarge()
	    {    
	        var elem = document.getElementsByTagName('body');
			if (current < max)
			{
				current = current + 20;
				//alert(current);
				elem[0].style.fontSize = current + '%';
			}
	    }
		
		function smaller()
		{
			var elem = document.getElementsByTagName('body');
			if (current > min)
			{
				current = current - 20;
				//alert(current);
				elem[0].style.fontSize = current + '%';
			}
		}*/
		function enlarge()
	    {    
			if (current < max)
			{
				current = current + 40;
								
				var v_p = document.getElementById('ctl00_PlaceHolderMain_Content__ControlWrapper_RichHtmlField').getElementsByTagName('p');
				for(i = 0; i < v_p.length; i++)
				{
					var needsFont = true;
					var v_p_children = v_p[i].childNodes;
					for (j = 0; j < v_p_children.length; j++) {
						if ((v_p_children[j].tagName) && (v_p_children[j].tagName.toUpperCase() == 'FONT')) {
							needsFont = false;
							break;
						}
					}
					if (needsFont) {
						// no font tag inside this paragraph, add one
						var newFont = document.createElement('font');
						for (j = 0; j < v_p_children.length; j++) {
							newFont.appendChild(v_p_children[j]);
						}
						newFont.size = '3';
						v_p[i].appendChild(newFont);
					}
				}
				
				var v_font = document.getElementById('ctl00_PlaceHolderMain_Content__ControlWrapper_RichHtmlField').getElementsByTagName('font');
				for(i = 0; i < v_font.length; i++)
				{
					if (v_font[i].size != ''){ 
						//alert(v_font[i].size);
						v_font[i].size++;
					}
				}
				
				var v_div = document.getElementsByTagName('div');
				for(i = 0; i < v_div.length; i++)
				{
					//alert(v_div[i].className);
					if (v_div[i].className == 'pageTitle_Heart'){ 
						v_div[i].style.fontSize = current + 100 + '%';
					}
				}
			}	
	    }
		
		function smaller()
		{
			/*var elem = document.getElementsByTagName('body');
			if (current > min)
			{
				current = current - 20;
				//alert(current);
				elem[0].style.fontSize = current + '%';
			}*/
			if (current > min)
			{
				current = current - 40;
				
				var v_p = document.getElementById('ctl00_PlaceHolderMain_Content__ControlWrapper_RichHtmlField').getElementsByTagName('p');
				for(i = 0; i < v_p.length; i++)
				{
					var needsFont = true;
					var v_p_children = v_p[i].childNodes;
					for (j = 0; j < v_p_children.length; j++) {
						if ((v_p_children[j].tagName) && (v_p_children[j].tagName.toUpperCase() == 'FONT')) {
							needsFont = false;
							break;
						}
					}
					if (needsFont) {
						// no font tag inside this paragraph, add one
						var newFont = document.createElement('font');
						for (j = 0; j < v_p_children.length; j++) {
							newFont.appendChild(v_p_children[j]);
						}
						newFont.size = '3';
						v_p[i].appendChild(newFont);
					}
				}
				
				var v_font = document.getElementById('ctl00_PlaceHolderMain_Content__ControlWrapper_RichHtmlField').getElementsByTagName('font');
				for(i = 0; i < v_font.length; i++)
				{
					if (v_font[i].size != ''){ 
						//alert(v_font[i].size);
						v_font[i].size--;
					}
				}
				
				var v_div = document.getElementsByTagName('div');
				for(i = 0; i < v_div.length; i++)
				{
					//alert(v_div[i].className);
					if (v_div[i].className == 'pageTitle_Heart'){ 
						v_div[i].style.fontSize = current + 100 + '%';
					}
				}

			}
			
		}
		
		
		
		
		
		var imagePath = "../../images/tooltiparrow.gif";

function addwarning(){
var thealinks = document.getElementsByTagName("a");
if (!thealinks) { return; }

for(var x=0;x!=thealinks.length;x++){

if(thealinks[x].className == "addToolTip"){
thealinks[x].setAttribute("tooltiptext",thealinks[x].title);
thealinks[x].removeAttribute("title");
thealinks[x].onmouseover=function gomouseover(){ddrivetip(this.getAttribute("tooltiptext"))};
thealinks[x].onmouseout=function gomouseout(){hideddrivetip();};
}
}
}

var offsetfromcursorX=-7; //Customize x offset of tooltip
var offsetfromcursorY=23; //Customize y offset of tooltip

var offsetdivfrompointerX=13; //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=13; //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="theToolTip"></div>'); //write out tooltip DIV
document.write('<img id="ToolTipPointer" src="'+imagePath+'">'); //write out pointer image

var ie=document.all;
var ns6=document.getElementById && !document.all;
var enabletip=false;
if (ie||ns6) {
	var tipobj=document.all? document.all["theToolTip"] : document.getElementById? document.getElementById("theToolTip") : "";
}

var pointerobj=document.all? document.all["ToolTipPointer"] : document.getElementById? document.getElementById("ToolTipPointer") : "";

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!=="undefined") {tipobj.style.width=thewidth+"px";}
if (typeof thecolor!=="undefined" && thecolor!=="") {tipobj.style.backgroundColor=thecolor;}
tipobj.innerHTML=thetext;
enabletip=true;
return false;
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false;
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20;
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20;

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX;
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY;

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000;

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px";
nondefaultpos=true;
}
else if (curX<leftedge)
{tipobj.style.left="5px";}
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px";
pointerobj.style.left=curX+offsetfromcursorX+"px";
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px";
nondefaultpos=true;
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px";
pointerobj.style.top=curY+offsetfromcursorY+"px";
}
tipobj.style.visibility="visible";
if (!nondefaultpos) {pointerobj.style.visibility="visible";}
else{
pointerobj.style.visibility="hidden";}
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false;
tipobj.style.visibility="hidden";
pointerobj.style.visibility="hidden";
tipobj.style.left="-1000px";
tipobj.style.backgroundColor='';
tipobj.style.width='';
}
}


function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 16;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}