startList = function() {
	
	if( !document.getElementById ) {
		return;
	}

	thehead = document.getElementById("header");

	var iRandSeed = Math.random();

	if( iRandSeed < 0.26 )
		thehead.className = "main_content_area_head1";
	else if( iRandSeed > 0.25 && iRandSeed < 0.51 )
		thehead.className = "main_content_area_head2";
	else if( iRandSeed > 0.5 && iRandSeed < 0.76 )
		thehead.className = "main_content_area_head3";
	else
		thehead.className = "main_content_area_head4"; 

	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {

		node = navRoot.childNodes[i];

		if (node.nodeName=="LI") {

			node.onmouseover=function() {
				this.className+=" over";
			}

			node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
			}

		}  			

	}		

}
window.onload=startList;


function checkDiscount() 
{
	var q1, q2, q3;
	
	q1=document.getElementById("q1").value;
	q2=document.getElementById("q2").value;
	q3=document.getElementById("q3").value;
	
	discountSpan = document.getElementById("discount1_reveal");
	if( discountSpan.className.search(" down") > 0 ) {
		discountSpan.className=discountSpan.className.replace(" down", "");		
	}
	
	discountSpan = document.getElementById("discount2_reveal");
	if( discountSpan.className.search(" down") > 0 ) {
		discountSpan.className=discountSpan.className.replace(" down", "");		
	}
	
	discountSpan = document.getElementById("discount3_reveal");
	if( discountSpan.className.search(" down") > 0 ) {
		discountSpan.className=discountSpan.className.replace(" down", "");		
	}	
	
	if( q1 == "?" || q2 == "?" || q3 == "?" )
		return;
		
	
	if( q1 == "YES" && q2 == "YES" && q3 == "LAST" ) {
		
		//alert("Had product for the last exam and want to sit the next exam...\n\nWe can offer you the same product at the discounted price of 44.96" );	
		discountSpan = document.getElementById("discount1_reveal");
		discountSpan.className+=" down";		
	}
	else if( q1 == "YES" && q2 == "YES" && q3 == "LASTBUTONE" ) {
 		
 		//alert("Had product for the last but one exam and want to sit the next...\n\nWe can offer you the same product at the discounted price of 59.95");
		discountSpan = document.getElementById("discount2_reveal");
		discountSpan.className+=" down"; 		
	}
	else {
		
		//alert("You qualify for a 20% discount off the list price of any of the OSPRE Part 1 questions.");	
		discountSpan = document.getElementById("discount3_reveal");
		discountSpan.className+=" down";		
	}
	
	document.getElementById("discountForm").reset();
	document.getElementById("q1").focus();

}
