<!--Hide script from old browsers


// keep page out of frames
if (top.location != self.location) {
top.location = self.location
}


//detect browser
var sBrowser; //WP name
var sBrowserName = navigator.appName; //name
var iBrowserVersion = parseInt(navigator.appVersion); //version
var sBrowserUserAgent = navigator.userAgent; //user agent 
var sIE = "Microsoft Internet Explorer";
var sNS = "Netscape";
if (sBrowserUserAgent.indexOf("Opera/6") != -1 || sBrowserUserAgent.indexOf("Opera 6") != -1) {
sBrowser = "OP6"; 
}
else if (sBrowserUserAgent.indexOf("Opera/5") != -1 || sBrowserUserAgent.indexOf("Opera 5") != -1) {
sBrowser = "OP5"; 
}
else if (sBrowserName == sIE && iBrowserVersion == 4 && navigator.appVersion.indexOf("MSIE 8") != -1) {
sBrowser = "IE8"; 	// all versions of IE8 
}
else if (sBrowserName == sIE && iBrowserVersion == 4 && navigator.appVersion.indexOf("MSIE 7") != -1) {
sBrowser = "IE7"; 	// all versions of IE7 
}
else if (sBrowserName == sIE && iBrowserVersion == 4 && navigator.appVersion.indexOf("MSIE 6") != -1) {
sBrowser = "IE6"; 	// all versions of IE6 
}
else if (sBrowserName == sIE && iBrowserVersion == 4 && navigator.appVersion.indexOf("MSIE 5") != -1) {
sBrowser = "IE5"; 	// all versions of IE5
}
else if (sBrowserName == sIE && iBrowserVersion == 4) {
sBrowser = "IE4"; 	
}
else if (sBrowserName == sNS && iBrowserVersion == 5) {
sBrowser = "NS6"; 	
}
else if (sBrowserName == sNS && iBrowserVersion == 4) {
sBrowser = "NS4"; 
}
else if (sBrowserUserAgent.indexOf("Windows CE") != -1) {
sBrowser = "CE"; 
}
else {
sBrowser = "Unknown";
}


// detect user's language (IE only)
/*var sUserLanguage = navigator.userLanguage;
var sUL;
if (sUserLanguage.indexOf("en-gb") != -1)
{
var sUL = "UK";
}
else if (sUserLanguage.indexOf("en-us") != -1)
{
var sUL = "US";
}
else
{
var sUL = "Unknown";
}*/

	
//test for browser by writing to page
var bBrowser = false;
if (bBrowser) 
{
document.write("WP Name: " + sBrowser + " - ");
document.write("Name: " + sBrowserName + " - ");
document.write("Version: " + iBrowserVersion + " - ");
document.write("User Agent: " + sBrowserUserAgent);
}


//test for mime types
var bMime
if (navigator.mimeTypes && navigator.mimeTypes.length != 0)
{
bMime == true;
}
else
{
bMime == false;
}


// set flag for dropdown
var bDropdown;


// N.B. was 18px for DD's, increased to 19px for this site (in CSS) 
// set flag for dropdowns in IE5/6
if (sBrowser == "IE8" || sBrowser == "IE7" || sBrowser == "IE6" || sBrowser ==  "IE5") // set flag for dropdowns in IE
{ 
bDropdown = true;
document.write("<div id=\'removals\' style=\'position:absolute; left=67px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"removals\");\'><a href=\'uk.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"removals\");\' onClick=\'hideMenu(\"removals\");\' style=\'border-top:black 1px solid;\'>Removals - UK</a><a href=\'eu.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"removals\");\' onClick=\'hideMenu(\"removals\");\'>Removals - France</a><a href=\'movements.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"removals\");\' onClick=\'hideMenu(\"removals\");\'>Movements</a></div><div id=\'quotes\' style=\'position:absolute; left=411px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"quotes\");\'><a href=\'clearance.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"quotes\");\' onClick=\'hideMenu(\"quotes\");\' style=\'border-top:black 1px solid;\'>Port Clearance</a><a href=\'trade1.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"quotes\");\' onClick=\'hideMenu(\"quotes\");\'>Trade Quotes</a></div><div id=\'information\' style=\'position:absolute; left=522px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"information\");\'><a href=\'documentation.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\' style=\'border-top:black 1px solid;\'>Documentation</a><a href=\'testimonials.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Testimonials</a><a href=\'team.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>The Team</a><a href=\'packing.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Packing & Packaging</a><a href=\'terms.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Terms & Conditions</a><a href=\'links.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Useful Links</a><a href=\'vacancies.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Vacancies</a></div><div onMouseOut=\'hideMenu(\"removals\");hideMenu(\"quotes\");hideMenu(\"information\");\'>   ");
}
else // no dropdowns
{
bDropdown = false;
}

