


function playSound() {
 if (ie4) document.all['BGSOUND_ID'].src='DWCD0344_4_Full.mp3';
 if ((ns4||ns3)
  && navigator.javaEnabled()
  && navigator.mimeTypes['audio/x-midi']
  && self.document.Bach.IsReady()
 )
 {
  self.document.Bach.play()
 }
}

function stopSound() {
 if (ie4) document.all['BGSOUND_ID'].src='jsilence.mid';
 if ((ns4||ns3)
  && navigator.javaEnabled()
  && navigator.mimeTypes['audio/x-midi']
 )
 {
  self.document.Bach.stop()
 }
}



//DHTML function for FAQs
function toggle(object) {
	
  if (document.getElementById) {
	//alert(object);
    if (document.getElementById(object).style.display == 'block')
		//alert('This one')
      //document.getElementById(object).style.position = 'absolute';
      document.getElementById(object).style.display = 'none';
    else
		//alert('no This one')
      //document.getElementById(object).style.position = 'relative';
      document.getElementById(object).style.display = 'block';
  }

  else if (document.layers && document.layers[object] != null) {
  //alert(object);
    if (document.layers[object].display == 'block' ||
        document.layers[object].display == 'block' )
      document.layers[object].display = 'none';
    else
      document.layers[object].display = 'block';
  }

  else if (document.all) {
    if (document.all[object].style.display == 'block')
      document.all[object].style.display = 'none';
    else
      document.all[object].style.display = 'block';
  }
}

function Popup(title, url, height, width, left, top) {
//alert('here')
properties = "title=0,toolbar=0,location=0,scrollbars=1,height=" + height;
properties = properties + ",width=" + width;
properties = properties + ",left=" + left + ",top=" + top;
popupHandle = open(url, title, properties);
} 

function valForm(){
	//alert('here')
	if (document.Form1.ddlCountry.options[document.Form1.ddlCountry.selectedIndex].value == 0)
		{
			alert('Please select your country of origin');
			document.Form1.ddlCountry.focus();
			return false;
		}
	else
		{
			return true;
		}
}

function checkTerms()
	{
//		if (BookingForm.txtfname.value == '')
//			{
//				alert('Please enter your first name.')
//				BookingForm.txtfname.focus()
//				return false;
//			}
//		else if (BookingForm.txtlname.value == '')
//			{
//				alert('Please enter your last name.')
//				BookingForm.txtlname.focus()
//				return false;
//			}
//		else if (BookingForm.txtemail.value == '')
//			{
//				alert('Please enter your email address.')
//				BookingForm.txtemail.focus()
//				return false;
//			}
//		else if (BookingForm.txtdlnum.value == '')
//			{
//				alert('Please enter your drivers license number.')
//				BookingForm.txtdlnum.focus()
//				return false;
//			}
//		else if (BookingForm.seldlexpmonth.options[BookingForm.seldlexpmonth.selectedIndex].value == 0)
//			{
//				alert('Please select drivers license expiry - month.');
//				BookingForm.seldlexpmonth.focus()
//				return false;
//			}
//		else if (BookingForm.ddlage.options[BookingForm.ddlage.selectedIndex].value == 0)
//			{
//				alert('Please select drivers license age bracket.');
//				BookingForm.ddlage.focus()
//				return false;
//			}
//		else if (BookingForm.seldlexpyear.options[BookingForm.seldlexpyear.selectedIndex].value == 0)
//			{
//				alert('Please select drivers license expiry - year.');
//				BookingForm.seldlexpyear.focus()
//				return false;
//			}
//		if (BookingForm.chname.value == '')
//			{
//				alert('Please enter the name as it appears on your credit card.')
//				BookingForm.chname.focus()
//				return false;
//			}
//		else if (BookingForm.ccnum.value == '')
//			{
//				alert('Please enter your credit card number.')
//				BookingForm.ccnum.focus()
//				return false;
//			}
		if (BookingForm.selccexpmonth.options[BookingForm.selccexpmonth.selectedIndex].value == 0)
			{
				alert('Please select an expiry month for your credit card.');
				BookingForm.selccexpmonth.focus()
				return false;
			}
		else if (BookingForm.selccexpyear.options[BookingForm.selccexpyear.selectedIndex].value == 0)
			{
				alert('Please select an expiry year for your credit card.');
				BookingForm.selccexpyear.focus()
				return false;
			}
		else if (BookingForm.cardtype.options[BookingForm.cardtype.selectedIndex].value == 0)
			{
				alert('Please select a credit card type.');
				BookingForm.cardtype.focus()
				return false;
			}
		else if (!BookingForm.terms.checked) 
			{
			alert('To proceed you must check the I Agree checkbox.');
			BookingForm.terms.focus()
			return false;
			}

		else
			{
				return true;
			}
}
	
function checkModel(objSource, objArgs){
	var blnValid = true;
	var IntNumber = objArgs.Value;
	if (IntNumber == 0)
		{
			blnValid = false
		}
	else
		{
			blnValid = true
		}
	objArgs.IsValid = blnValid
	return;
}

function valNumber(theinput){
	if(isNaN(theinput.value))
		{
			theinput.value = 0;
			alert('You have just entered and invalid number.')
		}
	else
		{
			if (theinput.value < 0 || theinput.value > 999)
				{
					theinput.value = 0;
					alert('You have just entered and invalid number.')
				}
		}
}

function TimeIt(){
	setTimeout("ScrollIt()", 1000);
}

function ScrollIt(){
	window.scrollTo(0,300);
}