function feedback()
{
var quotes=new Array()

//change the quotes if desired. Add/ delete additional quotes as desired.


quotes[0]='Total Print Solutions has provided Heineken Qld with great service and alternatives to reduce our costs. <BR><BR>They suggest ways of creating systems to help streamline our design and print requirements and they are a great company to work with.<BR><BR><B>Nick Bainbrigge<BR>Heineken Queensland</b>'

quotes[1]='Total Print Solutions has given AMC the ability to streamline its brand in the marketplace.<BR><BR>This has generated a smart new look for AMC and one the company is very proud of.<BR><BR>Total Print Solutions has the flexibility to adapt to any graphic and printing request from AMC, and if the company does not already supply my request, they will find someone who can.<BR><BR>Each member of Total Print Solutions team are a delight to work with giving 100% to any requests.<BR><BR><B>Blair O\'Brien<BR>Australian Multiplex Cinemas</b>'

quotes[2]='Total Print Solutions are highly customer focused and provide a first class service.<br/><br/>Nothing is ever a problem for Steve and his team.<br/><br/>Not only can we rest assured that every job is competitively priced but that it will also be handled with care from ‘cradle to grave’.<br/><br/>Murray Jones<br/>Big Ideas Group'


var whichquote=Math.floor(Math.random()*(quotes.length))
document.write(quotes[whichquote])
}

function openPopup(a){
			win = window.open(a,"","width=530,height=380,scrollbars=yes, resizable=yes");
}


function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("refSource","organisationName","firstName","surname","email","phone");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("How did you hear about us?","Business Name","First Name","Surname","Email Address","Phone");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	
	var l_Msg = alertMsg.length;

	if (formobj.refSource.value == "none")
	{
		alert("Please tell us how you heard about us");
		return false;
	}
	else
	{
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}
		if (alertMsg.length == l_Msg){

				return true;

		}
	else
	{
	alert(alertMsg);
	return false;
	}
	}


}


function validateEmail(email) {

	var invalidChars = " /:,;";

	var charIndex = 0;

	

	while(email.charAt(charIndex) == " "){			//set the charIndex so that for loop below skips spaces infront of email address

		charIndex++;

	}

	

	for(var i=0; i<invalidChars.length; i++){

		badChar = invalidChars.charAt(i);

		if(email.indexOf(badChar, charIndex) > -1) {

			return false

		}	

	}

	var atPos = email.indexOf('@',1);		 

	if(atPos == -1){

		return false;

	}

	if(email.indexOf("@", atPos+1) != -1){    

		return false;

	}

	var periodPos = email.indexOf(".", atPos);	 

	if(periodPos == -1){

		return false;

	}

	if(periodPos+3 > email.length) {				// must be 2 characters after .

		return false;

	}

	return true;

}



function isNum(passedVal) {

	for(var i=0; i<passedVal.length; i++){

		if((passedVal.charAt(i) < "0") || (passedVal.charAt(i) > "9")){

			if((passedVal.charAt(i) != " ") && (passedVal.charAt(i) != "(") && (passedVal.charAt(i) != ")")){

				return false;

			}			

		}

	}

	return true;

}

// checks a string to see if it is all spaces

function isSpaces(string){

	var allSpacesBln = true;

	for(var i=0; i<string.length; i++){

		if((string.charAt(i) != " ")){

			allSpacesBln = false;					

		}

	}

	return allSpacesBln;



}



function address(form) {  

	 form.streetAddress.value = "";

	 form.streetCity.value = "";

 	 form.streetState.value = "";

	 form.streetPostcode.value = "";

	 form.sameStreetAddress.blur();

	 if(form.sameStreetAddress.checked || blnFirst){  //copy details over

		form.streetAddress.value = form.postalAddress.value;

		form.streetCity.value = form.postalCity.value;

		form.streetState.value = form.postalState.value;

		form.streetPostcode.value = form.postalPostcode.value;

		form.sameStreetAddress.blur();

	}else{ // set fields to blank

		form.streetAddress.value = "";

		form.streetCity.value = "";

		form.streetState.value = "";

		form.streetPostcode.value = "";

		form.sameStreetAddress.blur();

	}	

}

