

function btover(btnval) {
filename='images/navbtn/'+btnval+'OVER.gif';
overim='IMAGE'+btnval+'OVER';
document.images[btnval].src=filename;
}



function btdown(btnval) {
filename='images/navbtn/'+btnval+'DOWN.gif';
document.images[btnval].src=filename;
}

function btmain(btnval) {
filename='images/navbtn/'+btnval+'MAIN.gif';
document.images[btnval].src=filename;
}





function freemail() {
window.open('http://registernet.passport.net/reg.srf','','scrollbars=yes,height=400,width=530,scrolling');
}



///////////////////////  FORM SUBMISSION CHECKS


function checkFname(){
//    if (contact.fname.value.length ==""){
//        alert("Please enter your first name.");
//      	contact.fname.focus();
//	return false;
//    }
    return true;
}

function checkFnameQ(){
//    if (quote.fname.value.length ==""){
//       alert("Please enter your first name.");
//       	quote.fname.focus();
//	return false;
//    }
    return true;
}


function checkArea(){
    if (contact.query.value.length > 500){
        alert("Please reduce the size of your query. It is too long to be processed.");
       	contact.query.focus();
       	contact.query.select();
    }
    return true;
}

function checkArea1(trans){

var info=trans.value;

    if (info.length > 200){
        alert("Please reduce the size of your comments. They are too long to be processed.");
       	trans.focus();
       	trans.select();
    }
 //   return true;
}

function checkData(data) {

var ipaddress=contact.address.value;

    if (contact.query.value.length < 10){
	alert("Please enter you communication into the form, then press Confirm again. (Proxy IP "+ipaddress+" recorded.)");
	return false;
	} 
	
    if (contact.fname.value.length ==""){
        alert("Please enter your first name. (Proxy IP "+ipaddress+" recorded.)");
       	contact.fname.focus();
	return false;
    }
    if (contact.phone.value.length < 6){
        alert("You must enter your daytime contact number. (Proxy IP "+ipaddress+" recorded.)");
       	contact.phone.focus();
       	contact.phone.select();
	return false;
    }
	return true;
}

function addFavourite(atag) {

agnt=navigator.userAgent.toLowerCase();

if (agnt.indexOf("msie") != -1) {

if (atag=="WebDev") {
atag="SiteSource - Web Sites that Work";
window.external.AddFavorite('http://www.sitesource.com.au',atag);
} else {
locators=document.URL;
atag="SiteSource - "+atag;
window.external.AddFavorite(locators,atag);
}

 } else {

if (atag=="DraftOrder") {
alert ("Simply bookmark this page to store your order, and return when you like. Prices will update automatically if changed.");
} else {
alert ("Auto storage is not supported by your browser. After we return you, please simply bookmark it.");
window.location='http://www.sitesource.com.au';
}

 }

} 

function checkDataQ(data) {

var ipaddress=quote.address.value;

    if (quote.email.value.length < 10){
	alert("You must enter a valid email address. (Proxy IP "+ipaddress+" recorded.)");
       	quote.email.focus();
       	quote.email.select();
	return false;
	} 

    if (quote.phone.value.length < 10){
	alert("You must enter your telephone number (including area code). (Proxy IP "+ipaddress+" recorded.)");
       	quote.phone.focus();
       	quote.phone.select();
	return false;
	} 
	
    if (quote.fname.value.length ==""){
        alert("Please enter your first name. (Proxy IP "+ipaddress+" recorded.)");
       	quote.fname.focus();
       	quote.fname.select();
	return false;
    }
	return true;
}




/////////////////////  ISP ACCESS LINKS





function adslCheck() {
window.open("http://www.telstra.com.au/adsl/ordering/search.cfm","","scrollbars=yes,height=400,width=800,resizable=yes,scrolling");
}

function ispReg(field) {
locator="includes/accesssignup.php?ref="+field;
window.open(locator,"accessor","scrollbars=yes,height=400,width=502,resizable=yes,scrolling");
}

function checkInfo(data) {

var ipaddress=access.ipinfo.value;

	
    if (access.fname.value.length ==""){
        alert("Please enter your first name. (Proxy IP "+ipaddress+" recorded.)");
       	access.fname.focus();
	return false;
    }

    if (access.lname.value.length ==""){
        alert("Please enter your last name. (Proxy IP "+ipaddress+" recorded.)");
       	access.lname.focus();
	return false;
    }

    if (access.bname.value.length > 0){
	
    	if (access.abn.value.length < 11){
        alert("Businesses must also enter their ABN. (Proxy IP "+ipaddress+" recorded.)");
       	access.abn.focus();
       	access.abn.select();
	return false;
	}
    }

    if (access.phone.value.length < 6){
        alert("You must enter your daytime contact number. (Proxy IP "+ipaddress+" recorded.)");
       	access.phone.focus();
       	access.phone.select();
	return false;
    }


    if (access.adslphone.value.length < 10){
        alert("Enter the line number ADSL will be activated on. (Proxy IP "+ipaddress+" recorded.)");
       	access.adslphone.focus();
       	access.adslphone.select();
	return false;
    }


    if (access.address1.value.length ==""){
        alert("We need your address. (Proxy IP "+ipaddress+" recorded.)");
       	access.address1.focus();
       	access.address1.select();
	return false;
    }

    if (access.suburb.value.length ==""){
        alert("Your suburb please. (Proxy IP "+ipaddress+" recorded.)");
       	access.suburb.focus();
	return false;
    }

    if (access.pcode.value.length < 4){
        alert("Your post code please. (Proxy IP "+ipaddress+" recorded.)");
       	access.pcode.focus();
       	access.pcode.select();
	return false;
    }

    if (access.email.value.length < 8){
        alert("We need to send payment information to an email address. (Proxy IP "+ipaddress+" recorded.)");
       	access.email.focus();
       	access.email.select();
	return false;
    }

    if (access.payment.value.length < 2){
        alert("What is your prefered payment method. (Proxy IP "+ipaddress+" recorded.)");
       	access.payment.focus();
	return false;
    }


 return true;
}



