   <!--

//pre cache nav images
	
image1 = new Image ()
image1.src="images/aboutUs_O.gif"

image2 = new Image ()
image2.src="images/whyChoose_O.gif"

image3 = new Image ()
image3.src="images/downloadBrochure_O.gif"

image4 = new Image ()
image4.src="images/printerFriendly_O.gif"

image5 = new Image ()
image5.src="images/clientLogin_O.gif"

image6 = new Image ()
image6.src="images/AskTheArchitect_O.gif"

image7 = new Image ()
image7.src="images/LandscapingTips_O.gif"

image8 = new Image ()
image8.src="images/Testimonials_O.gif"

image9 = new Image ()
image9.src="images/Contact_O.gif"
	
	
function rollOver (imgSwap) {
			document[imgSwap].src = "images/"+imgSwap+"_O.gif"
		
		}

function rollOut (imgSwap) {
			document[imgSwap].src = "images/"+imgSwap+".gif"

		}
		
var Quotes = new Array()

Quotes[0]=	"<img src=\"images\/TestimonialsSec.gif\" alt=\"Testimonials\" width=\"170\" height=\"60\" border=\"0\"><p class=\"clientQuote\"><a href=\"testimonials/newtonTTlarge.jpg\" target=\"_blank\"><img src=\"testimonials/newtonTT.jpg\" alt=\"\" width=\"125\" height=\"125\" border=\"0\" align=\"right\"><\/a>\"Both Amy and I are extremely busy with our own professional careers, so it was a relief to have you and your firm plan and manage the entire process. Your orchestration of all the phases and your communication to us, allowed us to pursue our busy work schedules knowing that the project was proceeding on time and according to plan and schedule.\"<\/p><p class=\"clientName\">Client in Newton- existing home.<\/p><p class=\"ReadMore\"><a href=\"MoreTestimonials.htm\" class=\"SLDA\" >READ MORE Testimonials<\/a><\/p>"
		


Quotes[1]=	"<img src=\"images\/TestimonialsSec.gif\" alt=\"Testimonials\" width=\"170\" height=\"60\" border=\"0\"><p class=\"clientQuote\"><a href=\"testimonials/sudburyTTlarge.jpg\" target=\"_blank\"><img src=\"testimonials/sudburyTT.jpg\" alt=\"\" width=\"125\" height=\"125\" border=\"0\" align=\"right\"><\/a>\"The innovative use of computer generated graphics and life-style perspectives that you created for our project helped us understand what we had as a vision for our property. When the project was completed, we were amazed by the overall beauty and ambience that you helped us create for our home.\"<\/p><p class=\"clientName\">Client in Sudbury- existing home.<\/p><p class=\"ReadMore\"><a href=\"MoreTestimonials.htm\" class=\"SLDA\" >READ MORE Testimonials<\/a><\/p>"


Quotes[2]=	"<img src=\"images\/TestimonialsSec.gif\" alt=\"Testimonials\" width=\"170\" height=\"60\" border=\"0\"><p class=\"clientQuote\"><a href=\"testimonials/carlisleTTlarge.jpg\" target=\"_blank\"><img src=\"testimonials/carlisleTT.jpg\" alt=\"\" width=\"125\" height=\"125\" border=\"0\" align=\"right\"><\/a>\"When we contacted you, we were under intense timing pressures to get our front landscape redesigned for our summer wedding. With all the planning for the wedding, it was comforting to know that we could totally rely on you and your associates to implement our design on a tight schedule. Thank you for taking that element of stress out of our lives at that busy time. The wedding was beautiful, and the setting in our landscaped yard was a gorgeous venue for our special day.\"<\/p><p class=\"clientName\">Client in Carlisle- existing home.<\/p><p class=\"ReadMore\"><a href=\"MoreTestimonials.htm\" class=\"SLDA\">READ MORE Testimonials<\/a><\/p>"			
		
		

function PreLoad () {
	for (i=1;i<7;i++){
		imageP="image"+i+"pre"
		imageP= new Image ()
		imageP.src="portfolio/Image"+i+".jpg"
	
	}

}
	
	
function rollOver (imgSwap) {
			document[imgSwap].src = "images/"+imgSwap+"_O.gif"
		
		}

function rollOut (imgSwap) {
			document[imgSwap].src = "images/"+imgSwap+".gif"

		}
		
function ImageSelect (imgSwap,beforeAfter) {
			document.clientSample.src = "portfolio/"+imgSwap+".jpg"
			if(beforeAfter=="noBA"){
				document.BA.src = "portfolio/noBA.gif"
				
			} else if (beforeAfter=="yesBA") {
				
				document.BA.src = "portfolio/BA.gif"

			}

		}
		
