// JavaScript Document for www.fdlcontainers.co.uk


NumberOfImagesToRotate = 15;

// Specify the first and last part of the image tag. 

FirstPart = '<img src="image/template';
LastPart = '.jpg" width="100%">';

function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}



/***********************************************
* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents 
var productmenu=new Array()
productmenu[0]='<a href="http://www.fdlcontainers.co.uk/fibrelokdrums.html">FIBRE DRUMS</a>'
productmenu[1]='<a href="http://www.fdlcontainers.co.uk/tightheadplasticdrum.html">PLASTIC DRUMS</a>'
productmenu[2]='<a href="http://www.fdlcontainers.co.uk/standardpails.html">PLASTIC PAILS</a>'
productmenu[3]='<a href="http://www.fdlcontainers.co.uk/unapprovedbottles.html">PLASTIC BOTTLES</a>'
productmenu[4]='<a href="http://www.fdlcontainers.co.uk/fotsteeldrums.html">STEEL DRUMS</a>'
productmenu[5]='<a href="http://www.fdlcontainers.co.uk/highperpots.html">PLASTIC KEGS</a>'
productmenu[6]='<a href="http://www.fdlcontainers.co.uk/ibc.html">IBC</a>'


//Contents for menu 1, this is the array for the fibre drums type
var menu1=new Array()
menu1[0]='<a href="http://www.fdlcontainers.co.uk/fibrelokdrums.html">Fibrelok Drum</a>'
menu1[1]='<a href="http://www.fdlcontainers.co.uk/sliplid.html">Slip Lid Drum</a>'
menu1[2]='<a href="http://www.fdlcontainers.co.uk/allfibredrum.html">All Fibre Drum</a>'

//Contents for menu 2, this is the array for the plastic drum product type
var menu2=new Array()
menu2[0]='<a href="http://www.fdlcontainers.co.uk/tightheadplasticdrum.html">Tighthead Plastic Drums</a>'
menu2[1]='<a href="http://www.fdlcontainers.co.uk/fotplasticdrum.html">Full Open Top Drums</a>'

//Contents for menu 3, this is the array for the plastic pails product type
var menu3=new Array()
menu3[0]='<a href="http://www.fdlcontainers.co.uk/standardpails.html">Standard Plastic Pails</a>'
menu3[1]='<a href="http://www.fdlcontainers.co.uk/unapprovedpails.html">UN Approved Pails</a>'

//Contents for menu 4, this is the array for the plastic bottles product type
var menu4=new Array()
menu4[0]='<a href="http://www.fdlcontainers.co.uk/unapprovedbottles.html">UN Approved Bottles</a>'

//Contents for menu 5, this is the array for the steel drums product types
var menu5=new Array()
menu5[0]='<a href="http://www.fdlcontainers.co.uk/fotsteeldrums.html">Small Steel Drums</a>'
menu5[1]='<a href="http://www.fdlcontainers.co.uk/tightheadsteeldrum.html">Large Steel Drum</a>'
menu5[2]='<a href="http://www.fdlcontainers.co.uk/polylinedrums.html">Poly Lined Steel Drums</a>'


//Contents for menu 6, this is the array for the Plastic Kegs product types
var menu6=new Array()
menu6[0]='<a href="http://www.fdlcontainers.co.uk/highperpots.html">High Performance Pots</a>'
menu6[1]='<a href="http://www.fdlcontainers.co.uk/wideneck_kegs.html">Wide Neck Kegs</a>'
menu6[2]='<a href="http://www.fdlcontainers.co.uk/total_opening_kegs.html">Total Opening Kegs</a>'

var menu7=new Array()
menu7[0]='<a href="http://www.fdlcontainers.co.uk/ibc.html">IBC</a>'

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=0//horizontal offset of menu from default location. (0-5 is a good value)
var verticaloffset=-30

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetHeight+verticaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}





function dropdownmenu2(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}



return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}


function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}



function swapfibre() {
	document.fibredrums.src="image/swapfibredrums.gif"
}

function fibre() {
	document.fibredrums.src="image/fibredrums.png"
}



function swapplasticdrums() {
	document.pdrum.src="image/swapplasticdrums.gif"
}

function plastidrum() {
	document.pdrum.src="image/plasticdrums.png"
}


function swapplasticbottles() {
	document.plasticbottles.src="image/swapplasticbottles.gif"
}

function plasticbottle() {
	document.plasticbottles.src="image/plasticbottles.png"
}


function swapplasticpails() {
	document.pails.src="image/swapplasticpails.gif"
}

function plasticpails() {
	document.pails.src="image/plasticpails.png"
}

function swapsteeldrums() {
	document.steeldrum.src="image/swapsteeldrums.gif"
}

function steeldrums() {
	document.steeldrum.src="image/steeldrums.png"
}




function purchaseover() {
	document.pru.src="image/purchaseover.png"
}

function purchaseout() {
	document.pru.src="image/purchaseimage.png"
}






function downloadover() {
	document.down.src="image/btn_downloadover.png"
}

function downloadout() {
	document.down.src="image/btn_download.png"
}



function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}