function closeQuestionaire(){
        if (document.getElementById("QuestionaireBox")) {document.getElementById("QuestionaireBox").style.display = "none";}
        if (document.getElementById("ThankBox")) {document.getElementById("ThankBox").style.display = "none";}
	    document.getElementById("interVeil").style.display = "none";
	}


function sendQuestionaire(){
	var sErrors = "";
	var bValid = true;   
	var Situation = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['situation'].value;
	var Paymentmethod = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['paymentmethod'].value;
	var Colorrequirments = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['colorrequirments'].value;
	var Numbercopies = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['numbercopies'].value;
	var Comments = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['comments'].value;
    var Features = "";
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features1'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features1'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features2'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features2'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features3'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features3'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features4'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features4'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features5'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features5'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features6'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features6'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features7'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features7'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features8'].checked == true) {Features += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['features8'].value + " "};
    var Sizes = "";
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes1'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes1'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes2'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes2'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes3'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes3'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes4'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes4'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes5'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes5'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes6'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes6'].value + " "};
        if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes7'].checked == true) {Sizes += window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['othersize'].value + " "};

    var Fullname = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['fullname'].value;
    var Position = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['position'].value;
    var Telephone = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['telephone'].value;
    var Email = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['email'].value;
    var Fax = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['fax'].value;
    var Company = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['company'].value;
    var Address1 = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['address1'].value;
    var Address2 = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['address2'].value;
    var City = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['city'].value;
    var Postcode = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['postcode'].value;
    
        
	if(Situation.length == 0 || Situation == ""){sErrors = sErrors + "Please tell us about your photocopier situation\n"; bValid = false;}
	if(Paymentmethod.length == 0 || Paymentmethod == ""){sErrors = sErrors + "Please tell us how you wish to pay for your copier\n"; bValid = false;}
	if(Colorrequirments.length == 0 || Colorrequirments == ""){sErrors = sErrors + "Please tell us whether you require colour or black/white photocopies\n"; bValid = false;}
	if(Numbercopies.length == 0 || Numbercopies == ""){sErrors = sErrors + "Please tell us how many copies you expect to be making per month\n"; bValid = false;}
	if(Sizes.length == 0 || Sizes == ""){sErrors = sErrors + "Please tell us which sizes/types of paper you be printing on\n"; bValid = false;}
	
	if(Fullname.length == 0 || Fullname == "Full name"){sErrors = sErrors + "Please tell us your full name\n"; bValid = false;}
	if(Position.length == 0 || Position == "Position"){sErrors = sErrors + "Please tell us your position\n"; bValid = false;}
	if(Telephone.length == 0 || Telephone == "Telephone number"){sErrors = sErrors + "Please tell us your telephone number\n"; bValid = false;}
	if(Email.length == 0 || Email == "Email address"){sErrors = sErrors + "Please tell us your email address\n"; bValid = false;}
	if(Company.length == 0 || Company == "Company name"){sErrors = sErrors + "Please tell us your company name\n"; bValid = false;}
	if(Address1.length == 0 || Address1 == "First line of address"){sErrors = sErrors + "Please tell us your company address\n"; bValid = false;}
	if(City.length == 0 || City == "City"){sErrors = sErrors + "Please tell us your company city\n"; bValid = false;}
	if(Postcode.length == 0 || Postcode == "Postcode"){sErrors = sErrors + "Please tell us your company postcode\n"; bValid = false;}

	    if(bValid == false)
	    {
		    alert(sErrors);
	    }
	    else {
	    	    
	    document.getElementById("QuestionaireBox").style.display = "none";
	    document.getElementById("interVeil").style.display = "none";
        // send Email
        var message = "";
          message += "<html><body><p>Requirements:</p><p>";
          if (Situation.length != 0) {message += Situation + "<br/>";};
          if (Paymentmethod.length != 0) {message += Paymentmethod + "<br/>";};
          if (Colorrequirments.length != 0) {message += Colorrequirments + "<br/>";};
          if (Numbercopies.length != 0) {message += Numbercopies + "<br/>";};
          if (Features.length != 0) {message += "Required features : " + Features + "<br/>";};
          if (Sizes.length != 0) {message += "Required paper sizes : " + Sizes + "<br/>";};
          
          message += "</p>";
          if (Comments.length != 0 && Comments != "Please enter any other details you wish to give us. (1000 character limit.)") {message += "<p>" + Comments + "</p>";};

          message += "<p>Contact details:</p><p>";

          if (Fullname.length != 0) {message += Fullname + "<br/>";};
          if (Position.length != 0) {message += Position + "<br/>";};
          if (Telephone.length != 0) {message += "t : " + Telephone + "<br/>";};
          if (Fax.length != 0 && Fax != "Fax number") {message += "f : " + Fax + "<br/>";};
          if (Email.length != 0) {message += "e : " + Email + "<br/>";};
          if (Company.length != 0) {message += Company + "<br/>";};
          if (Address1.length != 0) {message += Address1 + "<br/>";};
          if (Address2.length != 0 && Address2 != "Second line of address") {message += Address2 + "<br/>";};
          if (City.length != 0) {message += City + "<br/>";};
          if (Postcode.length != 0) {message += Postcode + "<br/>";};
          
          message += "</p></body></html>";
           
          //send email to sales
          SendMessage ("admin@ccsmedway.co.uk", "admin@ccsmedway.co.uk", "mark@ccsmedway.co.uk", "", "Website call me request", message, "", "")
          emailwindow=dhtmlmodal.open('ThankBox', 'iframe', 'Thanks.asp?Sent=' + message , '', 'width=460px,height=500px,center=1,resize=0,scrolling=0')
	    }
	}
	
	
