var aLeftText=new Array();
var aLeftLink=new Array();
var aLeft2Text=new Array();
var aLeft2Link=new Array();
var aLeft5Text=new Array();
var aLeft5Link=new Array();
var aRight1Text=new Array();
var aRight1Link=new Array();
var aRight2Text=new Array();
var aRight2Link=new Array();
var aRight3Text=new Array();
var aRight3Link=new Array();
var aRight4Text=new Array();
var aRight4Link=new Array();
var aRight5Text=new Array();
var aRight5Link=new Array();
var aRight6Text=new Array();
var aRight6Link=new Array();
var aRight7Text=new Array();
var aRight7Link=new Array();
var aTopText=new Array();
var aTopLink=new Array();
var aTop2Text=new Array();
var aTop2Link=new Array();
var aTop6Text=new Array();
var aTop6Link=new Array();
var aBottomText=new Array();
var aBottomLink=new Array();

// arrays for Top navigation
aTopText[0]="home";			aTopLink[0]="http://www.autoworldprestige.com/index.htm";
aTopText[1]="contact us";		aTopLink[1]="http://www.autoworldprestige.com/contact_01.htm";

// arrays for top6 navigation
aTop6Text[0]="company profile";		aTop6Link[0]="http://www.autoworldprestige.com/about_01.htm"
aTop6Text[1]="directors";		aTop6Link[1]="http://www.autoworldprestige.com/directors_01.htm"
aTop6Text[2]="news";			aTop6Link[2]="http://www.autoworldprestige.com/news_01.htm"
aTop6Text[3]="history";			aTop6Link[3]="http://www.autoworldprestige.com/history_01.htm"

// arrays for left navigation
aLeftText[0]="Home";			aLeftLink[0]="http://www.autoworldprestige.com/index.htm";
aLeftText[1]="About Us";		aLeftLink[1]="http://www.autoworldprestige.com/about_01.htm";
aLeftText[2]="Contact Us";		aLeftLink[2]="http://www.autoworldprestige.com/contact_01.htm";
aLeftText[3]="Vehicle Enquiry";		aLeftLink[3]="http://www.autoworldprestige.com/vehicle_enq_01.htm";
aLeftText[4]="AWP News";		aLeftLink[4]="http://www.autoworldprestige.com/specials_01.htm";
aLeftText[5]="Case Studies";		aLeftLink[5]="http://www.autoworldprestige.com/studies_01.htm";
aLeftText[6]="Links";			aLeftLink[6]="http://www.autoworldprestige.com/links_01.htm";
aLeftText[7]="Finance";			aLeftLink[7]="http://www.autoworldprestige.com/finance_01.htm";

// arrays for left2 navigation
aLeft2Text[0]="Aston Martin";		aLeft2Link[0]="http://www.autoworldprestige.com/aston_01.htm";
aLeft2Text[1]="Audi";			aLeft2Link[1]="http://www.autoworldprestige.com/audi_01.htm";
aLeft2Text[2]="Audi R8";		aLeft2Link[2]="http://www.autoworldprestige.com/audi_tt_01.htm";
aLeft2Text[3]="Bentley";		aLeft2Link[3]="http://www.autoworldprestige.com/bentley_01.htm";
aLeft2Text[4]="BMW - new";		aLeft2Link[4]="http://www.autoworldprestige.com/bmw_01.htm";
aLeft2Text[5]="BMW X5 - new & used";	aLeft2Link[5]="http://www.autoworldprestige.com/x5/index.htm";
aLeft2Text[6]="Ferrari";		aLeft2Link[6]="http://www.autoworldprestige.com/ferrari_01.htm";
aLeft2Text[7]="Jaguar";			aLeft2Link[7]="http://www.autoworldprestige.com/jaguar_01.htm";
aLeft2Text[8]="Lamborghini";		aLeft2Link[8]="http://www.autoworldprestige.com/lamborghini_01.htm";
aLeft2Text[9]="Porsche";		aLeft2Link[9]="http://www.autoworldprestige.com/porsche_01.htm";
aLeft2Text[10]="Range Rover";		aLeft2Link[10]="http://www.autoworldprestige.com/range_rover/index.htm";
aLeft2Text[11]="Other Makes";		aLeft2Link[11]="http://www.autoworldprestige.com/other_makes_01.htm";