//<div id=\'removals\' style=\'position:absolute; left:67px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"removals\");\'><a href=\'uk.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"removals\");\' onClick=\'hideMenu(\"removals\");\' style=\'border-top:black 1px solid;\'>Removals - UK</a><a href=\'eu.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"removals\");\' onClick=\'hideMenu(\"removals\");\'>Removals - France</a><a href=\'movements.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"removals\");\' onClick=\'hideMenu(\"removals\");\'>Movements</a></div><div id=\'shopping\' style=\'position:absolute; left:317px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"shopping\");\'><a href=\'selfstoreinfo1.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"shopping\");\' onClick=\'hideMenu(\"shopping\");\' style=\'border-top:black 1px solid;\'>Self-Store Info 1</a><a href=//\'selfstoreinfo2.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"shopping\");\' onClick=\'hideMenu(\"shopping\");\'>Self-Store Info 2</a><a href=\'selfstore1.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"shopping\");\' onClick=\'hideMenu(\"shopping\");\'>Self-Store Estimator</a></div><div id=\'quotes\' style=\'position:absolute; left:411px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"quotes\");\'><a href=\'clearance.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"quotes\");\' onClick=\'hideMenu(\"quotes\");\' style=\'border-top:black 1px solid;\'>Port Clearance</a><a href=\'trade1.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"quotes\");\' onClick=\'hideMenu(\"quotes\");\'>Trade Quotes</a></div><div id=\'information\' style=\'position:absolute; left:522px; top:100px; width:130px; height:0px; z-index:3; visibility:hidden;\' onMouseOut=\'hideMenu(\"information\");\'><a href=\'documentation.aspx\' id=//hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\' style=\'border-top:black 1px solid;\'>Documentation</a><a href=\'testimonials.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Testimonials</a><a href=\'team.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>The Team</a><a href=\'packing.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Packing & Packaging</a><a href=\'terms.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Terms & Conditions</a><a href=\'links.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu(\"information\");\' onClick=\'hideMenu(\"information\");\'>Useful Links</a><a href=\'vacancies.aspx\' id=hoverMenu class=menuprimary onMouseOver=\'showMenu//(\"information\");\' onClick=\'hideMenu(\"information\");\'>Vacancies</a></div><div onMouseOut=\'hideMenu(\"removals\");hideMenu(\"shopping\");hideMenu(\"quotes\");hideMenu(\"information\");\'>   


// ON - BLACK (YELLOW!)
// N.B. adjust numbering based on no. of images before menubar (starts at 2 as 2 images - 0 & 1 above bar)
// this does not affect imgRoll functions!
var iImages=16;
if (document.images) {
var imgOn2 = new Image();
imgOn2.src = "images/homeh.gif";
var imgOn3 = new Image();
imgOn3.src = "images/spacerh.gif";
var imgOn4 = new Image();
imgOn4.src = "images/removalsh.gif";
var imgOn5 = new Image();
imgOn5.src = "images/spacerh.gif";
var imgOn6 = new Image();
imgOn6.src = "images/storageh.gif";
var imgOn7 = new Image();
imgOn7.src = "images/spacerh.gif";
var imgOn8 = new Image();
imgOn8.src = "images/domestich.gif";
var imgOn9 = new Image();
imgOn9.src = "images/spacerh.gif";
var imgOn10 = new Image();
imgOn10.src = "images/shoppingh.gif"
var imgOn11 = new Image();
imgOn11.src = "images/spacerh.gif";
var imgOn12 = new Image();
imgOn12.src = "images/tradeh.gif";
var imgOn13 = new Image();
imgOn13.src = "images/spacerh.gif";
var imgOn14 = new Image();
imgOn14.src = "images/contacth.gif";
var imgOn15 = new Image();
imgOn15.src = "images/spacerh.gif";
var imgOn16 = new Image();
imgOn16.src = "images/informationh.gif";
}