function enlargeImage(){
		
			var curImage = document.clientSample.src
			var srcLength = curImage.length
			var findSlash = curImage.lastIndexOf("/")
			var fileName = curImage.substring((findSlash+1),(srcLength-4))
			var fileExt = curImage.substring((curImage.length-4),curImage.length)
			var fileSrc = "portfolio/"+fileName+"Large"+fileExt
			var enlargeWin = window.open('','','width=350,height=250,scrollbars=yes,resizable=yes')
			enlargeWin.document.write("<html><head><title>SLDA: "+fileName+"<\/title><script type='text\/javascript' language='Javascript'> function closeWin(){window.close();opener.focus()}<\/script><\/head>")
			enlargeWin.document.write("<body link='white' alink='white' bgcolor='black'><p align='center'><img src='"+fileSrc+"'><br><a href='javascript:closeWin()'><font face='Arial,Helvetica' size='-2' color='white'>CLOSE WINDOW<\/font><\/a><\/p>")
			enlargeWin.document.write('<\/body><\/html>')
			enlargeWin.document.close()
			
	
		}	


function beforeAfter(){
		
			var curImage = document.clientSample.src
			var srcLength = curImage.length
			var findSlash = curImage.lastIndexOf("/")
			var fileName = curImage.substring((findSlash+1),(srcLength-4))
			var fileExt = curImage.substring((curImage.length-4),curImage.length)
			var fileSrc = "portfolio/"+fileName+"BA"+fileExt
			var enlargeWin = window.open('','','width=350,height=250,scrollbars=yes,resizable=yes')
			enlargeWin.document.write("<html><head><title>SLDA: "+fileName+"<\/title><script type='text\/javascript' language='Javascript'> function closeWin(){window.close();opener.focus()}<\/script><\/head>")
			enlargeWin.document.write("<body link='white' alink='white' bgcolor='black'><p align='center'><img src='"+fileSrc+"'><br><a href='javascript:closeWin()'><font face='Arial,Helvetica' size='-2' color='white'>CLOSE WINDOW<\/font><\/a><\/p>")
			enlargeWin.document.write('<\/body><\/html>')
			enlargeWin.document.close()
			
	
		}	
		
		
function PlanSelect (imgSwap,beforeAfter) {
			document.clientSample.src = "portfolio/plans/"+imgSwap+".jpg"
			if(beforeAfter=="noBA"){
				document.BA.src = "portfolio/noBA.gif"
				
			} else if (beforeAfter=="yesBA") {
				
				document.BA.src = "portfolio/plans/seePP.gif"

			}

		}
		
function enlargePlan(){
		
			var curImage = document.clientSample.src
			var srcLength = curImage.length
			var findSlash = curImage.lastIndexOf("/")
			var fileName = curImage.substring((findSlash+1),(srcLength-4))
			var fileExt = curImage.substring((curImage.length-4),curImage.length)
			var fileSrc = "portfolio/plans/"+fileName+"Large"+fileExt
			var enlargeWin = window.open('','','width=350,height=250,scrollbars=yes,resizable=yes')
			enlargeWin.document.write("<html><head><title>SLDA: "+fileName+"<\/title><script type='text\/javascript' language='Javascript'> function closeWin(){window.close();opener.focus()}<\/script><\/head>")
			enlargeWin.document.write("<body link='white' alink='white' bgcolor='black'><p align='center'><img src='"+fileSrc+"'><br><a href='javascript:closeWin()'><font face='Arial,Helvetica' size='-2' color='white'>CLOSE WINDOW<\/font><\/a><\/p>")
			enlargeWin.document.write('<\/body><\/html>')
			enlargeWin.document.close()
			
	
		}	


function viewPP(){
		
			var curImage = document.clientSample.src
			var srcLength = curImage.length
			var findSlash = curImage.lastIndexOf("/")
			var fileName = curImage.substring((findSlash+1),(srcLength-4))
			var fileExt = curImage.substring((curImage.length-4),curImage.length)
			var fileSrc = "portfolio/plans/"+fileName+"PP"+fileExt
			var enlargeWin = window.open('','','width=350,height=250,scrollbars=yes,resizable=yes')
			enlargeWin.document.write("<html><head><title>SLDA: "+fileName+"<\/title><script type='text\/javascript' language='Javascript'> function closeWin(){window.close();opener.focus()}<\/script><\/head>")
			enlargeWin.document.write("<body link='white' alink='white' bgcolor='black'><p align='center'><img src='"+fileSrc+"'><br><a href='javascript:closeWin()'><font face='Arial,Helvetica' size='-2' color='white'>CLOSE WINDOW<\/font><\/a><\/p>")
			enlargeWin.document.write('<\/body><\/html>')
			enlargeWin.document.close()
			
	
		}	

function compileData() {
alert("compliing data");
return false

}		


function checkWholeForm(askDesigner) {
    var why = "";
   	why += isEmpty();
    why += checkEmail(askDesigner.email.value);
    why += checkPhone(askDesigner.phone.value);
    if (why != "") {

       alert("All fields are required. Fill in the following "+why);
       
       return false;
    }
	return true;
}
		
// email

