	var confirmed = false;

	function hl_on(obj)
	{
		obj.style.backgroundColor ="red";
		obj.style.borderColor ='gray';
		obj.style.borderWidth ='4';
	}
	var click;
	function hl_off(obj)
	{
		obj.style.backgroundColor ='#ffcc99';
		obj.style.borderColor ='#996633';
		obj.style.borderWidth ='4';	
	}		
	function checktop(afile)
	{
		
		if (top == self) 
		{		
			self.location.href=afile;
			
		}
		
	}
//IIS
function adjustNet(anum1,anum2)

	{

		var newline = "<br>";

		for (i=1;i<=anum1;++i)
		{

			document.write(newline);
		}//end for
	}//end adjust		
		   
	
	function book(num,name,price,section)
	{
		this.num = num;
		this.name = name;
		this.price = price;
		this.section = section;
	}
	function moveit()
	{
		setInterval("shiftBox()",50);

		
	}
////insert 
function flash()
	{
		setInterval(FlashNow,500);

	}

	function FlashNow()
	{

		logo = getElmById('imp');
		logo1 = getElmById('imp1');
	     if(window.document.getElementById)
	     {

		if (logo.style.visibility == 'visible')
		{
			logo.style.visibility = 'hidden';
			logo1.style.visibility ='visible';
		}else{
			
			logo.style.visibility = 'visible';
			logo1.style.visibility = 'hidden';
			
		}//end if
	     }//end if getElementById


	}//end Flashnow

	




////insert
	planeleft = 2;
function shiftBox()
{
	var elm = getElmById('globe');
	//alert('elm= ' + elm.style.left);


	if (window.document.getElementById)
	{
		//for ( i = 1; i<150; i++)
		if (planeleft < 600)
		{
		planeleft +=4;
       		// elm.style.left =20+i*3;
		elm.style.left = planeleft;
		//window.document.f.leftposition.value = elm.style.left;
		
		//alert(elm.style.left);
		//}//end for
		}//end if
		if (planeleft >590)
		{
			planeleft = 20;
			elm.style.left = planeleft;
			//window.document.f.leftposition.value = elm.style.left;


		}

	}//end if

	

}//end shiftbox



	
	function getElmById(eId)
	{
		if (document.getElementById)
		{
			element = document.getElementById(eId);

		}
//alert('element = ' + element);
		return element;

	}//end getElmById

function displayText(astring,ax,ay,acol,f,f1)
	{
		var div1='<div style="position:absolute;left:'+ax+';top:'+ay+';font-size:'+f+';color:'+acol+';z-index:2">'+astring+'</font></div>' 
		document.write(div1);
	
	}
	
	nbooks = window.parent.parent.nbooks;
nmebooks = window.parent.parent.nmebooks;
numbks = window.parent.parent.numbks;

thelength = window.parent.parent.thelength;
totlength = window.parent.parent.totlength;
thecost = window.parent.thecost;
theaction = window.parent.parent.theaction;
bks = window.parent.parent.bks;
	function submitForm()
	{
		
		var name =document.orderForm.Customer_Name.value;
		var emailAddress=document.orderForm.Email_Address.value;
		var telephone =document.orderForm.Telephone_No.value;
		var schoolName = document.orderForm.School_Name.value;
		var streetName = document.orderForm.Street_Name.value;
		var cityName = document.orderForm.City_Name.value;
		var postCode = document.orderForm.Post_Code.value;
		var dateTime = document.orderForm.Date_Time.value;
		var order = document.orderForm.Order.value;
		var cost = document.orderForm.Total_Cost.value;
//alert("js order.length = " + order.length);
//alert('js order = ' + order);
//alert('js bks.length = ' + bks.length);
//alert('js bks = ' + bks);
//alert('cost = ' + cost);		

		if (name.length < 3 )
			alert("Please Enter your full name" );

		else if (emailAddress.length < 5)
			alert("Please Enter your full EMAIL address");
		else if (telephone.length < 8)
			alert("Please Enter your full TELEPHONE number");
		else if (schoolName.length < 3)
			alert("Please Enter the full NAME of your organization");
		else if (streetName.length < 5)
			alert("Please enter the full STREET NAME");
		else if (cityName == "")
			alert("Please enter the CITY NAME");
		else if (postCode == "")
			alert("Please enter the POST CODE");
		else if (order.length == 0)
			alert("Please Fill in your order form");
		else
		{
			//form1 = document.forms['orderForm'];
			//alert ('form1.Order.value = ' + form1.Order.value);
			//document.orderForm.method = 'post';

			document.orderForm.action = "SendEmail.asp";

			document.orderForm.submit();

			 //alert('method = ' + document.orderForm.method);
		

//document.orderForm.action = "/cgi-bin/USER-dshandler.pl";
//document.orderForm.CGI.value = "Copy_OF_" + document.orderForm.CGI.value ;
//send a copy of the order through CGI
//document.orderForm.action = "SendEmail.asp";
	//document.orderForm.submit(form);

var getAction = document.orderForm.action;
//alert("The action = " + getAction);
//
			//document.orderForm.submit(form);

			alert ("Your Form has been submitted.  Thank you for your order. Orders can GET LOST on the internet.  If you DO NOT HEAR FROM US WITHIN 24 HOURS, please contact us." );
			//document.orderForm.reset(form);
                  resetOrder(form);
                  
			//confirmed = true;
		}
	}
nbooksflag = window.parent.nbooksflag;
	function resetOrder(form)
	{
		
		document.orderForm.reset(form)
		for (var i = 1; i < nbooks.length; ++i)
		{
			nbooks[i] = "";
			window.parent.thecost = 0;
//MUST use: window.parent.thecost to clear this variable in viewOrder.htm
		//alert("Thecost from scripts = " +window.parent.thecost);
			window.parent.bks = " **";	
				
		}
		
		//bks = "   <br> No....     | Name of Book.......... "                         | Unit Price     |    Total "
		//theaction = "viewOrder.htm";
 		window.parent.nbooksflag = 0;
           	self.location.href ="viewOrder.htm";
	}

	function changeAction()

	{

		window.parent.theaction = "SendEmail.asp";
		return theaction
	//alert("Change action = " + theaction);
	
	}
	function toconfirm()
	{
		if (confirmed == true) 
			parent.frames[1].location.href= 'section1.htm';
		else 
			confirm('You have not clicked SEND');

		
	} 
	function dateTime()
	{ 
		var days = new Array("Sun","Mon","Tues","Wed","Thur","Fri","Sat");
		var now = new Date();
		var month =new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sept","Oct","Nov","Dec");
		var result = days[now.getDay()];
		var yr = now.getYear();
		if (yr < 1900)
		   yr = 1900+yr;
result = result +", "+month[now.getMonth()]+ " "+now.getDate()+",  " +yr+"    "+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds();
		//result  += now.toLocaleString();
		
	  return result; 	
	}
	function tick()
	{
		//called from orderform htm file
		document.forms[0].Date_Time.value = dateTime();

		setTimeout("tick()",1000);
	}

