// JavaScript Document
var urL='http://www.villagemotors.com.au/';
function mmLoadMenus() {

		

	if (window.mm_menu_1) return;

	

	

	window.mm_menu_1_1 = new Menu("About&nbsp;Us",150,25,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#FFFFFF","#e5e6e7","#697587","left","middle",5,0,100,-260,0,true,true,true,0,true,true);

	mm_menu_1_1.addMenuItem("Stay&nbsp;in&nbsp;Touch","location.href='"+urL+"vip_club.html'");

	mm_menu_1_1.addMenuItem("Fleet&nbsp;Sales","location.href='"+urL+"fleet_sales.html'");

	mm_menu_1_1.addMenuItem("Village&nbsp;Special&nbsp;Vehicles","location.href='"+urL+"village_special.html'");

	mm_menu_1_1.addMenuItem("Kids&nbsp;Club","location.href='"+urL+"vip_club.html'");
	
	mm_menu_1_1.addMenuItem("In&nbsp;the&nbsp;Community","location.href='"+urL+"in_the_community.html'");

	mm_menu_1_1.hideOnMouseOut=true;

	mm_menu_1_1.menuBorder=0;

	mm_menu_1_1.menuLiteBgColor='#ffffff';

	mm_menu_1_1.menuBorderBgColor='';

	mm_menu_1_1.bgColor='#cbcdcf';

	//alert(window.mm_menu_1_1);



	window.mm_menu_1_2 = new Menu("New&nbsp;Vehicles",158,25,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#FFFFFF","#e5e6e7","#697587","left","middle",5,0,100,-260,0,true,true,true,0,true,true);

	mm_menu_1_2.addMenuItem("Holden","location.href='"+urL+"new_vehicles.html'");

	mm_menu_1_2.addMenuItem("Nissan","location.href='"+urL+"nissan_new_vehicles.html'");

	mm_menu_1_2.addMenuItem("Fleet&nbsp;Sales","location.href='"+urL+"fleet_sales.html'");

	mm_menu_1_2.addMenuItem("Village&nbsp;Special&nbsp;Vehicles","location.href='"+urL+"village_special.html'");

	mm_menu_1_2.hideOnMouseOut=true;

	mm_menu_1_2.menuBorder=0;

	mm_menu_1_2.menuLiteBgColor='#ffffff';

	mm_menu_1_2.menuBorderBgColor='';

	mm_menu_1_2.bgColor='#cbcdcf';



	window.mm_menu_1_3 = new Menu("Contact Us",122,25,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#FFFFFF","#e5e6e7","#697587","left","middle",5,0,100,-260,0,true,true,true,0,true,true);

	mm_menu_1_3.addMenuItem("Careers","location.href='"+urL+"contact.html#careers'");

	mm_menu_1_3.hideOnMouseOut=true;

	mm_menu_1_3.menuBorder=0;

	mm_menu_1_3.menuLiteBgColor='#ffffff';

	mm_menu_1_3.menuBorderBgColor='';

	mm_menu_1_3.bgColor='#cbcdcf';	

	

	window.mm_menu_1_4 = new Menu("News",115,25,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#FFFFFF","#e5e6e7","#697587","left","middle",5,0,100,-260,0,true,true,true,0,true,true);

	mm_menu_1_4.addMenuItem("Facebook&nbsp;Updates","location.href='"+urL+"fbupdates.php'");

	mm_menu_1_4.hideOnMouseOut=true;

	mm_menu_1_4.menuBorder=0;

	mm_menu_1_4.menuLiteBgColor='#ffffff';

	mm_menu_1_4.menuBorderBgColor='';

	mm_menu_1_4.bgColor='#cbcdcf';

	//alert(window.mm_menu_1_3);



	window.mm_menu_1_5 = new Menu("Staff",156,25,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#FFFFFF","#e5e6e7","#697587","left","middle",3,0,100,-260,0,true,true,true,0,true,true);	

	mm_menu_1_5.addMenuItem("Service&nbsp;specials", "location.href='"+urL+"service.php'");

	mm_menu_1_5.hideOnMouseOut=true;

	mm_menu_1_5.menuBorder=0;

	mm_menu_1_5.menuLiteBgColor='#ffffff';

	mm_menu_1_5.menuBorderBgColor='';

	mm_menu_1_5.bgColor='#cbcdcf';

	

	window.mm_menu_1 = new Menu("root",161,20,"Verdana, Arial, Helvetica, sans-serif",14,"#990000","#ece9d8","#cccccc","#000084","left","middle",3,0,1000,-260,0,true,true,false,0,true,true);

	mm_menu_1.addMenuItem(mm_menu_1_1);		

	mm_menu_1.hideOnMouseOut=true;

	mm_menu_1.childMenuIcon="arrows.gif";

	mm_menu_1.menuBorder=1;

	mm_menu_1.menuLiteBgColor='#ffffff';

	mm_menu_1.menuBorderBgColor='#555555';

	mm_menu_1.bgColor='#555555';

	mm_menu_1.writeMenus();

}

var x_pos=200;

function checkBrowser(){

	this.ver=navigator.appVersion;

	this.dom=document.getElementById?1:0;

	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;

	this.ie4=(document.all && !this.dom)?1:0;

	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

	this.ns4=(document.layers && !this.dom)?1:0;

	this.opera=!(this.ie5 || this.ie4 || this.ns4 || this.ns5) && this.dom;

	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);

	return this;

}

/*function reloadmenu(){	



	var bw=new checkBrowser()

	var temp_x=(bw.ns4 || bw.ns5)?innerWidth:document.body.clientWidth;	

	//alert(temp_x);

		if(temp_x>800)

		x_pos=(temp_x-620);		

	else

		x_pos=157;

	x_pos1=x_pos+155;

	x_pos2=x_pos1+155;

	x_pos3=x_pos2+155+155;

	x_pos4=x_pos2+155;

}

*/

function reloadmenu(){	



	var bw=new checkBrowser()

	var temp_x=(bw.ns4 || bw.ns5)?innerWidth:document.body.clientWidth;	

	///alert(temp_x);

	if(bw.ns4 || bw.ns5){

	

		if(temp_x>800){

			x_pos=(((temp_x/2)-166)+153);

		}

		else

			x_pos=600;

	}

	else{

		if(temp_x>800){

			x_pos=(((temp_x/2)-387)+205);

			//alert(x_pos);

		}

		else

			x_pos=500;

	}

	x_pos1=x_pos+177;

	x_pos2=x_pos1+159;

	x_pos3=x_pos2+86+86;

	x_pos4=x_pos2+86;

	

	

}

window.onresize=reloadmenu;