function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "\nYou didn't enter an email address.\n";
}

    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "\nPlease enter a valid email address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "\nThe email address contains illegal characters.\n";
       }
    }
return error;    
}


// phone number - strip out delimiters and check for 10 digits

function checkPhone (strng) {
var error = "";
if (strng == "") {
   error = "\nYou didn't enter a phone number.\n";
}

var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
    if (isNaN(parseInt(stripped))) {
       error = "\nThe phone number contains illegal characters.";
  
    }
    if (!(stripped.length == 10)) {
	error = "\nThe phone number is the wrong length. Make sure you included an area code.\n";
    } 
return error;
}



function isEmpty() {
var error = "";
  if (document.theForm.name.value=="") {
     error += "Name"
  }
   if (document.theForm.address.value=="") {
     error += " Address"
  }
  if (document.theForm.city.value=="") {
     error += " City"
  }
  if (document.theForm.state.value=="") {
     error += " State"
  }
  if (document.theForm.zip.value=="") {
     error += " Zip"
  }
  if(document.theForm.Question){
 	 if (document.theForm.Question.value=="") {
   	  error += " Question"
 	 }
 } 
 if(document.theForm.username){
 	 if (document.theForm.username.value=="") {
   	  error += " Username"
 	 }
  }
  
 if(document.theForm.password){
 	 if (document.theForm.password.value=="") {
   	  error += " Password"
 	 }
  }  
  error+=""
return error;	  
}

//zip code


//-->

function checkSurvey(theForm) {

	surveyOption = -1;
	errorTxt=0;
for (i=0;i<theForm.ques1.length; i++){

if (theForm.ques1[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}
if (surveyOption == -1){errorTxt=1}

for (i=0;i<theForm.ques2.length; i++){

if (theForm.ques2[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}
if (surveyOption == -1){errorTxt+=1}

for (i=0;i<theForm.ques3.length; i++){

if (theForm.ques3[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}
if (surveyOption == -1){errorTxt+=1}


for (i=0;i<theForm.ques4.length; i++){

if (theForm.ques4[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}if (surveyOption == -1){errorTxt+=1}


for (i=0;i<theForm.ques5.length; i++){

if (theForm.ques5[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}if (surveyOption == -1){errorTxt+=1}


for (i=0;i<theForm.ques6.length; i++){

if (theForm.ques6[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}if (surveyOption == -1){errorTxt+=1}


for (i=0;i<theForm.ques7.length; i++){

if (theForm.ques7[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}if (surveyOption == -1){errorTxt+=1}


for (i=0;i<theForm.ques8.length; i++){

if (theForm.ques8[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

} if (surveyOption == -1){errorTxt+=1}



for (i=0;i<theForm.ques9.length; i++){

if (theForm.ques9[i].checked){ surveyOption = 1; break; }else { surveyOption = -1; }

}if (surveyOption == -1){errorTxt+=1}


if (theForm.name.value==""){ surveyOption = -1;errorTxt+=1; }

emailAlert = checkEmail(theForm.CustEmail.value);
if(emailAlert){
errorTxt+=1
}

	
	if (errorTxt > 0){
		alert ("All questions, name & email are required." + emailAlert);
		return false;
		
	}

return true;
	
}

function navRollOvers() {


var navLinks = document.getElementsByTagName("a") ;

for(i=0;i<navLinks.length;i++) {
		

	if(navLinks[i].parentNode.className =="MainNav" || navLinks[i].parentNode.className =="SubNav" || navLinks[i].parentNode.className =="BlueNav") {
	
	navLinks[i].setAttribute("target","_top")
	navLinks[i].onmouseover = function() {
		var currentSRC = this.childNodes[0].getAttribute("src")	
		currentSRC = currentSRC.substring(0,currentSRC.indexOf(".gif"))
		currentSRC += "_O.gif"
		this.childNodes[0].setAttribute("src",currentSRC)
	}
	navLinks[i].onmouseout = function() {
		var currentSRC = this.childNodes[0].getAttribute("src")
		currentSRC = currentSRC.substring(0,currentSRC.indexOf("_O"))
		currentSRC += ".gif"
		this.childNodes[0].setAttribute("src",currentSRC)
	}
	}
}

}
function loginPanel() {
	if(!document.getElementById("clientLogin")) return false;
	var clientLogin = document.getElementById("clientLogin");
	var loginLink = clientLogin.getElementsByTagName("a");
	loginLink[0].onclick = function() {
		var logIn = document.getElementById("login");
		logIn.className = "appear";
		return false;
	}
	var closePanel = document.getElementById("closePanel")
	closePanel.onclick = function() {
	var logIn = document.getElementById("login");
		logIn.className = ""
	}
}

function insertFormURL() {
if(!document.getElementById("mainForm")) return false;
var theForm = document.getElementById("mainForm");
theForm.setAttribute("action","processMe.php");


}



window.onload = function() {
    navRollOvers();
    loginPanel();
    insertFormURL();
}



