// ########## INITIAL PARAMETERS - START ############################################
if (document.all) {						// If IE...
	Pth=document.all;						// Path to elements
} else {							// ...else NS or something else...
	Pth=document;							// Path to elements
}
// ########## INITIAL PARAMETERS - END ############################################
// ########## BUILD MENU - START ############################################
//make changes in Line 21. Repalce Matilda Pet Foods with Pet Foods.//
document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
document.write('<link rel=stylesheet type=text/css href=Style1.css></head><body onload="SetupPg()" onResize="location.reload()">');
document.write('<div style="width:100%; height:100px; z-index:2; background:#736EC2 url(TopC.gif);">');
document.write('<div style="width:189; height:100px; z-index:3; background:#3D3896;"></div>');
document.write('<div style="left:189px; width:184; height:100px; z-index:3; background:#5550AB url(TopB.jpg);"></div>');
document.write('<div style="left:12px; top:12px; width:173; height:76px; z-index:4;"><a href=index.html><img src=TopD.gif width=173 height=76 border=0 alt=Home></a></div>');
document.write('<div style="left:193px; top:2px; width:87; height:97px; z-index:4;"><a href=index.html><img src=TopE.gif width=87 height=97 border=0 alt=Home></a></div></div>');
document.write('<div style="top:100px; width:100%; height:24px; z-index:2; background:#000000;"><nobr>');
document.write('<a href=index.html id=ML1 class=MenuT title="Back to the Home page..." onmouseover="HoldM=1; ChngMS(1);" onmouseout="HoldM=0; WaitM();">HOME</a>');

document.write('<a href=Profile.htm id=ML2 class=MenuT title="All about Golden Cockerel..." onmouseover="HoldM=1; ChngMS(2);" onmouseout="HoldM=0; WaitM();">ABOUT US</a>');

document.write('<a href=ProductFresh.htm id=ML4 class=MenuT title="Our comprehensive Product range..." onmouseover="HoldM=1; ChngMS(4);" onmouseout="HoldM=0; WaitM();">PRODUCTS</a>');

document.write('<a href="/Employment/" id=ML6 class=MenuT title="Work With Us..." onmouseover="HoldM=1; ChngMS(6);" onmouseout="HoldM=0; WaitM();">EMPLOYMENT</a>');

document.write('<a href=ContactDetails.htm id=ML7 class=MenuT title="Contact Details..." onmouseover="HoldM=1; ChngMS(7);" onmouseout="HoldM=0; WaitM();">CONTACT</a></nobr></div>');
//document.write('<a href=ContactDetails.htm id=ML6 class=MenuT title="Contact Details..." onmouseover="HoldM=1; ChngMS(6);" onmouseout="HoldM=0; WaitM();">CONTACT</a>');
//document.write('<a href=Opportunities.htm id=ML7 class=MenuT title="Work With Us..." onmouseover="HoldM=1; ChngMS(7);" onmouseout="HoldM=0; WaitM();">OPPORTUNITIES</a></nobr></div>');
document.write('<div style="top:121px; width:100%; height:3px; z-index:3; overflow:hidden; background:#000000 url(BlBar.gif);"></div><div style="top:118px; width:140px; height:8px; z-index:4; overflow:hidden; background:#000000 url(BlBar2.gif);"></div>');
document.write('<div id=MSBk style="width:140px; height:100px; background:#FA7F2D url(MSBkgr.gif);"><div id=MSCont class=MSCont onmouseover="HoldM=1; CTO();" onmouseout="HoldM=0; WaitM();"></div></div>');
document.write('<div id=Ctnr style="left:144px; top:121px; z-index:5;">');
// ########## BUILD MENU - END ############################################

