// Form Functions

  function checkArray(form, arrayName)
  {
    var retval = new Array();
    for(var i=0; i < form.elements.length; i++) {
      var el = form.elements[i];
      if(el.type == "checkbox" && el.name == arrayName && el.checked) {
        retval.push(el.value);
      }
    }
    return retval;
  }
  

	function checkjoinform (form) {	
	

		
	// ** START **
    var itemsChecked = checkArray(form, "xopt[]");
        if(itemsChecked.length == 0) {
      alert("Please select Website Requirements");
    return false;
    }
    // ** END **
	// ** START **
    if (form.xname.value == "") {
        alert( "Please enter your Full Name" );
        form.xname.focus();
        return false ;
    }
    // ** END **
	// ** START **
    if (form.xcompany.value == "") {
        alert( "Please enter your Company Name" );
        form.xcompany.focus();
        return false ;
    }
    // ** END **
	// ** START **
    if (form.xphone.value == "") {
        alert( "Please enter your Phone Number" );
        form.xphone.focus();
        return false ;
    }
    // ** END **
	// ** START **
    if (form.xemail.value == "") {
        alert( "Please enter your Email Address" );
        form.xemail.focus();
        return false ;
    }
	   // check for valid e-mail address
	if (form.xemail.value.indexOf("@")<1 ||
    	form.xemail.value.indexOf(".")==-1 ||
    	form.xemail.value.indexOf(",")!=-1 ||
    	form.xemail.value.indexOf(" ")!=-1 ||
    	form.xemail.value.length<6)
  	{
    	alert("Please enter a valid E-mail address.\n" +
    	"Example: myname@domainname.com");
    	form.xemail.focus();
    	return false
  	}
    // ** END **
	return true ;
}


// ROTATING QUOTES

var quote=new Array();
  quote[0]='<p>"I moved my hosting and mail services to TPP internet and it was probably the best business decision I have made in relation to these services. I have received nothing but perfection from the entire team at TPP Internet!"</p> <p class="name">Robert Ablinger<br />TCS R Direct</p>';    /* add as many quotes as you like!*/
  quote[1]='<p>"I moved my hosting and mail services to TPP internet and it was probably the best business decision I have made in relation to these services. I have received nothing but perfection from the entire team at TPP Internet!"</p> <p class="name">Robert Ablinger<br />TCS R Direct</p>';
  quote[2]='<p>"TPP Internet has been tops in providing their clients with excellent service and being such great people to work with. A big thanks to all the staff and management at TPP Internet for great service. First Prize!"</p> <p class="name">Dr Michael J Brennan<br />Teroma Pty Ltd</p>';
  quote[3]='<p>"It was a pleasure to have the professionalism of TPP staff guiding me through the daunting task of setting up a Website. Thanks to TPP I have had a huge increase in business. A great result. Thank you very much."</p> <p class="name">Terry Adair<br />Melbourne Mini Buses</p>';

var speed=10000;    /*this is the time in milliseconds adjust to suit*/
var q=0;

function showQuote() {

     document.getElementById("rotatingAd").innerHTML=quote[q];
     q++;
if(q==quote.length) {
     q=0;
  }
}
setInterval('showQuote()',speed);

