var aTopText=new Array();
var aTopLink=new Array();
var aTop2Text=new Array();
var aTop2Link=new Array();
var aTop3Text=new Array();
var aTop3Link=new Array();
var aLeftText=new Array();
var aLeftLink=new Array();
var aLeft1Text=new Array();
var aLeft1Link=new Array();
var aLeft2Text=new Array();
var aLeft2Link=new Array();
var aLeft5Text=new Array();
var aLeft5Link=new Array();
var aLeft6Text=new Array();
var aLeft6Link=new Array();
var aBottomText=new Array();
var aBottomLink=new Array();

// arrays for Top3 navigation
aTop3Text[0]="home";					aTop3Link[0]="http://www.winediscoveries.co.uk/";
aTop3Text[1]="how to buy";				aTop3Link[1]="http://www.winediscoveries.co.uk/tc_01.htm";
aTop3Text[2]="about us";				aTop3Link[2]="http://www.winediscoveries.co.uk/about_01.htm";
aTop3Text[3]="web deals";				aTop3Link[3]="http://www.winediscoveries.co.uk/shop/prodtype.asp?PT_ID=233&strPageHistory=cat";
aTop3Text[4]="brochure";				aTop3Link[4]="http://winediscoveriesnews.co.uk/newsletter/?p=subscribe&id=1";
aTop3Text[5]="newsletter";				aTop3Link[5]="http://winediscoveriesnews.co.uk/newsletter/?p=subscribe&id=1#sign_up";
aTop3Text[6]="help!";					aTop3Link[6]="http://www.winediscoveries.co.uk/help_01.htm";

// arrays for Top2 navigation
aTop2Text[0]="home";					aTop2Link[0]="/index.htm";
aTop2Text[1]="about us";				aTop2Link[1]="/about_01.htm";
aTop2Text[2]="how to buy";				aTop2Link[2]="/index.htm";
aTop2Text[3]="brochure";				aTop2Link[3]="/contact_01.htm";
aTop2Text[4]="wine club";				aTop2Link[4]="/index.htm";
aTop2Text[5]="help";					aTop2Link[5]="/index.htm";

// arrays for left navigation
aLeftText[0]="languedoc";				aLeftLink[0]="/languedoc_01.htm";
aLeftText[1]="rhone";					aLeftLink[1]="/rhone_01.htm";
aLeftText[2]="beaujolais";				aLeftLink[2]="/beaujolais_01.htm";
aLeftText[3]="burgundy";				aLeftLink[3]="/burgundy_01.htm";
aLeftText[4]="chablis";					aLeftLink[4]="/chablis_01.htm";
aLeftText[5]="loire";					aLeftLink[5]="/loire_01.htm";
aLeftText[6]="bordeaux";				aLeftLink[6]="/bordeaux_01.htm";
aLeftText[7]="champagne";				aLeftLink[7]="/champagne_01.htm";

// arrays for left2 navigation
aLeft2Text[0]="Jonny\'s wine diary";				aLeft2Link[0]="http://www.winediscoveries.co.uk/wine_diary_01.htm";
aLeft2Text[1]="tasting events";					aLeft2Link[1]="http://www.winediscoveries.co.uk/taste_01.htm";
aLeft2Text[2]="party service";					aLeft2Link[2]="http://www.winediscoveries.co.uk/party_01.htm";
aLeft2Text[3]="wine tours";					aLeft2Link[3]="http://www.winediscoveries.co.uk/tours_01.htm";
aLeft2Text[4]="weddings";					aLeft2Link[4]="http://www.winediscoveries.co.uk/weddings_01.htm";
aLeft2Text[5]="serving & storing wine";				aLeft2Link[5]="http://www.winediscoveries.co.uk/news_01.htm";
aLeft2Text[6]="our wine makers";				aLeft2Link[6]="http://www.winediscoveries.co.uk/shop/prodtype.asp?PT_ID=82&strPageHistory=cat";
aLeft2Text[7]="links";						aLeft2Link[7]="http://www.winediscoveries.co.uk/links_01.htm";
aLeft2Text[8]="contact us";					aLeft2Link[8]="http://winediscoveriesnews.co.uk/newsletter/?p=subscribe&id=1";
aLeft2Text[9]="subscribe to our newsletter";			aLeft2Link[9]="http://winediscoveriesnews.co.uk/newsletter/?p=subscribe&id=1#sign_up";

var weekdays=new Array("sun","mon","tue","wed","thu","fri","sat")
var months=new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")