// arrays for bottom navigation
aBottomText[0]="profile";		aBottomLink[2]="profile_01.htm"
aBottomText[2]="home";			aBottomLink[0]="index.htm"
aBottomText[1]="contact";		aBottomLink[1]="contact_01.htm"


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="100" cellSpacing="0" cellPadding="0" width="650" border="0">'
		var randomImages = new Array(
					"http://www.autoworldprestige.com/images/top_banner_02.jpg",
					"http://www.autoworldprestige.com/images/top_banner_03.jpg",
					"http://www.autoworldprestige.com/images/top_banner_04.jpg",
					"http://www.autoworldprestige.com/images/top_banner_05.jpg",
					"http://www.autoworldprestige.com/images/top_banner_06.jpg",
					"http://www.autoworldprestige.com/images/top_banner_07.jpg",
					"http://www.autoworldprestige.com/images/top_banner_08.jpg",
					"http://www.autoworldprestige.com/images/top_banner_09.jpg")
		numImages = randomImages.length;
	imgIndex = Math.floor(Math.random()*numImages);
	strTop+='<td><img src="' + randomImages[imgIndex]  + '" border=0 width=650 height=100></td></tr>'
	strTop+='</table>'
	document.write(strTop);
}

function writeTop2Navigation(){
	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
	}

	strTop2= '<table align=center height="100" cellSpacing="0" cellPadding="0" width="340" background="images/top_banner_02.jpg" border="0">'
	strTop2+='<tr><td valign=bottom align=right></td></tr>'
	strTop2+='</table>'
	document.write(strTop2);
}

function writeTop3Navigation(){
	strNav='';
		strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aTopText.length;i++){
		strNav+='<img src="images/bullet_01.gif" width="10" height="10" align="absmiddle">&nbsp;<a class="toplink" href="'+aTopLink[i]+'">'+aTopText[i]+'</a>'+ strSpaces
	}

	strTop3= '<table align=center height="10" cellSpacing="0" cellPadding="0" width="470" border="0">'
	strTop3+='<tr><td class="toplink" valign="center" align="right">'+strNav+'</td></tr>'
	strTop3+='</table>'
	document.write(strTop3);
}

function writeTop4Navigation(){
	strNav='';
		strSpaces=''
	for(i=0;i<aTopText.length;i++){
		strNav+='<img src="images/bullet_01.gif" width="10" height="10" align="absmiddle">&nbsp;<a class="toplink" href="'+aTopLink[i]+'">'+aTopText[i]+'</a>'+ strSpaces
	}

	strTop4= '<table align=center height="10" cellSpacing="0" cellPadding="0" width="180" border="0">'
	strTop4+='<tr><td  class="toplink" valign="center" align="center">'+getToday()+'</td></tr>'
	strTop4+='</table>'
	document.write(strTop4);
}

function writeTop5Navigation(){

 document.write('<table align=center height=30 width=650 border=0 cellpadding=0 cellspacing=1 bgcolor=#C6D0EB>');
 document.write('<tr><td width=170 class="toplink" valign="center" align="center" bgcolor=#000000>'+getToday()+'</td>');
 document.write('<form method="get" name="form" action="http://search.atomz.com/search/">');
 document.write('<td valign=center align=right bgcolor=#8e3d10><input type="text" class="boxtext4" size="25" name="sp-q" style="filter:alpha(opacity=85)">');
 document.write('&nbsp;&nbsp;<input type="submit" value="Search" border="0" align="absmiddle" alt="Search">&nbsp;&nbsp;<input type="hidden" name="sp-a" value="sp10020dce"></td></tr>');
 document.write('</form>');
 document.write('</table>');
}

function writeTop6Navigation(){
	strNav='';
	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aTopText.length;i++){
		strNav+='<a class="Leftnav" href="'+aTop6Link[i]+'">'+aTop6Text[i]+'</a>'+ strSpaces
	}

	strTop6= '<table align=center height="10" cellSpacing="0" cellPadding="0" width="380" bgColor="#ffffff" border="0">'
	strTop6+='<tr><td>'+strNav+'</td></tr>'
	strTop6+='</table>'
	document.write(strTop6);
}

