// <![CDATA[


/*BROWSER DETECTION*/

if (navigator.userAgent.search('Opera') >= 0) {var wBrowser = "opera";}
else if (navigator.userAgent.search('MSIE') >= 0) {var wBrowser = "explorer";}
else if (navigator.userAgent.search('Netscape') >= 0) {var wBrowser = "netscape";}
else if (navigator.userAgent.search('Firefox') >= 0) {var wBrowser = "firefox";}
else  {var wBrowser = "unknown";}


/*MENU*/


navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("li");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}



/*SHADOWS*/

function applyShadow(xXx) {document.getElementById(xXx).style.border="1px solid #777";}
function removeShadow(xXx) {document.getElementById(xXx).style.border="1px solid #ccc";}


/*ENLARGE IMAGE*/

function enlargeImage(imageName, imageText, imageWidth, imageHeight) 
{

outputWindow = window.open("","","height=550, width=600, left=100, menubar=yes, resizable=yes, scrollbars=yes, status=no, toolbar=no, top=100", false);



outputWindow.document.write("<html><head><title>Image Viewer</title><link rel=\"stylesheet\" type=\"text/css\" href=\"css/stylki.css\" media=\"screen\" /></head><body style=\"text-align: center; font-weight: bold;\"><p>Blackburn Fraser Ltd Image Viewer</p><p>www.blackburnfraser.co.uk</p><p>Choose file then print to print this page, or hold down 'Ctrl' and press 'P'</p>");

outputWindow.document.write("<br/><img src=\"photos/" + imageName + ".jpg\" alt=\"" + imageText + "\" width=\"" + imageWidth + "\" height=\"" + imageHeight + "\"><br/>");

outputWindow.document.write("<p style=\"visibility: hidden\">" + imageText + "</p>");

outputWindow.document.write("<p>e-mail: <a href=\"mailto:info@blackburnfraser.co.uk\">info@blackburnfraser.co.uk</a><br/>Blackburn Fraser Ltd<br/>6 Choir Street, Salford<br/>United Kingdom<br/>tel: 0161 835 2068 Fax: 0161 834 7551</p></body></html>");

}

/*HEDGE HOG*/

function hedgehog()

{
window.open(
"hedgehog/hedgehog.html",'JavaScript','toolbar=no,menubar=no,location=no,personalbar=no,scrollbars=no,directories=no,status=no,resizable=no,width=550,height=500');
}



/*Forms*/