function writeTopNavigation(){
	strNav='';
	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aTopText.length;i++){
		strNav+='<a class="toplink" href="'+aTopLink[i]+'">'+aTopText[i]+'</a>'+ strSpaces
	}
	strTop= '<table align=center height="95" cellSpacing="0" cellPadding="0" width="650" bgColor="#FDF9DB" border="0">'
	strTop+='<tr><td height="86" width=380><img src="http://www.winediscoveries.co.uk/images/top_banner_left_01.jpg" height="95" width=270></td>'
	var randomImages = new Array(
				"http://www.winediscoveries.co.uk/images/top_banner_right_01.jpg",
				"http://www.winediscoveries.co.uk/images/top_banner_right_02.jpg",
				"http://www.winediscoveries.co.uk/images/top_banner_right_03.jpg",
				"http://www.winediscoveries.co.uk/images/top_banner_right_04.jpg",
				"http://www.winediscoveries.co.uk/images/top_banner_right_05.jpg")
	numImages = randomImages.length;
	imgIndex = Math.floor(Math.random()*numImages);
	strTop+='<td height="86" width=270><img src="' + randomImages[imgIndex]  + '" border=0 width=380 height=95></td></tr>'
	strTop+='</table>'
	document.write(strTop);
}

function writeTop2Navigation(){
	strNav='';

	strSpaces='&nbsp;&nbsp;|&nbsp;'
	
	strTopClass='toplink'
	strLocation=""+document.location
	strLocation=strLocation.split("/")
	intArrayLength=strLocation.length
	
	strCurrentPage=strLocation[intArrayLength-1]

	if(!(strCurrentPage) || strCurrentPage==''){
		strCurrentPage="index.htm"
	}
	
	for(i=0;i<aTop2Text.length;i++){
		
		if((strCurrentPage)==aTop2Link[i]){
			strTopClass='toplink2'
		}else{
			strTopClass='toplink'		
		}
		
		strNav+='&nbsp;<a class="'+strTopClass+'" href="'+aTop2Link[i]+'">'+aTop2Text[i]+'</a>'+ strSpaces
	}

	strTop2= '<table cellspacing="0" cellpadding="0" border="0" height="25" style="margin-left: 30px;">'
	strTop2+='<tr><td width="20" height="25"><img src="images/top_menu_top_left_01.png" border="0" width="20" height="25"></td>'
	strTop2+='<td background="images/top_menu_top_01.png" valign="bottom" style="padding-bottom: 2px;">'+strNav+'&nbsp;tel: 01580 200900&nbsp;</td>'
	strTop2+='<td width="20" height="25"><img src="images/top_menu_top_right_01.png" border="0" width="20" height="25"></td>'
	strTop2+='<td width="20%" height="25">&nbsp;</td>'
	strTop2+='<td width="20" height="25"><img src="images/top_menu_top_left_01.png" border="0" width="20" height="25"></td>'
	strTop2+='<td background="images/top_menu_top_01.png" valign="bottom" style="padding-bottom: 2px;">Customer Login >></td>'
	strTop2+='<td width="20" height="25"><img src="images/top_menu_top_right_01.png" border="0" width="20" height="25"></td>'
	strTop2+='</tr></table>'
	document.write(strTop2);
}

function writeTop3Navigation(){
	strNav='';

	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;'
	
	strTopClass='toplink'
	strLocation=""+document.location
	strLocation=strLocation.split("/")
	intArrayLength=strLocation.length
	
	strCurrentPage=strLocation[intArrayLength-1]

	if(!(strCurrentPage) || strCurrentPage==''){
		strCurrentPage="index.htm"
	}
	
	for(i=0;i<aTop3Text.length;i++){
		
		if((strCurrentPage)==aTop2Link[i]){
			strTopClass='toplink2'
		}else{
			strTopClass='toplink'		
		}
		
		strNav+='<img src="http://www.winediscoveries.co.uk/images/bullet_01.gif" width="5" height="5" align="absmiddle">&nbsp;<a class="'+strTopClass+'" href="'+aTop3Link[i]+'">'+aTop3Text[i]+'</a>'+ strSpaces
	}

	strTop3= '<table width=650 height=25 bgcolor=#FDF9DB cellpadding=1 cellspacing=0 border=0 background="http://www.winediscoveries.co.uk/images/top_banner_middle_01.jpg">'
	strTop3+='<tr><td class="toplink" valign="top" align="left">&nbsp;&nbsp;'+strNav+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t: 01580 200900</td></tr>'
	strTop3+='</table>'
	document.write(strTop3);
}