function sendQuoteMeHome(){
	var sErrors = "";
	var bValid = true;   
	var company = $("company").getValue();
	var name = $("name").getValue();
	var postcode = $("postcode").getValue();
	var email = $("email").getValue();

	var keyholder = "";
	var EarliestStart = "";
	var Latestfinish = "";
	var Budget = "";
	var CleaningSchedule = "";
	var CurrentCleaner = "";

	var telephone = $("telephone").getValue();
	if ($("keyholder")) { keyholder = $("keyholder").getValue(); }
	if ($("EarliestStart")) { EarliestStart = $("EarliestStart").getValue(); }
	if ($("Latestfinish")) { Latestfinish = $("Latestfinish").getValue(); }
	if ($("Budget")) { Budget = $("Budget").getValue(); }
	if ($("CleaningSchedule")) { CleaningSchedule = $("CleaningSchedule").getValue(); }
	if ($("CurrentCleaner")) { CurrentCleaner = $("CurrentCleaner").getValue(); }

	var comments = $("comments").getValue();  
	 
	 
	      
	if(company.length == 0 || company == "Company"){sErrors = sErrors + "Please tell us about your company name\n"; bValid = false;}
	if(name.length == 0 || name == "Name"){sErrors = sErrors + "Please tell us your company name\n"; bValid = false;}
	if(postcode.length == 0 || postcode == "Postcode"){sErrors = sErrors + "Please tell us your company postcode\n"; bValid = false;}
	if(email.length == 0 || email == "Email"){sErrors = sErrors + "Please tell us your email address\n"; bValid = false;}
	if(telephone.length == 0 || telephone == "Telephone number"){sErrors = sErrors + "Please tell us your telephone number\n"; bValid = false;}
	
	    if(bValid == false)
	    {
		    alert(sErrors);
	    }
	    else {
	    	  $("cleaning_form").hide();
	    	  $("cleaning_sent").show();
        // send Email
        var message = "";
          message += "<html><body><p>I need a cleaning company:</p><p>";
          if (company.length != 0) {message += company + "<br/>";};
          if (name.length != 0) {message += name + "<br/>";};
          if (postcode.length != 0) {message += postcode + "<br/>";};
          if (telephone.length != 0) {message += telephone + "<br/>";};
          if (email.length != 0) {message += email + "<br/>";};
          
          message += "</p>";
          if (comments.length != 0 && comments != "Please enter any other details you wish to give us. (1000 character limit.)") {message += "<p>" + comments + "</p>";};

          message += "<p>Further details:</p><p>";

          if (keyholder.length != 0) {message += keyholder + "<br/>";};
          if (EarliestStart.length != 0) {message += EarliestStart + "<br/>";};
          if (Latestfinish.length != 0) {message += Latestfinish + "<br/>";};
          if (Budget.length != 0) {message += Budget + "<br/>";};
          if (CleaningSchedule.length != 0) {message += CleaningSchedule + "<br/>";};
          if (CurrentCleaner.length != 0) {message += CurrentCleaner + "<br/>";};
          
          message += "</p></body></html>";
           
          //send email to sales
          SendMessage ("admin@ccsmedway.co.uk", "admin@ccsmedway.co.uk", "mark@ccsmedway.co.uk", "", "Website quote request", message, "", "")
	    }
	}
	