function processForm_request(){

valid = true;
if (document.request.CustomerName.value == ""){ alert("You have not entered a contact name"); valid = false; }
if (document.request.Address.value == ""){ alert("You have not entered your address"); valid = false; }
if (document.request.PhoneNumber.value == ""){ alert("You have not entered your telephone number"); valid = false; }
if (document.request.Email.value == ""){ alert("You have not entered your email address"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.request.submit(); }
}

function processForm_approvedinstaller(){

valid = true;
if (document.approved.Email.value == ""){ alert("You have not entered an email address"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.approved.submit(); }
}

function processForm_cattlegrids(){

valid = true;
if (document.cattle.CustomerName.value == ""){ alert("You have not entered a contact name"); valid = false; }
if (document.cattle.BusinessName.value == ""){ alert("You have not entered a business name"); valid = false; }
if (document.cattle.HouseNumber.value == ""){ alert("You have not entered your address number / name"); valid = false; }
if (document.cattle.Street.value == ""){ alert("You have not entered your street"); valid = false; }
if (document.cattle.County.value == ""){ alert("You have not entered your county"); valid = false; }
if (document.cattle.Country.value == ""){ alert("You have not entered your country"); valid = false; }
if (document.cattle.Postcode.value == ""){ alert("You have not entered your postcode"); valid = false; }
if (document.cattle.Telephone.value == ""){ alert("You have not entered your telephone number"); valid = false; }
if (document.cattle.email.value == ""){ alert("You have not entered your email address"); valid = false; }
if (document.cattle.GridWidth.value == ""){ alert("You have not entered the width of pit required"); valid = false; }
if (document.cattle.GridLength.value == ""){ alert("You have not entered the length of pit required"); valid = false; }
if (document.cattle.GridQuantity.value == ""){ alert("You have not entered the quantity required"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.cattle.submit(); }
}

function processForm_openaccount(){

valid = true;
if (document.open.CustomerName.value == ""){ alert("You have not entered a contact name"); valid = false; }
if (document.open.BusinessName.value == ""){ alert("You have not entered a business name"); valid = false; }
if (document.open.HouseNumber.value == ""){ alert("You have not entered your address number / name"); valid = false; }
if (document.open.Street.value == ""){ alert("You have not entered your street"); valid = false; }
if (document.open.County.value == ""){ alert("You have not entered your county"); valid = false; }
if (document.open.Country.value == ""){ alert("You have not entered your country"); valid = false; }
if (document.open.Postcode.value == ""){ alert("You have not entered your postcode"); valid = false; }
if (document.open.Telephone.value == ""){ alert("You have not entered your telephone number"); valid = false; }
if (document.open.email.value == ""){ alert("You have not entered your email address"); valid = false; }
if (document.open.CreditRequested.value == ""){ alert("You have not entered a requested credit limit"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.open.submit(); }
}

function processForm_placeorder(){

valid = true;
if (document.place.CustomerName.value == ""){ alert("You have not entered a contact name"); valid = false; }
if (document.place.BusinessName.value == ""){ alert("You have not entered a business name"); valid = false; }
if (document.place.Account.value == ""){ alert("You have not entered an account reference"); valid = false; }
if (document.place.PurchaseOrder.value == ""){ alert("You have not entered a purchase order number"); valid = false; }
if (document.place.Telephone.value == ""){ alert("You have not entered your telephone number"); valid = false; }
if (document.place.Email.value == ""){ alert("You have not entered your email address"); valid = false; }
if (document.place.Products.value == ""){ alert("You have not entered any products"); valid = false; }
if (valid){alert("Thankyou for your order which will be e-mailed to Blackburn Fraser now."); document.place.submit(); }
}

function processForm_hep(){

valid = true;
if (document.hard.CustomerName.value == ""){ alert("You have not entered a contact name"); valid = false; }
if (document.hard.BusinessName.value == ""){ alert("You have not entered a business name"); valid = false; }
if (document.hard.HouseNumber.value == ""){ alert("You have not entered your address number / name"); valid = false; }
if (document.hard.Street.value == ""){ alert("You have not entered your street"); valid = false; }
if (document.hard.County.value == ""){ alert("You have not entered your county"); valid = false; }
if (document.hard.Country.value == ""){ alert("You have not entered your country"); valid = false; }
if (document.hard.Postcode.value == ""){ alert("You have not entered your postcode"); valid = false; }
if (document.hard.Telephone.value == ""){ alert("You have not entered your telephone number"); valid = false; }
if (document.hard.email.value == ""){ alert("You have not entered your email address"); valid = false; }
if (document.hard.Width.value == ""){ alert("You have not entered the width of point required"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.hard.submit(); }
}


function processForm_height(){

valid = true;
if (document.height.CustomerName.value == ""){ alert("You have not entered a contact name"); valid = false;}
if (document.height.BusinessName.value == ""){ alert("You have not entered a business name"); valid = false;  }
if (document.height.HouseNumber.value == ""){ alert("You have not entered your address number / name"); valid = false;  }
if (document.height.Street.value == ""){ alert("You have not entered your street"); valid = false;  }
if (document.height.County.value == ""){ alert("You have not entered your county"); valid = false;  }
if (document.height.Country.value == ""){ alert("You have not entered your country"); valid = false;  }
if (document.height.Postcode.value == ""){ alert("You have not entered your postcode"); valid = false;  }
if (document.height.Telephone.value == ""){ alert("You have not entered your telephone number"); valid = false;  }
if (document.height.email.value == ""){ alert("You have not entered your email address"); valid = false;  }
if (document.height.NearestCity.value == ""){ alert("You have not entered the nearest city to the site"); valid = false;  }
if ((document.height.elements[12].checked == "") && (document.height.elements[13].checked == "")){ alert("Unit type not selected"); valid = false; }
if (document.height.elements[13].checked == true)
{
	if ((document.height.elements[14].checked == false) && (document.height.elements[15].checked == false)
	&& (document.height.elements[16].checked == false) && (document.height.elements[17].checked == false))
	{
		alert("You have to select hinge and swing positions for this barrier type"); valid = false;
	}
}
if (document.height.OutsideWidth.value == ""){ alert("You have not entered the barier width"); valid = false;  }
if (document.height.HeightCentre.value == ""){ alert("You have not entered the barier height"); valid = false;  }
if ((document.height.elements[21].checked == "") && (document.height.elements[22].checked == "")
&& (document.height.elements[23].checked == "") && (document.height.elements[24].checked == ""))
{ alert("Unit finish not selected"); valid = false; }
if ((document.height.elements[24].checked == true) && (document.height.elements[25].value == ""))
{ alert("Unit finish not described"); valid = false; }
if ((document.height.elements[26].checked == "") && (document.height.elements[27].checked == "")){ alert("Signs not specified"); valid = false; }
if ((document.height.elements[28].checked == "") && (document.height.elements[29].checked == "")){ alert("Installation not specified"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.height.submit(); }
}
function otherFinish(){
	document.height.elements[24].click();
}
function clearOther(){
	document.height.elements[25].value = "";
}
function otherSelected(){
	document.height.elements[25].focus();
}
function selectP(){
	document.height.elements[14].checked=false;
	document.height.elements[15].checked=false;
	document.height.elements[16].checked=false;
	document.height.elements[17].checked=false;
}
function selectDraw(){
	document.height.elements[13].checked=true;
}



function processForm_approved(){

valid = true;
if (document.approved.Email.value == ""){ alert("You have not entered an email address"); valid = false; }
if (valid){alert("Thankyou for your request which will be e-mailed to Blackburn Fraser now."); document.approved.submit(); }
}











function model_selector() {

window.open(
"kissing_gates/model_selector.html",'JavaScript','status=no,scrollbars=yes,resizable=yes,width=700,height=500,left=10,top=10,screenX=10,screenY=10');
}

function model_selector2p() {

window.open(
"kissing_gates/model_selector2p.html",'JavaScript','status=no,scrollbars=yes,resizable=yes,width=700,height=500,left=10,top=10,screenX=10,screenY=10');
}

function model_selector2b() {

window.open(
"kissing_gates/model_selector2b.html",'JavaScript','status=no,scrollbars=yes,resizable=yes,width=700,height=500,left=10,top=10,screenX=10,screenY=10');
}

function model_selector_wooden() {

window.open(
"kissing_gates/model_selector_wooden.html",'JavaScript','status=no,scrollbars=yes,resizable=yes,width=700,height=500,left=10,top=10,screenX=10,screenY=10');
}


/*ERRORS HIDE*/

function handleError() {
	return true;
}

window.onerror = handleError;


if (window.attachEvent) window.attachEvent("onload", navHover);



 // ]]>