function writeSearchNavigation(){

 document.write('<table cellSpacing="1" cellPadding="0" width="180" border="0" bgcolor=#993366>');
 document.write('<tr><td align=center valign=center><table cellSpacing="0" cellPadding="5" width="178" border="0" bgcolor=#FDFBEE>');
 document.write('<tr><td bgcolor=#993366 class="boxtext3" valign="center" align="left"><img src="/images/bullet_02.gif" width="5" height="5" align="absmiddle">&nbsp;search for wine:</td></tr>');
 document.write('<form method="GET" name="Search" action="/shop/search.asp"><input type="hidden" name="numRecordPosition" value="1">');
 document.write('<tr><td valign=center align=left><input type="text" class="inputSearch" size="19" name="strKeywords">');
 document.write('<input name="btnSubmit" type="submit" value="Search"></td></tr>');
 document.write('</form>');
 document.write('</table>');
 document.write('</td></tr></table>');
}

function writeLeftNavigation(){
	strNav='';

	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	
	strLeftClass='Leftlink'
	strLocation=""+document.location
	strLocation=strLocation.split("/")
	intArrayLength=strLocation.length
	
	strCurrentPage=strLocation[intArrayLength-1]

	if(!(strCurrentPage) || strCurrentPage==''){
		strCurrentPage="index.htm"
	}
	
	for(i=0;i<aLeftText.length;i++){
		
		if((strCurrentPage)==aLeftLink[i]){
			strLeftClass='Leftlink2'
		}else{
			strLeftClass='Leftlink'		
		}
		
		strNav+='<img src="/images/bullet_01.gif" width="5" height="5" align="absmiddle">&nbsp;<a class="'+strLeftClass+'" href="'+aLeftLink[i]+'">'+aLeftText[i]+'</a><br>'
	}

	strLeft= '<table cellSpacing="1" cellPadding="0" width="180" border="0" bgcolor=#993366>'
	strLeft+='<tr><td align=center valign=center><table cellSpacing="0" cellPadding="5" width="179" height=100 border="0" bgcolor=#FDFBEE>'
	strLeft+='<tr><td bgcolor=#993366 class="boxtext3" valign="center" align="left"><img src="/images/bullet_02.gif" width="5" height="5" align="absmiddle">&nbsp;wines:</td></tr>'
	strLeft+='<tr><td class="toplink" valign="center" align="left">'+strNav+'</td></tr>'
	strLeft+='</table>'
	strLeft+='</td></tr></table>'
	document.write(strLeft);
}

function writeLeft2Navigation(){
	strNav='';

	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	
	strLeftClass='Left2link'
	strLocation=""+document.location
	strLocation=strLocation.split("/")
	intArrayLength=strLocation.length
	
	strCurrentPage=strLocation[intArrayLength-1]

	if(!(strCurrentPage) || strCurrentPage==''){
		strCurrentPage="index.htm"
	}
	
	for(i=0;i<aLeft2Text.length;i++){
		
		if((strCurrentPage)==aLeft2Link[i]){
			strLeftClass='Leftlink2'
		}else{
			strLeftClass='Leftlink'		
		}
		
		strNav+='<a class="'+strLeftClass+'" href="'+aLeft2Link[i]+'">'+aLeft2Text[i]+'</a><br>'
	}

	strLeft2= '<table width="160" cellpadding="0" cellspacing="0" border="0" style="margin-top: 5px; margin-bottom: 5px;">'
	strLeft2+= '<tr><td width="19" height="15"><img src="images/footer_top_left_01.jpg" border="0" width="19" height="15"></td>'
	strLeft2+= '<td bgcolor="#d2d2d2">&nbsp;</td>'
	strLeft2+= '<td width="19" height="15"><img src="images/footer_top_right_01.jpg" border="0" width="19" height="15"></td>'
	strLeft2+= '</tr><tr>'
	strLeft2+= '<td background="images/footer_left_01.jpg">&nbsp;</td>'
	strLeft2+= '<td bgcolor="#d2d2d2" style="padding-bottom: 5px;">'+strNav+'</td>'
	strLeft2+='<td background="images/footer_right_01.jpg">&nbsp;</td>'
	strLeft2+='</tr><tr>'
	strLeft2+='<td width="19" height="20"><img src="images/footer_bottom_left_01.jpg" border="0" width="19" height="20"></td>'
	strLeft2+='<td background="images/footer_bottom_01.jpg">&nbsp;</td>'
	strLeft2+='<td width="19"><img src="images/footer_bottom_right_01.jpg" border="0" width="19" height="20"></td>'
	strLeft2+='</tr></table>'
	document.write(strLeft2);
}

