<!--
 var sizeArray = null;
 var widthArray = null;
 var widthValuesArray = null;
 var a_size = null;
 var a_vals = null;
 
 var choice, x, ct;
 
 //Shoe sizes
 var women = new Array("5","5.5","6","6.5","7","7.5","8","8.5","9","9.5","10","10.5","11","11.5","12","13","14");
 var men = new Array("4", "5","5.5","6","6.5","7","7.5","8","8.5","9","9.5","10","10.5","11","11.5","12","12.5","13","14","15","16","17","18","19","20");
 var kids = new Array("0", "1", "2", "3", "4", "5", "5.5", "6", "6.5", "7", "7.5", "8", "8.5", "9", "9.5", "10", "", "10.5","11","11.5","12","12.5","13","13.5","1","1.5","2","2.5","3","","3.5","4","4.5","5","5.5","6","6.5", "7");
 


 //Shoe Widths
 var wwidth = new Array("2A (Narrow)","B (Standard)","D (Wide)","2E (X-Wide)", "4E (XX-Wide)");
 var wwidthValues = new Array("2A","B","D","2E", "4E")
 var mwidth = new Array("2A (X-Narrow)","B (Narrow)","D (Standard)","2E (Wide)","4E (X-Wide)","6E (XX-Wide)");
 var mwidthValues = new Array("2A","B","D","2E","4E","6E");
 var kwidth = new Array("Medium","Wide","X-Wide");
 var kwidthValues = new Array("M","W","XW");
 
 //Apparel sizes
 var wapparel = new Array("XS","Small","Medium","Large","XL","2XL");
 var wapparelVals = new Array("XS","S","M","L","XL","2XL");
 var mapparel = new Array("Small","Medium","Large","XL","2XL","3XL", "4XL");
 var mapparelVals = new Array("S","M","L","XL","2XL","3XL", "4XL");
   

 //Display contents inside of Shoe Size and Shoe Width drop down box
 function loadShoes()
 {
	var x, j;
	var kVal;
	var tmpStr, c1;

	kVal = "";
	
	x = document.shoefinder.shoeGender.value;
	if(x == null)									//the above line doesn't work on all browsers
	{
		for(j=0; j < document.shoefinder.shoeGender.options.length; j++)
		{
			if(document.shoefinder.shoeGender.options[j].selected == true)
			{
				x = document.shoefinder.shoeGender.options[j].value;
				break;
			}
		}
	}
	
	switch(x)
	{
		case "M" :
			sizeArray = men;
			widthArray = mwidth;
			widthValuesArray = mwidthValues;		
			document.shoefinder.Size.disabled = false;
			document.shoefinder.width.disabled = false;
			break;
		case "W" :
			sizeArray = women;
			widthArray = wwidth;
			widthValuesArray = wwidthValues;
			document.shoefinder.Size.disabled = false;
			document.shoefinder.width.disabled = false;
			break;			
		case "K" :
			sizeArray = kids;
			widthArray = kwidth;
			widthValuesArray = kwidthValues;
			document.shoefinder.Size.disabled = false;
			document.shoefinder.width.disabled = false;
			kVal = "yes";
			break;
		default :		//Invalid value
			//Make sure controls are disabled
			document.shoefinder.Size.disabled = true;
			document.shoefinder.width.disabled = true;
	
			return;		//exit function
			break;
	}

	//Fill Size List box ------------
	ct = document.shoefinder.Size;	
	for (x=0; x < ct.options.length; x++)
		ct.options[1] = null;		

	if(kVal == "yes")
	{
		for (x=0; x < sizeArray.length; x++)
		{
			tmpStr = '  ';
			if(sizeArray[x].length < 4)
			{
				tmpStr = tmpStr + '  ';
				if(sizeArray[x].length != 3)
					tmpStr = ' ' + tmpStr;
				if(sizeArray[x].length == 1)
					tmpStr = ' ' + tmpStr;
			}
			kVal = '';
			if(x < 29)
				if(x < 16)
				{
					tmpStr = tmpStr + ' Infant';
					kVal = 'i';
				}
				else
				{
					tmpStr = tmpStr + ' Pre-School';
					kVal = 'p';
				}
			else
			{
				tmpStr = tmpStr + ' Grade School';
				kVal = 'g';
			}
			if(sizeArray[x] == "")
				ct.options[x + 1] = new Option('================', '');
			else
				ct.options[x + 1] = new Option(sizeArray[x] + tmpStr, kVal + sizeArray[x]);
		}
	} else
	{
		for (x=0; x < sizeArray.length; x++)
			ct.options[x + 1] = new Option(sizeArray[x], sizeArray[x]);
	}
	
	//Fill Width List box ----------
	ct = document.shoefinder.width;
	for (x=0; x < ct.options.length; x++)
		ct.options[1] = null;
	for (x=0; x < widthArray.length; x++)
		ct.options[x + 1] = new Option(widthArray[x], widthValuesArray[x]);
 }
 
 //Display contents inside of Apparel Size drop down box
 function loadApparel()
 {	
 	var x, j;
	
	x = document.shoefinder.apparelGender.value;
	if(x == null)									//the above line doesn't work on all browsers
	{
		for(j=0; j < document.shoefinder.apparelGender.options.length; j++)
		{
			if(document.shoefinder.apparelGender.options[j].selected == true)
			{
				x = document.shoefinder.apparelGender.options[j].value;
				break;
			}
		}
	}
	
	switch(x)
	{
		case "M" :
			a_size = mapparel;
			a_vals = mapparelVals;
			document.shoefinder.appwidth.disabled = false;
			break;
		case "W" :
			a_size = wapparel;
			a_vals = wapparelVals;
			document.shoefinder.appwidth.disabled = false;
			break;
		default :		//Invalid choice
			//Disabled app width and return from function
			document.shoefinder.appwidth.disabled = true;
			return;
			break;
	}

	//Load apparel sizes into the appral size drop down
	ct = document.shoefinder.appwidth;
	for(x=0; x < ct.options.length; x++)
		ct.options[1] = null;
	for(x=0; x < a_size.length; x++)
		ct.options[x + 1] = new Option(a_size[x], a_vals[x]);	
 }
 
	