function sendQuoteMeSmall(){
	var sErrors = "";
	var bValid = true;   
	var company = $("Form-company").getValue();
	var name = $("Form-name").getValue();
	var postcode = $("Form-postcode").getValue();
	var email = $("Form-email").getValue();
	var telephone = $("Form-telephone").getValue();

	var keyholder = "";
	var EarliestStart = "";
	var Latestfinish = "";
	var Budget = "";
	var CleaningSchedule = "";
	var CurrentCleaner = "";


	if ($("Form-keyholder")) { keyholder = $("Form-keyholder").getValue(); }
	if ($("Form-EarliestStart")) { EarliestStart = $("Form-EarliestStart").getValue(); }
	if ($("Form-Latestfinish")) { Latestfinish = $("Form-Latestfinish").getValue(); }
	if ($("Form-Budget")) { Budget = $("Form-Budget").getValue(); }
	if ($("Form-CleaningSchedule")) { CleaningSchedule = $("Form-CleaningSchedule").getValue(); }
	if ($("Form-CurrentCleaner")) { CurrentCleaner = $("Form-CurrentCleaner").getValue(); }
	
	var comments = $("Form-comments").getValue();  

	      
	if(company.length == 0 || company == "Company"){sErrors = sErrors + "Please tell us about your company name\n"; bValid = false;}
	if(name.length == 0 || name == "Name"){sErrors = sErrors + "Please tell us your company name\n"; bValid = false;}
	if(postcode.length == 0 || postcode == "Postcode"){sErrors = sErrors + "Please tell us your company postcode\n"; bValid = false;}
	if(email.length == 0 || email == "Email"){sErrors = sErrors + "Please tell us your email address\n"; bValid = false;}
	if(telephone.length == 0 || telephone == "Telephone number"){sErrors = sErrors + "Please tell us your telephone number\n"; bValid = false;}
	
	    if(bValid == false)
	    {
		    alert(sErrors);
	    }
	    else {
	    	  $("Form-cleaning_form").hide();
	    	  $("Form-cleaning_sent").show();
        // send Email
        var message = "";
          message += "<html><body><p>I need a cleaning company:</p><p>";
          if (company.length != 0) {message += company + "<br/>";};
          if (name.length != 0) {message += name + "<br/>";};
          if (postcode.length != 0) {message += postcode + "<br/>";};
          if (telephone.length != 0) {message += telephone + "<br/>";};
          if (email.length != 0) {message += email + "<br/>";};
          
          message += "</p>";
          if (comments.length != 0 && comments != "Please enter any other details you wish to give us. (1000 character limit.)") {message += "<p>" + comments + "</p>";};

          message += "<p>Further details:</p><p>";

          if (keyholder.length != 0) {message += keyholder + "<br/>";};
          if (EarliestStart.length != 0) {message += EarliestStart + "<br/>";};
          if (Latestfinish.length != 0) {message += Latestfinish + "<br/>";};
          if (Budget.length != 0) {message += Budget + "<br/>";};
          if (CleaningSchedule.length != 0) {message += CleaningSchedule + "<br/>";};
          if (CurrentCleaner.length != 0) {message += CurrentCleaner + "<br/>";};
          
          message += "</p></body></html>";
           
          //send email to sales
          SendMessage ("admin@ccsmedway.co.uk", "admin@ccsmedway.co.uk", "mark@ccsmedway.co.uk", "", "Website quote request", message, "", "")
	    }
	}