function writeLeft3Navigation(){
	strNav='';

	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	
	strLeftClass='Leftlink'
	strLocation=""+document.location
	strLocation=strLocation.split("/")
	intArrayLength=strLocation.length
	
	strCurrentPage=strLocation[intArrayLength-1]

	if(!(strCurrentPage) || strCurrentPage==''){
		strCurrentPage="index.htm"
	}
	
	for(i=0;i<aLeft2Text.length;i++){
		
		if((strCurrentPage)==aLeftLink[i]){
			strLeftClass='Leftlink2'
		}else{
			strLeftClass='Leftlink'		
		}
		
		strNav+='<a class="'+strLeftClass+'" href="'+aLeft2Link[i]+'">'+aLeft2Text[i]+'</a><br>'
	}

	strLeft3= '<table cellSpacing="1" cellPadding="0" width="180" border="0" bgcolor=#993366>'
	strLeft3+='<tr><td align=center valign=center><table cellSpacing="0" cellPadding="5" width="179" border="0" bgcolor=#FDFBEE>'
	strLeft3+='<tr><td bgcolor=#993366 class="boxtext3" valign="center" align="left"><img src="/images/bullet_02.gif" width="5" height="5" align="absmiddle">&nbsp;Contact Us:</td></tr>'
	strLeft3+='<tr><td class="toplink" valign="center" align="left" background="/images/box_mid_01.jpg"><b>Wine Discoveries</b><br>Unit 7, Old Factory Buildings<br>Battenhurst Road<br>Stonegate<br>East Sussex<br>TN5 7DU<br><br>t: 01580 200900<br>f: 0870 1321259<br><a class="toplink" href="mailto:hello@winediscoveries.co.uk">hello@winediscoveries.co.uk</a></td></tr>'
	strLeft3+='</table>'
	strLeft3+='</td></tr></table>'
	document.write(strLeft3);
}

function writeLeft4Navigation(){
	strNav='';

	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	
	strLeftClass='Leftlink'
	strLocation=""+document.location
	strLocation=strLocation.split("/")
	intArrayLength=strLocation.length
	
	strCurrentPage=strLocation[intArrayLength-1]

	if(!(strCurrentPage) || strCurrentPage==''){
		strCurrentPage="index.htm"
	}
	
	for(i=0;i<aLeft2Text.length;i++){
		
		if((strCurrentPage)==aLeftLink[i]){
			strLeftClass='Leftlink2'
		}else{
			strLeftClass='Leftlink'		
		}
		
		strNav+='<a class="'+strLeftClass+'" href="'+aLeft2Link[i]+'">'+aLeft2Text[i]+'</a><br>'
	}

	strLeft4= '<table cellSpacing="1" cellPadding="0" width="180" border="0" bgcolor=#993366">'
	strLeft4+='<tr><td align=center valign=center><table cellSpacing="0" cellPadding="5" width="179" border="0" bgcolor=#FDFBEE>'
	strLeft4+='<tr><td bgcolor=#993366 class="boxtext3" valign="center" align="left"><img src="/images/bullet_02.gif" width="5" height="5" align="absmiddle">&nbsp;Autumn 2003 Newsletter:</td></tr>'
	strLeft4+='<tr><td class="toplink" valign="center" align="left" background="/images/box_mid_01.jpg"><a class="toplink" href="mailto:sales@newwinediscoveries.com">sales@<br>newwinediscoveries.com</a></td></tr>'
	strLeft4+='</table>'
	strLeft4+='</td></tr></table>'
	document.write(strLeft4);
}

function getToday(){
	today = new Date();
	return weekdays[today.getDay()]+", "+months[today.getMonth()]+" "+today.getDate()+" "+today.getFullYear();
}

function writeBottomNavigation(){
	document.write('<img src="images/bottom_shadow_01.jpg" border="0" width="965" height="25"><br />');
	document.write('<div class="bottom_content_01"><img src="images/citroen_2008_01.jpg" border="0" align="right">');
	document.write('<br /><span class="boxtext">&copy; <?php echo date("Y");?> Wine Discoveries (unless otherwise stated).<br />');
	document.write('Unit 7, Old Factory Buildings, Battenhurst Road, Stonegate, East Sussex, TN5 7DU, UK (VAT No: 826 3634 24)<br />');
	document.write('You can collect wine from our warehouse. Please call us first to arrange a time.<br />');
	document.write('This website has been built to work best with Microsoft&#39;s Internet Explorer 7 and above; whilst every effort has been made to check browser compatibility, Wine Discoveries can take no responsibility for an individual&#39;s PC or Mac browser settings.<br />');
	document.write('This website designed by <a target="_new" href="http://www.3bweb.com/?utm_source=winediscoveries&amp;utm_medium=link&amp;utm_campaign=credits" class="boxtext">3B Web Design</a> - ecommerce by <a class="boxtext" target="_new" href="http://www.ecommnet.co.uk/">ecommnet</a></span></div>');
}

function writeBasket() { document.location=document.location }
function writeCategories() { document.location=document.location }