// image rollover effect e.g. for toolbar
function imgRoll(imgName, sDirection) {
	var i;
	var iName;
	// handle first ('home') image and image after
	if (document.images) {
		if (document.images[imgName].name=="2") {
			for (i=0; i<2; i++) {
				iName = parseInt(imgName) + i;
				document.images[iName].src=eval(sDirection + iName + ".src");
			}
		}
		else {
			// handle last image & image before
			if (document.images[imgName].name==iImages) { 
				for (i=-1; i<1; i++) {
					iName = parseInt(imgName) + i;
					document.images[iName].src=eval(sDirection + iName + ".src");
				}
			}
			else {
				// image & images both before and after
				for (i=-1; i<2; i++) {
					iName = parseInt(imgName) + i;
					document.images[iName].src=eval(sDirection + iName + ".src");
				}
			}
		}
	}
}


// show DD
function showMenu(divID) {
var divLayer = document.getElementById(divID);
divLayer.style.visibility="visible";
}


// hide DD
function hideMenu(divID) {
var divLayer = document.getElementById(divID);
divLayer.style.visibility="hidden";
}


// expand section
function expSection (secNo){
//display the section if it's not displayed; hide it if it is displayed
if (secNo.style.display=="none"){secNo.style.display=""}
else{secNo.style.display="none"}
}

// collpase section
function colSection (secNo){
//remove the section when user clicks in the opened DIV
if (secNo.style.display==""){secNo.style.display="none"}
}


function fromCountry(name)
{
this.name = name;
this.length = 0;
}

function toCountry(name) 
{
this.name = name;
}

var fromCountries = new Array();
var fromCountriesIndex = -1;
var toCountriesIndex = -1;

function newFromCountry(name)
{
fromCountriesIndex++
toCountriesIndex = -1;
fromCountries[fromCountriesIndex] = new fromCountry(name);
}

function newToCountry(name)
{
toCountriesIndex++;
fromCountries[fromCountriesIndex][toCountriesIndex] = new toCountry(name); 
fromCountries[fromCountriesIndex].length++;
}

function relateCountries(country)
{
if (country > 0)
{
fromCountriesIndex = country - 1;
var toCountryMenu = document.quotes2.cboToReflexArea;

for(var i = toCountryMenu.options.length; i > 1; i--)
{
toCountryMenu.options[i] = null;
}

for(var i = 0; i < fromCountries[fromCountriesIndex].length; i++)
{
toCountryMenu.options[i + 1] = new Option(fromCountries[fromCountriesIndex][i].name);
}
toCountryMenu.options[0].selected = true;
}
toCountryIndex = 0;

}

/*
function setCombo(control)//, chkToReflexDepot, cboReflexArea, cboToReflexArea)
{

var ctl = document.getElementById(control.id);
//var ctlToReflexDepot = getElementById(chkToReflexDepot);
var cboReflexArea = getElementById("cboReflexArea");
var cboToReflexArea = getElementById("cboToReflexArea");

//if(ctl.id == "chkFromReflexDepot" && ctl.checked == true)
{
alert("OK");
	cboReflexArea.selected = "Wiltshire";
//	ctlToReflexDepot.enabled = false;
}
//else
{
//	cboReflexArea.selectedIndex = 0;
	ctlToReflexDepot.enabled = true;
}

}
*/


function updateTime(div) 
{

	var now = new Date();
	var year = now.getYear();

	// the two day values must be changed each year!
	var BSTBegins = new Date(year, 2, 28); // sunday - shift needed for month 3 to 2
	var BSTEnds = new Date(year, 9, 30); // saturday - shift needed for month 10 to 9
	
	var timeDiv = div;
	var timeString = "";
	var gmtHours = now.getHours() + (now.getTimezoneOffset() / 60); // hours as per GMT
	var minutes = now.getMinutes();
	var gmtDay = now.getUTCDate(); // 1-31!
	var gmtMonth = now.getUTCMonth(); // no shift needed for 0-11 to 1-12?!
	//var Today = new Date(year, gmtMonth, gmtDay); // Today
	var hours;
	var gmtDate = now - now.getTimezoneOffset();

	if (BSTBegins <= now && BSTEnds >= now) // BST
	{
		hours = gmtHours + 1;
	}
	else // GMT
	{
		hours = gmtHours;
	}

	timeString = "<center><span class='header4'>UK > " + pad(hours) + ':' + pad(minutes) + "<br />"; // + " < PORTUGAL" + "<br>";
	timeString = timeString + "FRANCE > " + pad(hours + 1) + ':' + pad(minutes); // + " < SPAIN</span></center>";
	
	timeDiv.innerHTML = timeString;

	setTimeout('updateTime(div)', 10000);

}


function pad(number) 
{ 
	return (number < 10) ? '0' + number : number; 
}
// End hiding script from old browsers-->