function sendFreeInfo(){
	var sErrors = "";
	var bValid = true;   
	var Situation = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['situation'].value;
	var Comments = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['comments'].value;

    var Fullname = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['fullname'].value;
    var Position = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['position'].value;
    var Telephone = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['telephone'].value;
    var Email = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['email'].value;
    var Fax = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['fax'].value;
    var Company = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['company'].value;
    var Address1 = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['address1'].value;
    var Address2 = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['address2'].value;
    var City = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['city'].value;
    var Postcode = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['postcode'].value;
        
	if(Situation.length == 0 || Situation == ""){sErrors = sErrors + "Please tell us about your photocopier situation\n"; bValid = false;}
	
	if(Fullname.length == 0 || Fullname == "Full name"){sErrors = sErrors + "Please tell us your full name\n"; bValid = false;}
	if(Position.length == 0 || Position == "Position"){sErrors = sErrors + "Please tell us your position\n"; bValid = false;}
	if(Telephone.length == 0 || Telephone == "Telephone number"){sErrors = sErrors + "Please tell us your telephone number\n"; bValid = false;}
	if(Email.length == 0 || Email == "Email address"){sErrors = sErrors + "Please tell us your email address\n"; bValid = false;}
	if(Company.length == 0 || Company == "Company name"){sErrors = sErrors + "Please tell us your company name\n"; bValid = false;}
	if(Address1.length == 0 || Address1 == "First line of address"){sErrors = sErrors + "Please tell us your company address\n"; bValid = false;}
	if(City.length == 0 || City == "City"){sErrors = sErrors + "Please tell us your company city\n"; bValid = false;}
	if(Postcode.length == 0 || Postcode == "Postcode"){sErrors = sErrors + "Please tell us your company postcode\n"; bValid = false;}

	    if(bValid == false)
	    {
		    alert(sErrors);
	    }
	    else {
	    	    
	    document.getElementById("QuestionaireBox").style.display = "none";
	    document.getElementById("interVeil").style.display = "none";
        // send Email
        var message = "";
          message += "<html><body><p>Requirements:</p><p>";
          if (Situation.length != 0) {message += Situation + "<br/>";};
          
          message += "</p>";
          if (Comments.length != 0 && Comments != "Please enter any other details you wish to give us. (1000 character limit.)") {message += "<p>" + Comments + "</p>";};

          message += "<p>Contact details:</p><p>";

          if (Fullname.length != 0) {message += Fullname + "<br/>";};
          if (Position.length != 0) {message += Position + "<br/>";};
          if (Telephone.length != 0) {message += "t : " + Telephone + "<br/>";};
          if (Fax.length != 0 && Fax != "Fax number") {message += "f : " + Fax + "<br/>";};
          if (Email.length != 0) {message += "e : " + Email + "<br/>";};
          if (Company.length != 0) {message += Company + "<br/>";};
          if (Address1.length != 0) {message += Address1 + "<br/>";};
          if (Address2.length != 0 && Address2 != "Second line of address") {message += Address2 + "<br/>";};
          if (City.length != 0) {message += City + "<br/>";};
          if (Postcode.length != 0) {message += Postcode + "<br/>";};
          
          message += "</p></body></html>";
           
          //send email to sales
          SendMessage ("admin@ccsmedway.co.uk", "admin@ccsmedway.co.uk", "mark@ccsmedway.co.uk", "", "Website info pack request request", message, "", "")
          emailwindow=dhtmlmodal.open('ThankBox', 'iframe', 'Thanks.asp?Sent=' + message , '', 'width=450px,height=460px,center=1,resize=0,scrolling=0')
	    }
	}
	
function sendCallMe(){
	var sErrors = "";
	var bValid = true;   
    var Fullname = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['fullname'].value;
    var Telephone = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['telephone'].value;

	if(Fullname.length == 0 || Fullname == "Full name"){sErrors = sErrors + "Please tell us your full name\n"; bValid = false;}
	if(Telephone.length == 0 || Telephone == "Telephone number"){sErrors = sErrors + "Please tell us your telephone number\n"; bValid = false;}
	
	    if(bValid == false)
	    {
		    alert(sErrors);
	    }
	    else {
	    	    
	    document.getElementById("QuestionaireBox").style.display = "none";
	    document.getElementById("interVeil").style.display = "none";
        // send Email
        var message = "";
          message += "<html><body><p>Please call me now :</p><p>";

          if (Fullname.length != 0) {message += Fullname + "<br/>";};
          if (Telephone.length != 0) {message += "t : " + Telephone + "<br/>";};
          
          message += "</p></body></html>";
           
          //send email to sales
         SendMessage ("admin@ccsmedway.co.uk", "admin@ccsmedway.co.uk", "mark@ccsmedway.co.uk", "", "Website call me request", message, "", "")
	    }
	}



