﻿
	function popNBAS() {
	popNBASWin = window.open('/information/popup/popup_nbas.asp', 'nbas', 'width=475, height=225, resizable=no, scrollbars=no, left=50, top=50')
	}
	
	function popFLOM() {
	popNBASWin = window.open('/information/popup/popup_nbas_main.asp', 'nbas', 'width=400, height=500, resizable=no, scrollbars=no, left=50, top=50')
	}
		
	function promo()
	{
		window.open('/SiteLanding/promo_pop_060109.asp', 'PromoDetails', 'width=500, height=370, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
	}

	function promoflash()
	{
		window.open('/SiteLanding/promo_pop_051209.asp', 'PromoDetails', 'width=600, height=350, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
	}
	
	function promoExtra()
	{
		if(promoSize == 'large')
		{
			window.open('/SiteLanding/promo_pop_122608.asp', 'PromoDetails2', 'width=520, height=450, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
		}
		else if(promoSize == 'xlarge')
		{
			window.open('/SiteLanding/promo_pop_110608.asp', 'PromoDetails2', 'width=570, height=625, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
		}
		else if(promoSize == 'alt')
		{
			window.open('/SiteLanding/promo_pop_120709.asp', 'PromoDetails2', 'width=520, height=400, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
		}
		else{
			window.open('/SiteLanding/promo_pop_111808.asp', 'PromoDetails2', 'width=520, height=400, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
		}
	}

	function promoExtraPants()
	{
		/* Buy 1 get 1 25% off --- Pants */
		window.open('/SiteLanding/promo_pop_121307A.asp', 'PromoDetailsPants', 'width=500, height=300, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
	}

	function promoExtraTops()
	{
		/* Used for Free Laces with any Lace Up item - 2/2/09 */
		window.open('/sitelanding/promo_pop_020209laceup.asp', 'PromoDetailsTop', 'width=500, height=300, resizable=yes, scrollbars=yes, left=100, top=100, status=no, menubar=no, toolbar=no');
	}
	
	function ImproveOurSite()
	{
		window.open('http://www.nbwebexpress.com/improve_our_site.asp','ImproveOurSite', 'width=540,height=295,scrollbars=yes,left=60,top=60');
	}

	function holidayGiftBanner_PreLoad()
	{
		imgA = new Image();
		imgA.src = '/images/salsa/holiday07/giftpage_banner_A.gif';
		imgA2 = new Image();
		imgA2.src = '/images/salsa/holiday07/giftpage_banner_A_over.gif';
		imgB = new Image();
		imgB.src = '/images/salsa/holiday07/giftpage_banner_B.gif';
		imgB2 = new Image();
		imgB2.src = '/images/salsa/holiday07/giftpage_banner_B_over.gif';

		imgC = new Image();
		imgC.src = '/images/salsa/holiday07/holiday_gift_tagline.gif';
		imgC2 = new Image();
		imgC2.src = '/images/salsa/holiday07/holiday_gift_tagline_lit.gif';
	}
	
	function holidayGiftBanner(newImage)
	{
		var t1;
		for(t1 = 0; t1 < document.images.length; t1++)
		{
			if(document.images[t1].name == 'giftBanner')
			{
				document.images[t1].src = '/images/salsa/holiday07/' + newImage + '.gif';
				break;
			}
		}
	}

	function holidayGiftTagline(newImage)
	{
		var t1;
		for(t1 = 0; t1 < document.images.length; t1++)
		{
			if(document.images[t1].name == 'giftTagLine')
			{
				document.images[t1].src = '/images/salsa/holiday07/' + newImage + '.gif';
				break;
			}
		}
	}

	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();
	/* changed to use global variable tickerEndTime for easy updating
	 *	later = new Date("August 22 2008 23:00:00");
	 */
		later = tickerEndTime;
		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/salsa/clock/0c.gif';
			document.images.h.src = '/images/salsa/clock/' + secondsRound + 'c.gif';
		}
		else {
			document.images.g.src = '/images/salsa/clock/' + Math.floor(secondsRound/10) + 'c.gif';
			document.images.h.src = '/images/salsa/clock/' + (secondsRound%10) + 'c.gif';
		}
		if (minutesRound <= 9) {
			document.images.d.src = '/images/salsa/clock/0c.gif';
			document.images.e.src = '/images/salsa/clock/' + minutesRound + 'c.gif';
		}
		else {
			document.images.d.src = '/images/salsa/clock/' + Math.floor(minutesRound/10) + 'c.gif';
			document.images.e.src = '/images/salsa/clock/' + (minutesRound%10) + 'c.gif';
		}
		if (hoursRound <= 9) {
			document.images.y.src = '/images/salsa/clock/0c.gif';
			document.images.z.src = '/images/salsa/clock/' + hoursRound + 'c.gif';
		}
		else {
			document.images.y.src = '/images/salsa/clock/' + Math.floor(hoursRound /10) + 'c.gif';
			document.images.z.src = '/images/salsa/clock/' + (hoursRound %10) + 'c.gif';
		}
		newtime = window.setTimeout("getClockTime();", 1000);
	}
	
	function goText() {
		window.open("/includes/captcha/image_verification.htm", "ImageText","width=400,height=300,toolbar=0,menubar=0,scrollbars=0,resizable=0"); 
	}
