<!--

//Copyright e-Business Systems Limited  www.e-businesssystems.co.uk

//customised for client: 

// version 0




function Setup_pf_menu()
{
	ebsl_menu[0] = new Ebsl_menu_control(0,"gmenu","_m");
	//ebsl_menu[0].set_abolute_position = false;
	ebsl_menu[0].menu_root_is_relatively_positioned = true;
	ebsl_menu[0].Set_level_controls(1,0,0,"pf_img","pf_img");
	ebsl_menu[0].Set_level_controls(2,-25,-25,"m_0_hi","m_0_lo");
	//ebsl_menu[0].Set_level_controls(3,110,0,"m_0_hi","m_0_lo");
		
	ebsl_menu[0].Finalise_setup();
}






function Setup_p_menu()
{
	ebsl_menu[1] = new Ebsl_menu_control(1,"pmenu","_m");
	ebsl_menu[1].menu_root_is_relatively_positioned = true;
	ebsl_menu[1].Set_level_controls(1,0,0,"p_cat_1_hi","p_cat_1");
	ebsl_menu[1].Set_level_controls(2,140,-10,"","");		
	ebsl_menu[1].Finalise_setup();
}




function Postcode_custom(post_code)
{
	var need_to_change_postcode = false;
	var required_delivery_option = "";
	
	
	
	if (delivery_option_selected != "4")
	{
		if (post_code.substr(0,2) == "BT")
		{
			required_delivery_option = "Northern Ireland";
			need_to_change_postcode = true;
		}
	}

	
	

	if (delivery_option_selected != "5")
	{
		if (Postcode_matched_highlands_and_islands(post_code))
		{
			required_delivery_option = "Scottish Highlands and Islands";
			need_to_change_postcode = true;
		}
	}

	
	if (need_to_change_postcode)
	{
		window.alert("Please click on the View Basket button\nto return to the View Basket page\nand select the delivery option for " + required_delivery_option + ".\nThank you.");
		return false;
	}
	else
	{
		return true;
	}
}