// ##### DISABLE RIGHT CLICK - START #####
function clickIE4() {
	if (event.button==2) {
		return false;
	}
}
function clickNS4(e){
	if (document.layers || document.getElementById && !document.all) {
		if (e.which==2 || e.which==3) {
			return false;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
} else if (document.all && !document.getElementById) {
	document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("return false;")
// ##### DISABLE RIGHT CLICK - END #####

// ##### MENU CONTENTS - START #####
MS=new Array();
MS[1]=new Array();
MS[1][1]=new Array('Home',' \n   Back to the Home Page...   \n ','index.html');

MS[2]=new Array();
MS[2][1]=new Array('COMPANY',' \n   Profile & Strengths of Golden Cockerel...   \n ');
MS[2][2]=new Array('  Profile',' \n   Overview of Golden Cockerel   \n ','Profile.htm');
MS[2][3]=new Array('  Strengths',' \n   Keypoints to Golden Cockerel\'s success   \n ','Strengths.htm');
MS[2][4]=new Array('PROCESS',' \n   The Golden Cockerel Process...   \n ');
MS[2][5]=new Array('  Care of Livestock',' \n   Our Care is second to none   \n ','CareofLivestock.htm');
MS[2][6]=new Array('  Quality Assurance',' \n   Our standards are the highest in the industry   \n ','QA.htm');
MS[2][7]=new Array('  Local Distribution',' \n   Regular and reliable supply   \n ','LocalDistribution.htm');
MS[2][8]=new Array('  Sustainability',' \n   Reducing landfill waste   \n ','GCAPC.htm');

MS[3]=new Array();
MS[3][1]=new Array('People',' \n   Our People...   \n ','People.htm');

MS[4]=new Array();
MS[4][1]=new Array('PRODUCT RANGE',' \n   Over 150 products in our range...   \n ');
MS[4][2]=new Array('  Products',' \n      \n ','ProductFresh.htm');
MS[4][3]=new Array('  Value Added',' \n      \n ','ProductValueAdded.htm');

MS[6]=new Array();
MS[6][1]=new Array('EMPLOYMENT',' \n   Work With Us...   \n, "/Employment/" ');
MS[6][2]=new Array('  JOB VACANCIES',' \n   Browse our employment page...   \n','DTEmployment.htm'); 
MS[6][3]=new Array('  Despatch Workers',' \n   Working in Despatch...   \n','DTNoVacancyDespatchProcessWorkers.htm'); 
MS[6][4]=new Array('  Finance & Administration',' \n   Finance & administration jobs...   \n','DTNoVacancyFinanceAdmin.htm'); 
MS[6][5]=new Array('  Human Resources ',' \n   Working in HR...   \n','DTNoVacancyHR.htm'); 
MS[6][6]=new Array('  Information Technology',' \n   Working in ICT areas...   \n','DTNoVacancyIT.htm');
MS[6][7]=new Array('  Process Workers',' \n   Working in Produciton ...   \n','DTNoVacancyProcessWorkers.htm');
MS[6][8]=new Array('  Quality Assurance',' \n   Join our QA team...   \n','DTNoVacancyQA.htm');
MS[6][9]=new Array('  Sales & Marketing',' \n   Join our Sales team...   \n','DTNoVacancySales.htm');
MS[6][10]=new Array('  Trade & Technical',' \n   Engineering, Maintenance, Electricians....   \n','DTNoVacancyTechnical.htm');
MS[6][11]=new Array('  Christmas Casual Workers',' \n   Join our Produciton and Distribution team...   \n','DTListChristmasCasualWorkers.htm');

MS[7]=new Array();
MS[7][1]=new Array('Contact Details',' \n   Contact Us...   \n ','ContactDetails.htm');
//MS[6][1]=new Array('  Contact Us',' \n      \n ','ContactDetails.htm');
//MS[6][3]=new Array('  Opportunities',' \n      \n ','Opportunities.htm');


// ##### MENU CONTENTS - END #####

function SetupPg() {
	if (document.all) {						// If IE...
		ScrWid=document.body.clientWidth;				// Get IE WindowInside Width
		ScrHei=document.body.clientHeight;				// Get IE WindowInside Height
		ScrnX=screen.availwidth;					// Get screen width
		ScrnY=screen.availheight;					// Get screen height
		ScrlWid=document.body.scrollWidth;				// = Total Page Width
		ScrlHei=document.body.scrollHeight;				// = Total Page Length
	} else {							// ...else NS or something else...
		ScrWid=window.innerWidth;					// Get NS WindowInside Width
		ScrHei=window.innerHeight;					// Get NS WindowInside Height
		ScrnX=screen.availWidth;					// Get screen width
		ScrlWid=document.width;						// = Total Page Width
		ScrnY=screen.availHeight;					// Get screen height
	}
	if ((ScrlHei+20)<ScrHei) {					// if ScrollHeight+Copyright < ScreenAvailableHeight
		ScrlHei=ScrHei;							// Set the ScrollHeight to Full available
	} else {							// ...else
		ScrlHei=ScrlHei+20;						// add 20 to ScrollHeight
	}
	Pth.MSBk.style.height=ScrlHei;					// set SideMenu Height
	Pth.CpWr.style.top=ScrlHei-20;					// set Copyright Top Pos (at bottom)
	Pth.Ctnr.style.width=ScrlWid-144;				// Adjust Width of Page Contents Box

//	Pth.pic.style.position='absolute';				// Adjust Left Pos of Page Top Pic
//	Pth.pic.style.left=ScrlWid-144-Pth.pic.offsetWidth;		// Adjust Left Pos of Page Top Pic

	Pth['ML'+PgHdNum].className='MenuTD';				// Set current Default Page header Menu Class
	SwapMS();							// Go setup first Menu
}

// ##### MENU STUFF - START #####
// BASE COLOUR
ECR=0xFF;
ECG=0x66;
ECB=0x05;
// TEXT COLOUR
TCR=0x40;
TCG=0x20;
TCB=0x10;
// TEXT COLOUR DIFFERENCE
TCRD=TCR-ECR;
TCGD=TCG-ECG;
TCBD=TCB-ECB;
// BACKGROUND COLOUR
LCR=0xFF;
LCG=0x7D;
LCB=0x2A;
// BACKGROUND COLOUR DIFFERENCE
LCRD=LCR-ECR;
LCGD=LCG-ECG;
LCBD=LCB-ECB;
// FADE PARAMETERS
FadeDir='I';							// !!!!! Fade Direction (I=In, O=Out, F=Finished)
TmWait=setTimeout("Dumb()",1);					// Wait 1 millisec
function Dumb() {						// Do Dumb Function so TmWait is defined.
}
FadePos=0;							// !!!!! Fade Position (Percentage)
HoldM=0;							// !!!!! Hold Menu (mouse over something)
CurMen=PgHdNum;							// !!!!! Initial CurrentMenuNumber
function ChngMS(MenNum) {
	if (MenNum==CurMen) { return; }					// if not a different Menu Number... Go Away
	CurMen=MenNum;							// !!!!! NewMenuNumber
	if (FadeDir=='O') { return; }					// if a fade Out is in progress... Go Away
	if (FadeDir=='I') {						// if there is a fade in happening...
		clearTimeout(TmWait);						// cancel it...
		FadeDir='O';							// set FadeDirection to Out
		FadeO();							// go Fade back Out...
		return;
	}
	if (FadeDir=='F') {						// if there is no fade in/out happening
		clearTimeout(TmWait);						// cancel it...
		FadeDir='O';							// set FadeDirection to Out
		FadePos=100;							// set Fade Position (Percentage) to full
		FadeO();							// go do Fade Out
	}
}
function FadeO() {
	FadePos=FadePos-20;						// Decrease Fade Position (Percentage)
	if (FadePos<0) {
		FadePos=0;
	}
	CalcNC();							// Go Do Calculations
	if (FadePos!=0) {						// if more Fading out to go...
		TmWait=setTimeout("FadeO()",5);					// Wait 5 millisecs
	} else {							// ...else all faded out
		SwapMS();							// go do Swap MenuSide
	}
}
function SwapMS() {
	var MSHTML='';
	for (var i=1; i<MS[CurMen].length; i++) {
		MSHTML+='<div id=MS'+i+' title="'+MS[CurMen][i][1]+'" class=MS';
		MSHTML+=(MS[CurMen][i][2]) ? ' style="top:'+(-19+(i*19))+'px;" onmouseover="this.className=\'MSO\'; this.style.cursor=\'hand\';" onmouseout="if (this.id!=\'MS\'+PgHdNumS || CurMen!=PgHdNum) { this.className=\'MS\'; }" onclick="window.location=(\''+MS[CurMen][i][2]+'\')">'+MS[CurMen][i][0]+'</div>': 'H style="top:'+(-19+(i*19))+'px;" onmouseover="this.style.cursor=\'default\'">'+MS[CurMen][i][0]+'</div>';
	}
	Pth.MSCont.innerHTML=MSHTML;
	FadeDir='I';							// set FadeDirection to In
	if (CurMen==PgHdNum) {
		Pth['MS'+PgHdNumS].className='MSO';
	}
	FadeI();							// go do Fade In
}
function FadeI() {
	FadePos=FadePos+20;						// Increase Fade Position (Percentage)
	if (FadePos>100) {
		FadePos=100;
	}
	CalcNC();							// Go Do Calculations
	if (FadePos!=100) {						// if more Fading In to go...
		TmWait=setTimeout("FadeI()",10);				// Wait 10 millisecs
	} else {							// ...else all faded In
		FadeDir='F';							// set FadeDirection to Finished
		if (HoldM==0) {
			TmWait=setTimeout("MenBak()",1400);				// Wait 1.4 secs
		} else {
			clearTimeout(TmWait);						// cancel any time waiting...
		}
		return;								// done...
	}
}
function MenBak() {
	if (HoldM==1) { return; }					// if mouse still over a mouse over zone... go away
	if (CurMen!=PgHdNum) {						// if not already on the default menu for this page...
		CurMen=PgHdNum;
		FadeDir='O';							// set FadeDirection to Out
		FadePos=100;							// set Fade Position (Percentage) to full
		FadeO();							// go do Fade Out
	}
}
function WaitM() {
	if (FadeDir!='F') { return; }					// if Fader not finished fading... go away
	TmWait=setTimeout("MenBak()",1400);				// Wait 1.4 secs
}
function CTO() {
	if (FadeDir=='F') { clearTimeout(TmWait); }						// cancel it...
}
function CalcNC() {
	// ##### TEXT #####
	var NTCR=ECR+Math.round((TCRD/100)*FadePos);
	var NTCG=ECG+Math.round((TCGD/100)*FadePos);
	var NTCB=ECB+Math.round((TCBD/100)*FadePos);
	NTCR=NTCR.toString(16);
	NTCG=NTCG.toString(16);
	NTCB=NTCB.toString(16);
	if (NTCR.length==1) { NTCR='0'+NTCR; }
	if (NTCG.length==1) { NTCG='0'+NTCG; }
	if (NTCB.length==1) { NTCB='0'+NTCB; }
	document.styleSheets[0].rules[0].style.color='#'+NTCR+NTCG+NTCB;
	// ##### BAKGROUND #####
	var NLCR=ECR+Math.round((LCRD/100)*FadePos);
	var NLCG=ECG+Math.round((LCGD/100)*FadePos);
	var NLCB=ECB+Math.round((LCBD/100)*FadePos);
	NLCR=NLCR.toString(16);
	NLCG=NLCG.toString(16);
	NLCB=NLCB.toString(16);
	if (NLCR.length==1) { NLCR='0'+NLCR; }
	if (NLCG.length==1) { NLCG='0'+NLCG; }
	if (NLCB.length==1) { NLCB='0'+NLCB; }
	document.styleSheets[0].rules[0].style.background='#'+NLCR+NLCG+NLCB;
}
// ##### MENU STUFF - END #####

// ########## DETERMINE NEW WINDOW SIZE / SCROLBARS Y/N - START ############################################
function NwWinEnv(PicW,PicH) {
	if (document.all) {						// if IE...
		ScrnX=screen.availwidth;					// Get screen width
		ScrnY=screen.availheight;					// Get screen height
		ScrnBdrW=10;							// Allowance for Browser Frame Width
		ScrnBdrH=29;							// Allowance for Browser Frame Height
	} else {							// if something else...
		ScrnX=screen.availWidth;					// Get screen width
		ScrnY=screen.availHeight;					// Get screen height
		ScrnBdrW=6;							// Allowance for Browser Frame Width
		ScrnBdrH=25;							// Allowance for Browser Frame Height
	}
	ScrllBars='no';							// Set Scrollbars to default value of 'no'
	if (PicW>(ScrnX-ScrnBdrW)) {					// if picture is wider than screen can take...
		WindW=ScrnX-ScrnBdrW;					// Set window width to Max
		ScrllBars='yes';						// Set scrollbars to 'yes'
	} else {							// otherwise
		WindW=PicW;							// Set window width to width of pic
	}
	if (PicH>(ScrnY-ScrnBdrH)) {					// if picture is taller than screen can take...
		WindH=ScrnY-ScrnBdrH;						// Set window height to Max
		ScrllBars='yes';						// Set scrollbars to 'yes'
	} else {							// otherwise
		WindH=PicH;							// Set window height to height of pic
	}
}
// ########## DETERMINE NEW WINDOW SIZE / SCROLBARS Y/N - END ############################################

// ########## Pic Window - START ############################################
win=new Array();
function PicWinOpen(PicNum,WinURL,WinTitle,PicW,PicH) {
	NwWinEnv(PicW,PicH);						// Go get screen environment
	WinTitle=WinTitle+' - Click Picture to close this window ';
	WinFeatures='height='+WindH+',innerHeight='+WindH+',width='+WindW+',innerWidth='+WindW+',channelmode=no,dependent=no,directories=no,fullscreen=no,location=no,menubar=no,scrollbars='+ScrllBars+',resizable=no,status=no,toolbar=no,screenX=0,left=0,screenY=0,top=0';
	win[PicNum]=window.open('',PicNum,WinFeatures);
	win[PicNum].document.open('text/html', 'replace');
	win[PicNum].document.write('<html><head><title>', WinTitle, '</title></head>');
	win[PicNum].document.write('\n<body bgcolor=#FFFFFF leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginheight=0 marginwidth=0>');
	win[PicNum].document.write('\n<a href="JavaScript:self.close()"><img src="'+WinURL+'" width='+PicW+' height='+PicH+' border=0 alt=" Click to Close this Window "></a>');
	win[PicNum].document.write('\n</body></html>\n');
	win[PicNum].document.close();
	win[PicNum].focus();
}
// ########## Pic Window - END ############################################
