
// FORM VALIDATION

function checkjoinform ( form1 )
{
	// ** START **
    if (form1.xname.value == "") {
        alert( "Please enter your Full Name" );
        form1.xname.focus();
        return false ;
    }
    // ** END **
	// ** START **
    if (form1.xcompany.value == "") {
        alert( "Please enter your Company Name" );
        form1.xcompany.focus();
        return false ;
    }
    // ** END **
	// ** START **
    if (form1.xemail.value == "") {
        alert( "Please enter your Email Address" );
        form1.xemail.focus();
        return false ;
    }
	   // check for valid e-mail address
	if (form1.xemail.value.indexOf("@")<1 ||
    	form1.xemail.value.indexOf(".")==-1 ||
    	form1.xemail.value.indexOf(",")!=-1 ||
    	form1.xemail.value.indexOf(" ")!=-1 ||
    	form1.xemail.value.length<6)
  	{
    	alert("Please enter a valid E-mail address.\n" +
    	"Example: myname@domainname.com");
    	form1.xemail.focus();
    	return false
  	}
    // ** END **
	// ** START **
    if (form1.xphone.value == "") {	
        alert( "Please enter your Phone Number" );
        form1.xphone.focus();
		return false ;
    }

	if (isNaN(form1.xphone.value)) {
		alert('Please enter only numerical \nvalues and no spaces');
        return false ;
	}
  	// ** END **
	return true ;
}


// CLICK TO CALL

function ClicktoCall(id){
        var w=370;
        var h=450;
        var leftPos=(screen.width)?(screen.width-w)/2:100;
        var topPos=(screen.height)?(screen.height-h)/2:100;
        var settings='width='+w+',height='+h+',top='+topPos+',left='+leftPos+',';
        settings = settings+'location=no,directories=no,menubar=no,toolbar=no,';
        settings = settings+'status=no,scrollbars=no,resizable=no,dependent=no';
        var sUrl='http://www.nascomms.com/ccConnect/Dialer.aspx?clientId='+id;
        var ccWindow=window.open(sUrl,'ClickCalling',settings);
        ccWindow.focus();
}


// ROTATING QUOTES

var quote=new Array();
  quote[0]='<p>"With every dealing with TPP we have had instant solutions to any questions or technical support required which has been a breath of fresh air!"</p> <p class="name">Angie Ross<br />Spellbound Creative</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("quotes").innerHTML=quote[q];
     q++;
if(q==quote.length) {
     q=0;
  }
}
setInterval('showQuote()',speed);