// submit button calls this function

function validateForm(form) {

	var clientDetailsBln = validateClientDetails(form);

	if(clientDetailsBln == false){

		return false;

	}else {

		var jobDetailsBln = validateJobDetails(form);

		if(jobDetailsBln == false){

			return false;

		}

		return true;

	}

}

	

	

function validateClientDetails(form){	

	var blnComplete = true;

	//current client check

	if((form.currentClient[1].checked == false) && (form.currentClient[0].checked == false)) {

		blnComplete = false;

		alert("We need to know whether you have ordered with TPS before");

		form.currentClient[0].focus();

		return false;	 

	}

	// check if 
	
	var refSource = form.refSource.value;

	if ((refSource == "none") && (form.currentClient[1].checked == true)) {

		blnComplete = false;

		alert("Please let us know how you heard about TPS")

		form.refSource.focus();

		return false;

	}

	// check first  name

	var firstNameStr = form.firstName.value;

	if(isSpaces(firstNameStr)) {

		blnComplete = false;

		alert("You need to enter a first name")

		form.firstName.focus();

		return false;

	}

	

	// check last name

	var lastNameStr = form.lastName.value;

	if(isSpaces(lastNameStr)) {

		blnComplete = false;

		alert("You need to enter a last name")

		form.lastName.focus();

		return false;

	}

	
	// check email address

	var emailStr = form.email.value;

	var phoneStr = form.phone.value;

	var faxStr = form.fax.value;

	var emailIsSpaces = isSpaces(form.email.value);

	var phoneIsSpaces = isSpaces(form.phone.value);

	var faxIsSpaces = isSpaces(form.fax.value);

	

	// check email address is valid

	if((!emailIsSpaces) && (emailStr.length != 0) && (emailStr != "none")){

		var blnEmail = validateEmail(form.email.value);

		if(blnEmail == false){

			alert("The email address you supplied has been miss typed");

			form.email.focus();

			return false;

		}	

	}

	// check phone number is a number

	if(phoneIsSpaces) {

		alert("Please supply a phone number");

		form.phone.focus();

		return false;

	}else if((!phoneIsSpaces) && (phoneStr.length != 0)){

		var blnIsNum = isNum(form.phone.value);

		if(blnIsNum == false){

			alert("Please check the phone number you entered and ensure that it is valid");

			form.phone.focus();

			return false;

		}

	}

	// check fax number

	if((!faxIsSpaces)  && (faxStr.length != 0) && (faxStr != "none")){

		var blnIsNum = isNum(form.fax.value);

		if(blnIsNum == false){

			alert("Please check the fax number you entered and ensure that it is valid");

			form.fax.focus();

			return false;

		}

	

	}

	// reply method checks

	var contactCnt = 0;

	if(phoneIsSpaces) {	 

		contactCnt++;

	}

	if(emailIsSpaces) {	 

		contactCnt++;

	}

	if(faxIsSpaces) {	 

		contactCnt++;

	}

	// multiple contact details, no reply method

	if((form.replyMethod.value == "none")) {

		blnComplete = false;

		alert("You need to select a reply method");

		form.replyMethod.focus();

		return false; 	

	}

	// reply method select but no details entered

	if(((form.replyMethod.value == "email") && (emailIsSpaces)) || ((form.replyMethod.value == "phone") && (phoneIsSpaces)) || ((form.replyMethod.value == "fax") && (faxIsSpaces))) {

		blnComplete = false;

		switch (form.replyMethod.value) {

			case "email":

				alert("You have selected reply by email but have not entered a valid email address");

				form.email.focus();

				break;

			case "phone":

				alert("You have selected reply by phone but have not entered a valid phone number");

				form.phone.focus();

				break;

			case "fax":

				alert("You have selected reply by fax but have not entered a valid fax number");

				form.fax.focus();

				break;	

			default:

				alert("You have selected a reply method but have not given the details for that method");

				form.replyMethod.focus();

		}

		return false; 	

	}

	if(blnComplete) {

		return true;

	}

}


	 function validateJobDetails(form){	
			return true;

	}