function Postcode_matched_highlands_and_islands(post_code)
{
	var matched = false;
	
	//Isle of Man
	if (post_code.substr(0,2) == "IM"){matched = true}	
	
	
	//Inverness
	if (post_code.substr(0,2) == "IV"){matched = true}	
	if (post_code.substr(0,3) == "KW1"){matched = true}
	if (post_code.substr(0,3) == "KW2"){matched = true}
	if (post_code.substr(0,3) == "KW3"){matched = true}
	if (post_code.substr(0,3) == "KW5"){matched = true}
	if (post_code.substr(0,3) == "KW6"){matched = true}
	if (post_code.substr(0,3) == "KW7"){matched = true}
	if (post_code.substr(0,3) == "KW8"){matched = true}
	if (post_code.substr(0,3) == "KW9"){matched = true}
	if (post_code.substr(0,4) == "KW10"){matched = true}
	if (post_code.substr(0,4) == "KW11"){matched = true}
	if (post_code.substr(0,4) == "KW12"){matched = true}
	if (post_code.substr(0,4) == "KW13"){matched = true}
	if (post_code.substr(0,4) == "KW14"){matched = true}
	if (post_code.substr(0,4) == "PH20"){matched = true}
	if (post_code.substr(0,4) == "PH21"){matched = true}
	if (post_code.substr(0,4) == "PH22"){matched = true}
	if (post_code.substr(0,4) == "PH23"){matched = true}
	if (post_code.substr(0,4) == "PH24"){matched = true}
	if (post_code.substr(0,4) == "PH25"){matched = true}
	if (post_code.substr(0,4) == "PH26"){matched = true}
	if (post_code.substr(0,4) == "PH31"){matched = true}
	if (post_code.substr(0,4) == "PH32"){matched = true}
	if (post_code.substr(0,4) == "PH34"){matched = true}
	if (post_code.substr(0,4) == "PH35"){matched = true}
	if (post_code.substr(0,4) == "PH36"){matched = true}
	if (post_code.substr(0,4) == "PH37"){matched = true}
	if (post_code.substr(0,4) == "PH38"){matched = true}
	if (post_code.substr(0,4) == "PH39"){matched = true}
	if (post_code.substr(0,4) == "PH40"){matched = true}
	if (post_code.substr(0,4) == "PH41"){matched = true}
	if (post_code.substr(0,4) == "PH42"){matched = true}
	if (post_code.substr(0,4) == "PH43"){matched = true}
	if (post_code.substr(0,4) == "PH44"){matched = true}
	if (post_code.substr(0,3) == "HS1"){matched = true}
	if (post_code.substr(0,3) == "HS2"){matched = true}
	if (post_code.substr(0,3) == "HS3"){matched = true}
	if (post_code.substr(0,3) == "HS4"){matched = true}
	if (post_code.substr(0,3) == "HS5"){matched = true}
	if (post_code.substr(0,3) == "HS6"){matched = true}
	if (post_code.substr(0,3) == "HS7"){matched = true}
	if (post_code.substr(0,3) == "HS8"){matched = true}
	if (post_code.substr(0,4) == "FK17"){matched = true}
	if (post_code.substr(0,4) == "FK18"){matched = true}
	if (post_code.substr(0,4) == "FK19"){matched = true}
	if (post_code.substr(0,4) == "FK20"){matched = true}
	if (post_code.substr(0,4) == "FK21"){matched = true}

	
	
	
	//Isle of Wight
	if (post_code.substr(0,4) == "PO30"){matched = true}
	if (post_code.substr(0,4) == "PO31"){matched = true}
	if (post_code.substr(0,4) == "PO32"){matched = true}
	if (post_code.substr(0,4) == "PO33"){matched = true}
	if (post_code.substr(0,4) == "PO34"){matched = true}
	if (post_code.substr(0,4) == "PO35"){matched = true}
	if (post_code.substr(0,4) == "PO36"){matched = true}
	if (post_code.substr(0,4) == "PO37"){matched = true}
	if (post_code.substr(0,4) == "PO38"){matched = true}
	if (post_code.substr(0,4) == "PO39"){matched = true}
	if (post_code.substr(0,4) == "PO40"){matched = true}
	if (post_code.substr(0,4) == "PO41"){matched = true}
	
	//Arran
	if (post_code.substr(0,4) == "KA27"){matched = true}
	
	
	//Orkney
	if (post_code.substr(0,4) == "KW15"){matched = true}
	if (post_code.substr(0,4) == "KW16"){matched = true}
	if (post_code.substr(0,4) == "KW17"){matched = true}
	

	//Shetland
	if (post_code.substr(0,3) == "ZE1"){matched = true}
	if (post_code.substr(0,3) == "ZE2"){matched = true}
	if (post_code.substr(0,3) == "ZE3"){matched = true}
	
	
	//Aberdeen
	if (post_code.substr(0,3) == "DD8"){matched = true}
	if (post_code.substr(0,3) == "DD9"){matched = true}
	if (post_code.substr(0,4) == "DD10"){matched = true}
	if (post_code.substr(0,3) == "AB1"){matched = true}
	if (post_code.substr(0,3) == "AB2"){matched = true}
	if (post_code.substr(0,3) == "AB9"){matched = true}
	if (post_code.substr(0,4) == "AB10"){matched = true}
	if (post_code.substr(0,4) == "AB11"){matched = true}
	if (post_code.substr(0,4) == "AB12"){matched = true}
	if (post_code.substr(0,4) == "AB21"){matched = true}
	if (post_code.substr(0,4) == "AB22"){matched = true}
	if (post_code.substr(0,4) == "AB23"){matched = true}
	if (post_code.substr(0,4) == "AB24"){matched = true}
	if (post_code.substr(0,4) == "AB25"){matched = true}
	





	
	
	//Oban
	if (post_code.substr(0,4) == "PH33"){matched = true}
	if (post_code.substr(0,4) == "PA20"){matched = true}
	if (post_code.substr(0,4) == "PA21"){matched = true}
	if (post_code.substr(0,4) == "PA22"){matched = true}
	if (post_code.substr(0,4) == "PA23"){matched = true}
	if (post_code.substr(0,4) == "PA24"){matched = true}
	if (post_code.substr(0,4) == "PA25"){matched = true}
	if (post_code.substr(0,4) == "PA26"){matched = true}
	if (post_code.substr(0,4) == "PA27"){matched = true}
	if (post_code.substr(0,4) == "PA28"){matched = true}
	if (post_code.substr(0,4) == "PA29"){matched = true}
	if (post_code.substr(0,4) == "PA30"){matched = true}
	if (post_code.substr(0,4) == "PA31"){matched = true}
	if (post_code.substr(0,4) == "PA32"){matched = true}
	if (post_code.substr(0,4) == "PA33"){matched = true}
	if (post_code.substr(0,4) == "PA34"){matched = true}
	if (post_code.substr(0,4) == "PA35"){matched = true}
	if (post_code.substr(0,4) == "PA36"){matched = true}
	if (post_code.substr(0,4) == "PA37"){matched = true}
	if (post_code.substr(0,4) == "PA38"){matched = true}
	if (post_code.substr(0,4) == "PA39"){matched = true}
	if (post_code.substr(0,4) == "PA40"){matched = true}
	if (post_code.substr(0,4) == "PA41"){matched = true}
	if (post_code.substr(0,4) == "PA42"){matched = true}
	if (post_code.substr(0,4) == "PA43"){matched = true}
	if (post_code.substr(0,4) == "PA44"){matched = true}
	if (post_code.substr(0,4) == "PA45"){matched = true}
	if (post_code.substr(0,4) == "PA46"){matched = true}
	if (post_code.substr(0,4) == "PA47"){matched = true}
	if (post_code.substr(0,4) == "PA48"){matched = true}
	if (post_code.substr(0,4) == "PA49"){matched = true}
	if (post_code.substr(0,4) == "KA28"){matched = true}
	if (post_code.substr(0,3) == "HS9"){matched = true}
	


	if (post_code.substr(0,2) == "JE"){matched = true}
		
	
	if (post_code.substr(0,2) == "GY"){matched = true}
		




	return matched;
}

//-->