// The following scripts are used within the Fibre Drums Ltd Website

NumberOfImagesToRotate = 4;

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

FirstPart = '<img src="Image/template';
LastPart = '.jpg" width="100%" alt="Fibre Drums Introduction Images">';
function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}





function verticalsection() {
	var verticalpages =new Array()
	verticalpages[1]='<a href="allfibre.html">'
	verticalpages[2]='<a href="fibrelok.html">'
	verticalpages[3]='<a href="sliplid.html">'
	
	
	NumbersToRotate = 3;
	
	FirstPart= '<img src="Image/verticalImage';
	SecondPart= '.jpg" width="72%" border="0" alt="Product Image With Link."></a>';
	
	
	var r = Math.ceil(Math.random()* NumbersToRotate);
	document.write(verticalpages[r] + FirstPart + r + SecondPart);
}




function horizontalsection() {
	
	var horizontalpages =new Array()
	horizontalpages[1] = '<a href="payoffpak.html">'
	horizontalpages[2] = '<a href="specialdrums.html">'
	horizontalpages[3] = '<a href="tubes.html">'
	
	NumberOfHorizontalToRotate = 3;
	
	FirstPart= '<img src="Image/horizontalImage';
	SecondPart= '.jpg" width="91%" border="0" alt="Product Image With Link"></a>';

	
	var d = Math.ceil(Math.random()* NumberOfHorizontalToRotate);
	document.write(horizontalpages[d] + FirstPart + d + SecondPart);
}








// the following code are used to format the product section of the website, please modify carefully.

var active = 0;
var browser;

function Highlight(id){
	document.layers["menua"].visibility ="hide";
	document.layers["menu" + id + "b"].visibility = "show";
}

function UnHighlight(id) {
	document.layers["menu" + id + "b"].visibility = "hide";
	document.layers["menua"].visibility = "show";
}

function Init() {
	browser = new BrowserObj();
}

function BrowserObj() {
	this.navigator = 0;
	this.explorer = 0;
	this.other = 0;
	
	if ((navigator.appName.toLowerCase()).indexOf ("netscape") >= 0)
	this.navigator = 1;
	else {
		if ((navigator.appName.toLowerCase()) .indexOf ("explorer") >=0)
		this.explorer = 1;
		else
		this.other = 1;
	}
	this.major = parseInt(navigator.appVersion)
	this.minor = parseFloat (navigator.appVersion)
}//BroswerObj

function ChangeLayer(now) {
	if (browser.navigator) {
		document.layers["content" + active].visibility = "hide";
		document.layers["content" + now] .visibility = "show";
		active = now;
	}
	
	else {
		var current = document.all("content" + active).style;
		var next = document.all("content" + now).style;
		current.visibility = "hidden";
		next.visibility = "visible";
		active = now;
	}
}



//This script is used to open the drum capacity chart.

function capacity(url)
{
	newwindow=window.open(url,'name','height=510px,width=400px, scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}


//This script is used create the book mark functionality
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}




function downloadover() {
	document.btn.src="Image/btn_downloadover.jpg"
}

function downloadout() {
	document.btn.src="Image/btn_download.jpg"
}