function writeLeftNavigation(){
	strNav='';
	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aLeftText.length;i++){
		strNav+='<a class="Leftnav" href="'+aLeftLink[i]+'">'+aLeftText[i]+'</a><br>'
	}

	strLeft= '<table align=center cellSpacing="1" cellPadding="0" width="159" bgColor="#B94E12" border="0">'
	strLeft+='<tr><td valign="top" align="left">'
	strLeft+= '<table align=center cellSpacing="0" cellPadding="3" width="158" bgColor="#ffffff" border="0">'
	strLeft+='<tr><td bgColor="#B94E12" valign="top" align="left"><a class="boxtext3">AutoWorldPrestige:</a></td></tr>'
	strLeft+='<tr><td valign="top" align="left">'+strNav+'</td></tr>'
	strLeft+='</table></td></tr>'
	strLeft+='</table>'
	strLeft+='<table height=5 cellpadding=0 cellspacing=0><tr><td></td></tr></table>'
	strLeft+='<center><script type="text/javascript" src="http://www.autoworldprestige.com/livehelp/livehelp_js.php?relative=Y&amp;department=1&amp;pingtimes=15"></script>'
	document.write(strLeft);
}

function writeLeft2Navigation(){
	strNav='';
	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aLeft2Text.length;i++){
		strNav+='<a class="Leftnav" href="'+aLeft2Link[i]+'">'+aLeft2Text[i]+'</a><br>'
	}

	strLeft2= '<table align=center cellSpacing="1" cellPadding="0" width="159" bgColor="#B94E12" border="0">'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left">'
	strLeft2+= '<table align=center cellSpacing="0" cellPadding="3" width="158" bgColor="#ffffff" border="0">'
	strLeft2+='<tr><td bgColor="#B94E12" class="Leftlink" valign="top" align="left"><a class="boxtext3">Vehicles:</a></td></tr>'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left">'+strNav+'</td></tr>'
	strLeft2+='</table></td></tr>'
	strLeft2+='</table>'
	strLeft2+='<table height=5 cellpadding=0 cellspacing=0><tr><td></td></tr></table>'
	strLeft2+= '<table align=center cellSpacing="1" cellPadding="0" width="159" bgColor="#B94E12" border="0">'
	strLeft2+='<tr><td valign="top" align="left">'
	strLeft2+='<table align=center cellSpacing="0" cellPadding="3" width="158" bgColor="#ffffff" border="0">'
	strLeft2+='<tr><td bgColor="#B94E12" class="Leftlink" valign="top" align="left"><a class="boxtext3">Finance:</a></td></tr>'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left">'
	strLeft2+='<a class="Leftnav" href="http://www.autoworldprestige.com/audi_finance_01.htm">Audi Finance</a><br>'
	strLeft2+='<a class="Leftnav" href="http://www.autoworldprestige.com/bmw_finance_01.htm">BMW Finance</a><br>'
	strLeft2+='<a class="Leftnav" href="http://www.autoworldprestige.com/rr_finance_01.htm">Range Rover Finance</a><br>'
	strLeft2+='<a class="Leftnav" href="http://www.autoworldprestige.com/other_finance_01.htm">Other Makes Finance</a><br>'
	strLeft2+='<a class="Leftnav" href="http://www.autoworldprestige.com/finance_01.htm">About Finance Options</a><br>'
	strLeft2+='</td></tr>'
	strLeft2+='</table></td></tr>'
	strLeft2+='</table>'
	strLeft2+='<table height=5 cellpadding=0 cellspacing=0><tr><td></td></tr></table>'
	strLeft2+='<table align=center cellSpacing="1" cellPadding="0" width="159" bgColor="#335466" border="0">'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left">'
	strLeft2+='<table align=center cellSpacing="0" cellPadding="3" width="158" bgColor="#ffffff" border="0">'
	strLeft2+='<tr><td bgColor="#335466" class="Leftlink" valign="top" align="left"><a class="boxtext3">Associate links:</a></td></tr>'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left" bgcolor=#ffffff><a class="Leftnav" href="http://www.findmyx5.com/">findmyX5 >></a><br>'
	strLeft2+='<a class="Leftnav" href="http://www.findmyrangerover.com/">findmyrangerover >></a><br>'
	strLeft2+='<a class="Leftnav" href="http://www.autoworlddiscount.com/">autoworlddiscount >></a><br>'
	strLeft2+='</td></tr>'
	strLeft2+='</table></td></tr>'
	strLeft2+='</table>'
	strLeft2+='<table height=5 cellpadding=0 cellspacing=0><tr><td></td></tr></table>'
	strLeft2+='<table align=center cellSpacing="1" cellPadding="0" width="159" bgColor="#335466" border="0">'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left">'
	strLeft2+='<table align=center cellSpacing="0" cellPadding="3" width="158" bgColor="#ffffff" border="0">'
	strLeft2+='<tr><td bgColor="#335466" class="Leftlink" valign="top" align="left"><a class="boxtext3">AWP Newsletter:</a></td></tr>'
	strLeft2+='<tr><td class="Leftlink" valign="top" align="left" bgcolor=#ffffff>'
	strLeft2+='<a class="Leftnav" href="http://autoworldprestige.com/newsletter/?p=subscribe">subscribe</a><br>'
	strLeft2+='<a class="Leftnav" href="http://autoworldprestige.com/newsletter/?p=unsubscribe">unsubscribe</a><br>'
	strLeft2+='<a class="Leftnav" href="http://autoworldprestige.com/newsletter/?p=preferences">preferences</a>'
	strLeft2+='</td></tr>'
	strLeft2+='</table></td></tr>'
	strLeft2+='</table>'
	document.write(strLeft2);
}