//Called to submit page to appropriate URL (determined by criteria)
function verifyForm(arg)
{
	var formURL, ct, x, j;
	
	if(arg == "shoes")
		ct = document.shoefinder.shoeGender;
	else
		ct = document.shoefinder.apparelGender;
	
	x = ct.value;
	if(x == null)
	{
		for(j=0; j < ct.options.length; j++)
			if(ct.options[j].selected == true)
			{
				x = ct.options[j].value;
				break;
			}
	}
	
	switch(x)
	{
		case "M":
			formURL = "cat_mens_";
			break;
		case "W":
			formURL = "cat_womens_";
			break;
		case "K":
			//Make sure not Kids Apparel....this should never happen, but just incase
			if(arg == "apparel")
				return;
				
			formURL = "cat_kid_";
			break;
		default :
			return;
			break;
	}
	

	if(arg == "shoes")
		formURL = formURL + "shoes.htm";
	else
	{
		formURL = formURL + "apparel.htm";
		
	 	//For compatibility with the rest of the site, the apparel size value needs to
		//be submitted using the "width" control. Set value into the shoe width value 
		//(since there can only be 1 width control)
		ct = document.shoefinder.width;

		ct.disabled = false;				//must first enable control
		
		//also change shoe gender to option[0]
		document.shoefinder.shoeGender.options[0].selected = true;
				
		ct.options[ct.options.length] = new Option("tmp", document.shoefinder.appwidth.value);
		ct.options[ct.options.length - 1].selected = true;
		ct.value = document.shoefinder.appwidth.value;

		//In Netsacpe 4.75 the above code doesn't seem to work, but the below does.
		if(ct.value == null)
		{
			for(j=0; j<document.shoefinder.appwidth.length; j++)
			{
				if(document.shoefinder.appwidth[j].selected == true)
				{
					ct.options[1] = new Option("tmp2", document.shoefinder.appwidth[j].value);
					ct.options[1].selected = true;
					ct.value = ct.options[1].value;	
					break;
				}
			}			
		}		
	}
	
	//Need to change the default action and method of form
	formURL = "http://www.joesnewbalanceoutlet.com/" + formURL;
	
	document.shoefinder.method = "POST";
	document.shoefinder.action = formURL;
	document.shoefinder.submit();	
}

	function getAlternteCounters(whichCounter)
	{
		var alt_hours, alt_minutes, alt_seconds, alt_tmpTime;
		alt_hours = Math.floor(secondsDiff / 60 / 60);
		alt_tmpTime = secondsDiff - (alt_hours * 60 * 60);
		alt_minutes = Math.floor(alt_tmpTime / 60);
		alt_seconds = Math.floor(alt_tmpTime - (alt_minutes * 60));
		switch(whichCounter)
		{
			case 'hours': return(alt_hours);
					break;
			case 'minutes': return(alt_minutes);
					break;
			case 'seconds': return(alt_seconds);
					break;
		}
	}
	
	function getClockTime() {
		now = new Date();
		later = new Date("July 29 2008 15:00:00");
		later = new Date(later.getTime() - timeDiff);

		secondsDiff = secondsDiff - 1;
		if(secondsDiff < 0)
			secondsDiff = 0;

		hours = (later - now) / 1000 / 60 / 60
		hoursRound = Math.floor(hours);
		if(hoursRound < 0 || hoursRound > 99)
		{
			/* code for Safari...other browsers that have issues with getTime ???? */
			hoursRound = getAlternteCounters('hours');
		}
		if(hoursRound < 0)
			hoursRound = 0;
		minutes = (later - now) / 1000 /60 - (60 * hoursRound);
		minutesRound = Math.floor(minutes);
		if(minutesRound < 0 || minutesRound > 99)
		{
			/* code for Safari...other browsers that have issues with getTime ???? */
			minutesRound = getAlternteCounters('minutes');
		}
		if(minutesRound < 0)
			minutesRound = 0;
		seconds = (later - now) / 1000 - (60 * 60 * hoursRound) - (60 * minutesRound);
		secondsRound = Math.round(seconds);
		if(secondsRound < 0 || secondsRound > 99)
		{
			/* code for Safari...other browsers that have issues with getTime ???? */
			secondsRound = getAlternteCounters('seconds');
		}
		if(secondsRound < 0)
			secondsRound = 0;

		if (secondsRound <= 9) {
			document.images.g.src = '/images/promo_flair/clock/0c.gif';
			document.images.h.src = '/images/promo_flair/clock/' + secondsRound + 'c.gif';
		}
		else {
			document.images.g.src = '/images/promo_flair/clock/' + Math.floor(secondsRound/10) + 'c.gif';
			document.images.h.src = '/images/promo_flair/clock/' + (secondsRound%10) + 'c.gif';
		}
		if (minutesRound <= 9) {
			document.images.d.src = '/images/promo_flair/clock/0c.gif';
			document.images.e.src = '/images/promo_flair/clock/' + minutesRound + 'c.gif';
		}
		else {
			document.images.d.src = '/images/promo_flair/clock/' + Math.floor(minutesRound/10) + 'c.gif';
			document.images.e.src = '/images/promo_flair/clock/' + (minutesRound%10) + 'c.gif';
		}
		if (hoursRound <= 9) {
			document.images.y.src = '/images/promo_flair/clock/0c.gif';
			document.images.z.src = '/images/promo_flair/clock/' + hoursRound + 'c.gif';
		}
		else {
			document.images.y.src = '/images/promo_flair/clock/' + Math.floor(hoursRound /10) + 'c.gif';
			document.images.z.src = '/images/promo_flair/clock/' + (hoursRound %10) + 'c.gif';
		}
		newtime = window.setTimeout("getClockTime();", 1000);
	}
//-->