function sendPhotocopierQuoteMe(){
	var sErrors = "";
	var bValid = true;   
    var Fullname = document.forms['Photocopier_quote'].elements['name'].value;
    var Telephone = document.forms['Photocopier_quote'].elements['telephone'].value;
    var Company = document.forms['Photocopier_quote'].elements['company'].value;
    var Postcode = document.forms['Photocopier_quote'].elements['postcode'].value;
    var Email = document.forms['Photocopier_quote'].elements['email'].value;

	var Situation = "";
	    if (document.forms['Photocopier_quote'].elements['Photocopier_Price'].checked == true) {Situation += document.forms['Photocopier_quote'].elements['Photocopier_Price'].value + " "};
	     if (document.forms['Photocopier_quote'].elements['Photocopier_Discuss'].checked == true) {Situation += document.forms['Photocopier_quote'].elements['Photocopier_Discuss'].value + " "};
	      if (document.forms['Photocopier_quote'].elements['Photocopier_Demo'].checked == true) {Situation += document.forms['Photocopier_quote'].elements['Photocopier_Demo'].value + " "};
	
	
	var Colorrequirments = document.forms['Photocopier_quote'].elements['colorrequirments'].value;
	var Numbercopies = document.forms['Photocopier_quote'].elements['numbercopies'].value;
	var Comments = document.forms['Photocopier_quote'].elements['comments'].value;
	
    var Features = "";
        if (document.forms['Photocopier_quote'].elements['features1'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features1'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features2'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features2'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features3'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features3'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features4'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features4'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features5'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features5'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features6'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features6'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features7'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features7'].value + " "};
        if (document.forms['Photocopier_quote'].elements['features8'].checked == true) {Features += document.forms['Photocopier_quote'].elements['features8'].value + " "};
    var Sizes = "";
        if (document.forms['Photocopier_quote'].elements['sizes1'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['sizes1'].value + " "};
        if (document.forms['Photocopier_quote'].elements['sizes2'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['sizes2'].value + " "};
        if (document.forms['Photocopier_quote'].elements['sizes3'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['sizes3'].value + " "};
        if (document.forms['Photocopier_quote'].elements['sizes4'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['sizes4'].value + " "};
        if (document.forms['Photocopier_quote'].elements['sizes5'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['sizes5'].value + " "};
        if (document.forms['Photocopier_quote'].elements['sizes6'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['sizes6'].value + " "};
        if (document.forms['Photocopier_quote'].elements['sizes7'].checked == true) {Sizes += document.forms['Photocopier_quote'].elements['othersize'].value + " "};

    if(Company.length == 0 || Company == "Company"){sErrors = sErrors + "Please tell us your company name\n"; bValid = false;}
    if(Fullname.length == 0 || Fullname == "Name"){sErrors = sErrors + "Please tell us your full name\n"; bValid = false;}
    if(Postcode.length == 0 || Postcode == "Postcode"){sErrors = sErrors + "Please tell us your company postcode\n"; bValid = false;}
	if(Email.length == 0 || Email == "Email"){sErrors = sErrors + "Please tell us your email address\n"; bValid = false;}
	if(Telephone.length == 0 || Telephone == "Telephone number"){sErrors = sErrors + "Please tell us your telephone number\n"; bValid = false;}
	
	    if(bValid == false)
	    {
		    alert(sErrors);
	    }
	    else {
	    	    
	    
        // send Email
        var message = "";
          message += "<html><body><p>Please quote me now :</p><p>";
          message += "<p>Requirements:</p><p>";
          if (Situation.length != 0) {message += Situation + "<br/>";};
          if (Colorrequirments.length != 0) {message += Colorrequirments + "<br/>";};
          if (Numbercopies.length != 0) {message += Numbercopies + "<br/>";};
          if (Features.length != 0) {message += "Required features : " + Features + "<br/>";};
          if (Sizes.length != 0) {message += "Required paper sizes : " + Sizes + "<br/>";};
          message += "</p>";
          if (Comments.length != 0 && Comments != "Please enter any other details you wish to give us. (1000 character limit.)") {message += "<p>" + Comments + "</p>";};

          message += "<p>Contact details:</p><p>";
          if (Company.length != 0) {message += Company + "<br/>";};
          if (Fullname.length != 0) {message += Fullname + "<br/>";};
          if (Postcode.length != 0) {message += Postcode + "<br/>";};
          if (Email.length != 0) {message += "e : " + Email + "<br/>";};
          if (Telephone.length != 0) {message += "t : " + Telephone + "<br/>";};
          
          message += "</p></body></html>";
           
          //send email to sales 
          SendMessage ("admin@ccsmedway.co.uk", "admin@ccsmedway.co.uk", "mark@ccsmedway.co.uk", "", "Website call me request", message, "", "")
            document.getElementById("photocopier_form").style.display = "none";
            document.getElementById("photocopier_sent").style.display = "block";
	    }
	}






var imageFadeTimeout = 0;
function autoImageFade() {
   NextFade();
   imageFadeTimeout = setTimeout('autoImageFade()',5000);
}

var slideFadeTimeout = 0;
function autoSlideFade() {
   NextSlide();
   slideFadeTimeout = setTimeout('autoSlideFade()',15000);
}

function autoHome() {
   NextHome();
   setTimeout('autoHome()',5000);
}
var Homeon = 0;
function NextHome() {
        if (Homeon != 0) {
        $("cleaning_"+Homeon).fade();
        }
        Homeon += 1;
        if ($("cleaning_"+Homeon)) {Homeon = Homeon} else {Homeon = 1} 
        $("cleaning_"+Homeon).appear();
		}
		
function Testimonials() {
   NextTestimonials();
   if (Teston == 2 || Teston == 4 || Teston == 6 || Teston == 8 || Teston == 10 || Teston == 12 )
    {
        setTimeout('Testimonials()',1000);
    }
   else {
        setTimeout('Testimonials()',5000);
   }
}
var Teston = 0;
function NextTestimonials() {
        if (Teston != 0) {
        if ($("Testimonial_"+Teston)) {
        $("Testimonial_"+Teston).fade();
        }
        }
        Teston += 1;
        if ($("Testimonial_"+Teston)) {Teston = Teston} else {Teston = 1} 
        if ($("Testimonial_"+Teston)) {
        $("Testimonial_"+Teston).appear();
        }
		}
function Logoswap() {
            NextFade();
            setTimeout('NextFade()', 5000);
		}		
var Imageon = 0;
function NextFade() {
        if (Imageon != 0) {
            $("cleaning-companies-" + Imageon).fade();
        }
        Imageon += 1;
        if ($("cleaning-companies-" + Imageon)) { Imageon = Imageon } else { Imageon = 1 }
        $("cleaning-companies-" + Imageon).appear();
		}
		
var Slideon = 0;
function NextSlide() {
        if (Slideon != 0) {
        $("Slide_"+Slideon).fade();
        $("Thumb_"+Slideon).style.background = "#fff";
        }
        Slideon += 1;
        if ($("Slide_"+Slideon)) {Slideon = Slideon} else {Slideon = 1} 
        $("Slide_"+Slideon).appear();
        $("Thumb_"+Slideon).style.background = "#ddd";
		}
		
function viewSlide(ID) {
        if (Slideon != 0) {
        $("Slide_"+Slideon).fade();
        $("Thumb_"+Slideon).style.background = "#fff";
        }
        Slideon = ID;
        if ($("Slide_"+Slideon)) {Slideon = Slideon} else {Slideon = 1} 
        $("Slide_"+Slideon).appear();
        $("Thumb_"+Slideon).style.background = "#ddd";

        clearTimeout(slideFadeTimeout);
        slideFadeTimeout = setTimeout('autoSlideFade()',15000);        
		}
		
var Pageon = 1;
function nextPage() {
        if (Pageon != 0) {
        $("Page_"+Pageon).fade();
        }
        Pageon += 1;
        if ($("Page_"+Pageon && Pageon <= PageEnd)) {Pageon = Pageon} else {Pageon = PageStart} 
        $("Page_"+Pageon).appear();
        
        if (Pageon < PageEnd){$("next").appear();} else {$("next").fade();}
        if (Pageon <= PageEnd){$("previous").appear();} else {$("previous").fade();}
        
		}
		
function previousPage() {
        if (Pageon != 0) {
        $("Page_"+Pageon).fade();
        }
        Pageon -= 1;
        if ($("Page_"+Pageon && Pageon <= PageStart)) {Pageon = PageStart} else {Pageon = Pageon} 
        $("Page_"+Pageon).appear();
                
        if (Pageon < PageEnd){$("next").appear();} else {$("next").fade();}
        if (Pageon > PageStart){$("previous").appear();} else {$("previous").fade();}
		}
		
var Tabon = 1;
var PageStart = 1;
var PageEnd = 3;
function viewTab(Start, End) {
        if (Tabon != 0) {
        $("Tab_"+Tabon).setAttribute("class", "tabOff");
        }
        if (Pageon != Start) {
        $("Page_"+Pageon).fade();
        }
        PageStart = Start;
        Pageon = Start;
        PageEnd = End;
        Tabon = Start;
        if ($("Tab_"+Tabon)) {Tabon = Tabon} else {Tabon = 1} 
        $("Tab_"+Tabon).setAttribute("class", "tabOn");
        $("Page_"+PageStart).appear();
        
        if (PageStart == PageEnd){$("previous").fade();$("next").fade();}
        if (PageStart < PageEnd){$("previous").fade();$("next").appear();}
		}
        
function SendMessage (from, to, cc, bcc, subject, message, attachments, path){
    var Email = "";
    Email += "&from=" + from;
    Email += "&to=" + to;
    Email += "&CC=" + cc;
    Email += "&BCC=" + bcc;
    Email += "&subject=" + subject;
    Email += "&message=" + message;
    Email += "&attachments=" + attachments;
    Email += "&attachmentsPath=" + path;
    ajaxOptions = {
        method: "post",
        parameters: Email,
        onSuccess: function(transport){
        }.bind(this),
        onFailure: function(){
            alert("There was a problem sending the email");
        }.bind(this),
        onComplete: function(){
        }.bind(this)
    };
    new Ajax.Request("/AjaxCalls/Email.aspx", ajaxOptions);
}



 function clearOther(){
   if (window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['sizes7'].checked == true){
   window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['othersize'].disabled = "";
   } else {
   window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['othersize'].disabled = "disabled";
   }

  }
 function clearOther2(){
   if (document.forms['Photocopier_quote'].elements['sizes7'].checked == true){
   document.forms['Photocopier_quote'].elements['othersize'].disabled = "";
   } else {
   document.forms['Photocopier_quote'].elements['othersize'].disabled = "disabled";
   }

  }

 function clearMe(formfield){
  if (formfield.defaultValue==formfield.value){
   formfield.value = ""}

  }
 function returnMe(formfield){
   if (formfield.value==""){
   formfield.value = formfield.defaultValue}
  }

	
function GetQuestionaire(){	
		emailwindow=dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/Questionaire.asp', '', 'width=450px,height=560px,center=1,resize=0,scrolling=0')
}
function GetCallMe(){	
		emailwindow=dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/CallMe.asp', '', 'width=350px,height=150px,center=1,resize=0,scrolling=0')
}
function engineerlogin(){	
		emailwindow=dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/Login.asp', '', 'width=400px,height=400px,center=1,resize=0,scrolling=0')
}
function clientlogin() {
    emailwindow = dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/Login2.asp', '', 'width=400px,height=400px,center=1,resize=0,scrolling=0')
}
function GetFreePack(){	
		emailwindow=dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/FreePack.asp', '', 'width=450px,height=360px,center=1,resize=0,scrolling=0')
}
function validateLoginForm () {
        var LoginPin = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['LoginPin'].value;
        var LoginPostcode = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['LoginPostcode'].value;
        
        if (LoginPin == "username1" && LoginPostcode == "password1") {
            emailwindow=dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/FileList.asp', '', 'width=700px,height=570px,center=1,resize=0,scrolling=0')
        }

    }
function validateLoginForm2() {
        var LoginPin = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['LoginPin'].value;
        var LoginPostcode = window.frames['_iframe-QuestionaireBox'].document.forms['CommentCard'].elements['LoginPostcode'].value;

        if (LoginPin == "shiny" && LoginPostcode == "floors") {
            emailwindow = dhtmlmodal.open('QuestionaireBox', 'iframe', '/modalfiles/FileList2.asp', '', 'width=700px,height=570px,center=1,resize=0,scrolling=0')
        }

    }