function writeLeft3Navigation(){
	strNav='';
	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aLeft2Text.length;i++){
		strNav+='<a class="Leftnav" href="'+aLeft2Link[i]+'">'+aLeft2Text[i]+'</a><br>'
	}

	strLeft3='<table align=center cellSpacing="0" cellPadding="0" width="160" border="0">'
	strLeft3+='<tr><td class="Leftlink" valign="top" align="left"><img src="images/si_logo_01.jpg" border=0 width=160 height=65></td></tr>'
	strLeft3+='</table>'
	document.write(strLeft3);
}

function getToday(){
	today = new Date();
	return weekdays[today.getDay()]+", "+months[today.getMonth()]+" "+today.getDate()+" "+today.getFullYear();
}

function writeBottomNavigation(){
	strNav='';
	strSpaces='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
	for(i=0;i<aBottomText.length;i++){
		strNav+='<a class="toplink" href="'+aTopLink[i]+'">'+aTopText[i]+'</a>'+ strSpaces
	}

	strBottom= '<table align=center height="80" cellSpacing="1" cellPadding="5" width="650" border="0" bgcolor=#C6D0EB>'
	strBottom+='<tr><td valign="center" align="center" width=160 class="toplink" bgcolor=#000000>'
	strBottom+='AutoWorld Prestige<br>t: 01932 232 500<br>f: 01932 242 008<br>e: <a class="toplink" href="mailto:sales@autoworldprestige.com">sales@<br>autoworldprestige.com</a>'
	strBottom+='</td><td class="toplink" valign="center" align="center" bgColor="#c56129" background="http://www.autoworldprestige.com/images/aston_bottom_01.jpg">'
	strBottom+='&nbsp;'
	strBottom+='</td><td width=170 class="toplink" valign="center" align=center bgcolor=#000000>'
	strBottom+='<a target="_new" href="http://www.3bweb.com"><img src="http://www.autoworldprestige.com/images/built_by_3b_01.jpg" width=46 height=42 border=0 align=right></a>logo & website designed by<br><a class="toplink" target="_new" href="http://www.3bweb.com/">3B Web Design</a>'
	strBottom+='</td></tr>'
	strBottom+='</table></td></tr></table>'
	strBottom+='<script>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");'
	strBottom+='document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));'
	strBottom+='try {'
	strBottom+='var pageTracker = _gat._getTracker("UA-766161-1");'
	strBottom+='pageTracker._trackPageview();'
	strBottom+='} catch(err) {}</script>'	
	document.write(strBottom);
}