function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
	if (val) { nm=args[i+1]; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+'.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+'.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function mmLoadMenus() {
  if (window.mm_menu_0512152426_0) return;
  window.mm_menu_0512152426_0 = new Menu("root",160,17,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#CC0000","#666666","left","middle",4,0,1000,-5,7,true,false,true,4,true,true);
  mm_menu_0512152426_0.addMenuItem("NB&nbsp;Technology","location='techcentre_technology.php'");
  mm_menu_0512152426_0.addMenuItem("Apparel&nbsp;Technologies","location='techcentre_apparel.php'");
  mm_menu_0512152426_0.addMenuItem("360&deg; Fit&nbsp;System","location='techcentre_360.php'");
  mm_menu_0512152426_0.addMenuItem("FAQ","location='techcentre_faq.php'");
  mm_menu_0512152426_0.addMenuItem("Sizing","location='techcentre_sizing.php'");
  mm_menu_0512152426_0.addMenuItem("NB&nbsp;Tech&nbsp;Centre","location='techcentre.php'");
  mm_menu_0512152426_0.addMenuItem("Understanding&nbsp;Fit","location='techcentre_understandingfit.php'");
  mm_menu_0512152426_0.addMenuItem("Getting&nbsp;Properly&nbsp;Fitted","location='techcentre_widthsize.php'");
  mm_menu_0512152426_0.addMenuItem("Technology&nbsp;that&nbsp;Fits","location='techcentre_tech_fits.php'");
  mm_menu_0512152426_0.addMenuItem("Caring&nbsp;for&nbsp;your&nbsp;NB's","location='techcentre_caring.php'");
  mm_menu_0512152426_0.addMenuItem("NB&nbsp;Fit&nbsp;Scanner","location='techcentre_fitscanner.php'");
  mm_menu_0512152426_0.addMenuItem("NB&nbsp;Factory&nbsp;Tour","location='techcentre_factory.php'");
   mm_menu_0512152426_0.fontWeight="bold";
   mm_menu_0512152426_0.hideOnMouseOut=true;
   mm_menu_0512152426_0.bgColor='#555555';
   mm_menu_0512152426_0.menuBorder=1;
   mm_menu_0512152426_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0512152426_0.menuBorderBgColor='#666666';

  if (window.mm_menu_0512152600_0) return;
  window.mm_menu_0512152600_0 = new Menu("root",130,17,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#CC0000","#666666","left","middle",4,0,1000,-5,7,true,false,true,4,true,true);
  mm_menu_0512152600_0.addMenuItem("Contact&nbsp;Us","location='contact.php'");
  mm_menu_0512152600_0.addMenuItem("About&nbsp;Us","location='about.php'");
  mm_menu_0512152600_0.addMenuItem("The&nbsp;NB&nbsp;Story","location='about_story.php'");
  mm_menu_0512152600_0.addMenuItem("Our&nbsp;Philosophies","location='about_philosophy.php'");
  mm_menu_0512152600_0.addMenuItem("Meet&nbsp;Team&nbsp;NB","location='about_team.php'");
  mm_menu_0512152600_0.addMenuItem("Media&nbsp;Centre","location='about_media.php'");
  mm_menu_0512152600_0.addMenuItem("Club&nbsp;NB","location='about_club.php'");
  mm_menu_0512152600_0.addMenuItem("Sponsorship","location='about_sponsorship.php'");
   mm_menu_0512152600_0.fontWeight="bold";
   mm_menu_0512152600_0.hideOnMouseOut=true;
   mm_menu_0512152600_0.bgColor='#555555';
   mm_menu_0512152600_0.menuBorder=1;
   mm_menu_0512152600_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0512152600_0.menuBorderBgColor='#666666';

  if (window.mm_menu_0512152900_0) return;
  window.mm_menu_0512152900_0 = new Menu("root",140,17,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#CC0000","#666666","left","middle",4,0,1000,-5,7,true,false,true,4,true,true);
  mm_menu_0512152900_0.addMenuItem("About&nbsp;Corporate","location='corporate_about.php'");
  mm_menu_0512152900_0.addMenuItem("Find&nbsp;Us","location='corporate_findus.php'");
  mm_menu_0512152900_0.addMenuItem("Create&nbsp;your&nbsp;own&nbsp;Style","location='corporate.php'");
  mm_menu_0512152900_0.addMenuItem("FAQ","location='corporate_faq.php'");
   mm_menu_0512152900_0.fontWeight="bold";
   mm_menu_0512152900_0.hideOnMouseOut=true;
   mm_menu_0512152900_0.bgColor='#555555';
   mm_menu_0512152900_0.menuBorder=1;
   mm_menu_0512152900_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0512152900_0.menuBorderBgColor='#666666';

  if (window.mm_menu_0512152700_0) return;
  window.mm_menu_0512152700_0 = new Menu("root",140,17,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#CC0000","#666666","left","middle",4,0,1000,-5,7,true,false,true,4,true,true);
  mm_menu_0512152700_0.addMenuItem("NB&nbsp;Sport&nbsp;Associates","location='associates_sport.php'");
  mm_menu_0512152700_0.addMenuItem("Global&nbsp;Sites","location='associates_global.php'");
  mm_menu_0512152700_0.addMenuItem("NB&nbsp;Athletic&nbsp;Clubs","location='associates_clubs.php'");
  mm_menu_0512152700_0.addMenuItem("NB&nbsp;Retailers","location='associates_retail_main.php'");
  mm_menu_0512152700_0.addMenuItem("NB&nbsp;Outlet&nbsp;Stores","location='associates_outlet.php'");
   mm_menu_0512152700_0.fontWeight="bold";
   mm_menu_0512152700_0.hideOnMouseOut=true;
   mm_menu_0512152700_0.bgColor='#555555';
   mm_menu_0512152700_0.menuBorder=1;
   mm_menu_0512152700_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0512152700_0.menuBorderBgColor='#666666';

  if (window.mm_menu_0512152800_0) return;
  window.mm_menu_0512152800_0 = new Menu("root",140,17,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#CC0000","#666666","left","middle",4,0,1000,-5,7,true,false,true,4,true,true);
  mm_menu_0512152800_0.addMenuItem("Events","location='events.php'");
  mm_menu_0512152800_0.addMenuItem("Events&nbsp;Calendar","location='events_latest.php'");
   mm_menu_0512152800_0.fontWeight="bold";
   mm_menu_0512152800_0.hideOnMouseOut=true;
   mm_menu_0512152800_0.bgColor='#555555';
   mm_menu_0512152800_0.menuBorder=1;
   mm_menu_0512152800_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0512152800_0.menuBorderBgColor='#666666';

mm_menu_0512152800_0.writeMenus();
}





function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
	
	
	
	function getCity(strURL) {		
		
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('citydiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}