<!--

/*
  This JavaScript code, and all associated software and file structures, calling or called 
  by this code, are copyrighted material, and may not be copied or duplicated in any manner 
  whatsoever without prior written authorization.  All applicable trademarks, registrations, 
  & copyrights are property of Phil Astrella, Registry Enterprises.
*/


if (getPageName() == "specialoffers")
  { 
    document.write("<script language='JavaScript' src='script/proddata.js'></script>"
		 + "<script language='JavaScript' src='script/popwin1.js'></script>")
  }



function getSpecialsDate(gsDays)
  {
    var gsNow	= new Date();
    var gsMonth	= Math.abs(gsNow.getMonth()+1);
	gsMonth	= (gsMonth < 10) ? "0"+gsMonth : ""+gsMonth ;
    var gsDate	= gsNow.getDate();
	gsDate	= (gsDate < 10)  ? "0"+gsDate  : ""+gsDate ;
    var gsYear	= gsNow.getYear();
        gsYear	= (gsYear < 1900) ? ""+Math.abs(gsYear+1900) : ""+gsYear ;
    var gsNew	= gsMonth+"/"+gsDate+"/"+gsYear;
    if ((gsDays) && (!isNaN(gsDays)) && (gsDays != 0))
      {
	gsNow	= new Date(gsNow.getTime()+(gsDays*86400*1000));
	gsMonth	= Math.abs(gsNow.getMonth()+1);
	gsMonth	= (gsMonth < 10) ? "0"+gsMonth : ""+gsMonth ;
	gsDate	= gsNow.getDate();
	gsDate	= (gsDate < 10)  ? "0"+gsDate  : ""+gsDate ;
	gsYear	= gsNow.getYear();
        gsYear	= (gsYear < 1900) ? ""+Math.abs(gsYear+1900) : ""+gsYear ;
	gsNew	= gsMonth+"/"+gsDate+"/"+gsYear;
      }
    return gsNew
  }



specialsData = new Array(

    // start date (mm/dd/yyyy) :: end date (mm/dd/yyyy) :: group :: product :: flag
    // :: buy (prod group) :: buy (prod name) :: buy (size) :: buy (pre-text) :: buy (post-text)
    // :: get (prod group) :: get (prod name) :: get (size) :: get (pre-text) :: get (post-text)
    // (product names must be spelled out exactly)



    // Perpetual/Floating Specials:


      // disabled per Viki email 1/10/07
      // re-enabled by Viki phone call 7/30/07
      // disabled per Mia email 9/2/07
      // re-enabled per Mia email 1/3/08

      /*
	""+getSpecialsDate(-12)+"::"+getSpecialsDate(2)+":: :: :: "
	  + ":: :: :: ::Buy 4 or more::of any one Sedona Spa product (except Gift Certificates)"
	  + ":: :: :: ::get one more of that same item automatically included with your order,::FREE!",
      */

      /*

	"03/01/2009::06/30/2010:: :: :: "
	  + ":: :: :: ::Buy 4 or more::of any one Sedona Spa product (except Gift Certificates)"
	  + ":: :: :: ::get one more of that same item automatically included with your order,::FREE!",

      */


    // Date-Specific Specials (see specials1.hist [plain text] for specials history):


      /*
	"09/07/2008::09/14/2008:: :: :: "
	  + ":: :: :: ::Now&#146;s the time to stock up!&nbsp; Buy any of our exquisite :: Sedona Spa products"
	  + ":: :: :: ::and  we&#146;ll  include standard shipping :: <b>FREE!</b> <hr size=1 color=silver>"
	    + "Faster shipping options (3-day, 2-day &amp; overnight) are still available at additional cost, if needed "
	    +"(see <a target='_blank' href='shipping.html' style='color:#0048ff' title='Go to the Shipping page'>shipping</a> page).",
      */

      /*
	"11/28/2008::12/31/2008:: :: :: "
	  + ":: :: :: ::On orders of $25 or more (excluding taxes &amp; shipping), "
	    + "::we&#146;ll include one Firming Anti-Wrinkle Eye Cream (retail value $48.95), absolutely FREE"
	  + ":: :: :: ::and on orders of $50 or more (excluding taxes &amp; shipping), "
	    + "we&#146;ll also include one Nighttime Refining Moisturizer (retail value $34.95),::absolutely FREE!",
      */

      /*
	"02/04/2009::06/30/2010:: :: :: "
	  + ":: :: :: ::One of Sedona Spa&#146;s most requested products is our Mountain Moisture Conditioner with Jojoba Oil, Cactus and Desert Flower Extracts, plus Vitamin E. "
	    + ":: As a token of our sincere appreciation"
	  + ":: :: :: :: we will include with each and every order one 5 oz. tube of this wonderful hair conditioner "
	    + ":: absolutely FREE, as our way of saying thank you!!",
      */

	"06/01/2010::09/30/2010:: :: :: "
	  + ":: :: :: ::As a thank you gift, "
	    + ":: with each and every order"
	  + ":: :: :: :: Sedona Spa will include FREE one 2 oz. &quot;Next Generation&quot; Nighttime Refining Moisturizer with our patent pending combination of pro-enzyme ingredients that defend against the signs of skin-aging. "
	    + ":: This high performance nighttime treatment also boasts Saguaro Flower Extract, Japanese Green Tea and Shea Butter to energize and condition skin.",


      /* proposed but not used - implemented banners instead
	"11/23/2009::12/06/2009:: :: :: "
	  + ":: :: :: ::Free Shipping Offer from Sedona Spa! "
	    + ":: As a way of saying thank you, and to recognize your ongoing loyalty to the Sedona Spa brand"
	  + ":: :: :: :: we are offering FREE SHIPPING on all product orders over $100 (excluding taxes and shipping). "
	    + ":: You can place your order here on our site, or by calling Customer Service at 800-RED-ROCK (800-733-7625).",
      */


    // start date (mm/dd/yyyy) :: end date (mm/dd/yyyy) :: group :: product :: flag
    // :: buy (prod group) :: buy (prod name) :: buy (size) :: buy (pre-text) :: buy (post-text)
    // :: get (prod group) :: get (prod name) :: get (size) :: get (pre-text) :: get (post-text)
    // (product names must be spelled out exactly)

	"");


scAlertFlag = 0;  // for testing shop cart data manipulation


function resetShopCartData()
  {
    var rscCookieName	= getFormPage();
    var rscCookieValue	= getCookie(rscCookieName);

    if (scAlertFlag)
      { alert("RESET:\n\nrscCookieName = "+rscCookieName+"\n\nrscCookieValue = "+rscCookieValue+"\n\n") };

    if ((rscCookieValue) && (rscCookieValue.length > 0))
      {
	var rscName 	= rscCookieValue.split("::")[0];
	var rscIndex 	= Math.abs(rscCookieValue.split("::")[1]);
	var rscValue 	= rscCookieValue.split("::")[2];

	if (scAlertFlag)
	  { 
	    alert("RESETTING from cookies:\n\nCookie name: "+rscCookieName+"\n\n"
		+ "rscName = "+rscName+"\n\nrscIndex = "+rscIndex+"\n\nrscValue = "+rscValue+"\n\n") 
	  }

	if (inputItemType == "select")
	  {
	    document.forms[rscName].item.options[rscIndex].value = rscValue
	  } else
	  {
	    document.forms[rscName].item.value = rscValue
	  }
	deleteCookie(rscCookieName);

	if (scAlertFlag) { alert("DELETED cookie:  name = "+rscCookieName+"\n\n") };

      }
  }

function checkShopCartData(cscFormName)
  {
    var cscCutoff	= "05/11/2008";  // cutoff date limit for execution of this code

    var cscCutoffDate	= new Date(cscCutoff+" 23:59:59");
    var cscCutoffMS	= cscCutoffDate.getTime();

    var cscNow		= new Date();
    var cscNowMS	= cscNow.getTime();

    if (cscNowMS > cscCutoffMS)
      {
	if (scAlertFlag)
	  { 
	    alert("Cutoff date ("+cscCutoff+") has elapsed.\n"
		+ "Shopping cart data adjustment (based on applicable specials) bypassed.\n"
		+ "file / function:  specials1.js / checkShopCartData()\n") 
	  }
	return null
      }

    resetShopCartData();

    var fRec, fProd, fPrice, fQty, fDesc, fSize, fIndex, 
	fValue1=document.forms[cscFormName].item.value, fValue2, 
	cscRec, cscStart, cscStartDate, cscStartMS, cscStop, cscStopDate, cscStopMS, cscDesc, cscSize, cscPrice, cscTotal, 
	cscCookieName=getFormPage(), cscCookieValue, cscCookieLife=0.5 ;

    fRec	= fValue1.split("^");
    fProd	= fRec[2];
    fDesc	= compressString(fProd.substring(0,fProd.indexOf(" [")));
    fSize	= compressString(fProd.substring(fProd.indexOf(" [")+2,fProd.indexOf("] ")));
    fPrice	= fRec[3];
    fQty	= fRec[4];
    fQty	= Math.abs(document.forms[cscFormName][fQty].value);

    if (scAlertFlag)
      { alert("CURRENT Form Data:\n\n"+cscFormName+"\n\n"+fValue1+"\n\n"+fProd+"\n"+fPrice+"\n"+fQty+"\n\n"+fDesc+"\n"+fSize+"\n\n") };

    for (sx = 0 ; sx < specialsData.length ; sx++)
      {
	if (specialsData[sx].indexOf("::") == -1) { continue };
	cscRec		= specialsData[sx].split("::");
	cscStart	= cscRec[0];
	cscStop		= cscRec[1];
	cscDesc		= compressString(cscRec[6]);
	cscSize		= compressString(cscRec[7]);

	cscStartDate	= new Date(cscStart+" 00:00:01");
	cscStopDate	= new Date(cscStop+" 23:59:59");
	cscStartMS	= cscStartDate.getTime();
	cscStopMS	= cscStopDate.getTime();

	if ((cscStartMS > cscNowMS) || (cscStopMS < cscNowMS)) { continue };

	// BEGIN SHOP CART CHECK CODE


	if (fDesc.lastIndexOf("Basket") == (fDesc.length-6))  // item is a gift basket
	  {
		cscPrice = discountPrice(fPrice,30);

		fValue2	= fRec[0]	+ "^"
			+ fRec[1]	+ "^"
			+ fRec[2]	+ "^"
			+ cscPrice	+ "^"
			+ fRec[4]	+ "^"
			+ fRec[5]	+ "^"
			+ fRec[6]	+ "^"
			+ fRec[7]	+ "^"
			+ fRec[8]	+ "^"
			+ fRec[9]	;

		if (inputItemType == "select")
		  {
		    fIndex = document.forms[cscFormName].item.options.selectedIndex; 
		    document.forms[cscFormName].item.options[fIndex].value = fValue2
		  } else
		  {
		    fIndex = 0;
		    document.forms[cscFormName].item.value = fValue2
		  }

		cscCookieValue = cscFormName+"::"+fIndex+"::"+fValue1;

		setCookie(cscCookieName,cscCookieValue,cscCookieLife);

		if (scAlertFlag)
		  { 
		    alert("COOKIE data:\n\n"
			+ "Input Item Type: "+inputItemType+"\n\nCookieName: "+cscCookieName+"\n\n"
			+ "Form Name: "+cscFormName+"\n\nSelected Index: "+fIndex+"\n\n"
			+ "Original string (stored in cookie):\n\n"+fValue1+"\n\n"
			+ "Modified string (sent to shop cart):\n\n"+document.forms[cscFormName].item.value)
		  }
		
		break
	  }


  /*
	if (fQty > 1) // quantity ordered is 2 or more
	  {
	    if ((cscDesc == fDesc) && (cscSize == fSize))  // matching product
	      {
		if ((fQty % 2) == 0)
		  {
	 	    // buy 1, get 2nd for half price
		    cscPrice = (Math.round(Math.abs(fPrice)*75)/100);
		  } else
		  {
		    // buy 1, get 2nd for half price, + reg price for odd item
		    cscPrice = (Math.round(Math.abs(fPrice)*75)/100);
		    cscPrice = ((cscPrice*(fQty-1))+Math.abs(fPrice));
		    cscPrice = (Math.round((cscPrice*100)/fQty)/100);
		  }

		cscTotal = ""+(((cscPrice*100)*fQty)/100);
		if (cscTotal.indexOf(".") == -1) { cscTotal += ".00" };
		while (cscTotal.indexOf(".") > (cscTotal.length-3)) { cscTotal += "0" };

		cscPrice = ""+cscPrice;
		if (cscPrice.indexOf(".") == -1) { cscPrice += ".00" };
		while (cscPrice.indexOf(".") > (cscPrice.length-3)) { cscPrice += "0" };

		if (scAlertFlag)
		  { 
		    alert("MATCHING special:\n\n"+cscStartMS+" - "+cscNowMS+" - "+cscStopMS+"\n"+cscDesc+", "+cscSize+"\n"
			+ "Original price: $"+fPrice+"\nAdjusted price: $"+cscPrice+"\nQuantity Ordered:  "+fQty+"\n"
			+ "Total Order: $"+cscTotal+"\n\n")
		  }

		fValue2	= fRec[0]	+ "^"
			+ fRec[1]	+ "^"
			+ fRec[2]	+ "^"
			+ cscPrice	+ "^"
			+ fRec[4]	+ "^"
			+ fRec[5]	+ "^"
			+ fRec[6]	+ "^"
			+ fRec[7]	+ "^"
			+ fRec[8]	+ "^"
			+ fRec[9]	;

		if (inputItemType == "select")
		  {
		    fIndex = document.forms[cscFormName].item.options.selectedIndex; 
		    document.forms[cscFormName].item.options[fIndex].value = fValue2
		  } else
		  {
		    fIndex = 0;
		    document.forms[cscFormName].item.value = fValue2
		  }

		cscCookieValue = cscFormName+"::"+fIndex+"::"+fValue1;

		setCookie(cscCookieName,cscCookieValue,cscCookieLife);

		if (scAlertFlag)
		  { 
		    alert("COOKIE data:\n\n"
			+ "Input Item Type: "+inputItemType+"\n\nCookieName: "+cscCookieName+"\n\n"
			+ "Form Name: "+cscFormName+"\n\nSelected Index: "+fIndex+"\n\n"
			+ "Original string (stored in cookie):\n\n"+fValue1+"\n\n"
			+ "Modified string (sent to shop cart):\n\n"+document.forms[cscFormName].item.value)
		  }
		
		break
	      }
	  }

  */

	// END SHOP CART CHECK CODE

      }
  }




// specialsData Array Adjustments

specialsDataCode = new Array(

	// match string :: insert text 1 :: insert text 2

	"get a second liter"
	+ "::<div align=center style='margin: 4px 20px 0px 0px; letter-spacing:0.2em; "
	  + "font-family:Comic Sans MS,arial; font-size:11pt; font-weight:bold; color:crimson'>"
	  + "<nobr>March Madness<i>!</i></nobr><br clear=all></div><b>"
	+ "::</b><br><span style='color:maroon'>"
	  + "When you order, be sure to specify a quantity of at least 2, and if more, the total quantity "
	  + "must be a multiple of 2 (an &quot;even&quot; number) to qualify for this special pricing "
	  + "(the shopping cart will reflect an adjusted unit price for this special offer).</span>",

	"10% discount on your order for this Next Generation product"
	+ "::<img src='products/face/HydratingFacialMoisturizer_1.jpg' border=1 width=120 height=160 "
	  + "alt='' style='margin: 0px 0px 5px 5px' align=right>"
	  + "<nobr><span style='font-size:11pt; font-weight:bold; color:crimson; line-height:2em'>"
	  + "10% Discount<i>!</i></span></nobr><br clear=left>"
	  + "We are delighted to present the first of our Next Generation Sedona Spa facial products, "
	  + "Hydrating Facial Moisturizer.  With patent pending technology, our company brings to the "
	  + "consumer our cutting edge trace metal nucleotide system that provides a comprehensive "
	  + "approach to overall skin health.<br clear=all>"
	+ "::<br clear=all><br>"
	  + "Sedona Spa has targeted and broadened our Hydrating Facial Moisturizer ingredients to include "
	  + "Shea Butter, Licorice Root Extract, Saguaro Flower Extract and Panax Ginseng Root Extract, "
	  + "providing superior products that deliver superior results. Highlights include:"
	  + "<ul type=circle style='margin: 5px 20px 5px 25px'>"
	    + "<li>Wrinkle-free reduction via Superoxide Dismutase (SOD) activation, the body&#146;s own "
	      + "anti-aging enzyme."
	    + "<li>Skin brightening with Niacinamide."
	    + "<li>Increased skin pliability through collagen synthesis boost."
	    + "<li>Deep moisturization and skin soothing results through anti-inflammatory agents."
	    + "<li>Plus a paraben-free preservative system."
	  + "</ul>"
	  + "Additionally, our Next Generation Hydrating Facial Moisturizer is induction sealed to provide "
	  + "maximum protection for the consumer, coupled with product integrity."
	  + "<div align=center style='margin: 5px 20px 5px 20px'><nobr>"
	    + "Sedona Spa.  Beauty On The Rocks...<br>"
	    + "providing clients with stellar products<br>delivering superior results."
	  + "</nobr></div>",

	"Madelaine solid milk chocolate heart"
	+ "::<a target='_blank' title='Click for larger image' "
	  + "href='products/misc/MadelaineChocolateHeart_3.jpg'>"
	  + "<img src='products/misc/MadelaineChocolateHeart_1.jpg' "
	  + "alt='Click for larger image' "
	  + "border=1 width=150 height=106 hspace=5 vspace=3 align=left></a>"
	+ "::<br clear=all>"
	  + "We can send your package directly to your Valentine with a gift card and bow. "
	  + "Be sure to order by February 6, 2006 to ensure delivery by Valentines Day.",

	"Jelly Belly Tangerine Carrot Bag"
	+ "::Save the Easter Bunny a few hops by sending Jelly Bellys to the special people in your life."
	  + "<br><div style='line-height:5px'>&nbsp;</div>"
	  + "Rabbits are a familiar symbol of the Easter holiday. In the days leading up to it, they appear "
	  + "on television commercials and packages of candy, and stores are filled with stuffed rabbits. "
	  + "It is no surprise that children beg their parents for a bunny of their own."
	  + "<br><div style='line-height:5px'>&nbsp;</div>"
	  + "Ill- prepared to care for these unique creatures, their \"owners\" often quickly tire of them. "
	  + "In the months following Easter, local humane societies and rabbit rescues are flooded with rabbits, "
	  + "former Easter gifts whose \"owners\" no longer want them. 85% to 90% of all Easter bunnies end up "
	  + "in shelters, turned loose or dead within 6 months of the holiday. The unlucky ones are dumped "
	  + "outside where predators, cars, illness, and injury virtually guarantee an early death. We encourage "
	  + "you to purchase chocolate Easter bunnies (or stuffed toy animals) rather than live rabbits."
	  + "<br><div style='line-height:5px'>&nbsp;</div>"
	  + "Sedona Spa proudly partners with the Animal Protection Institute and supports its mission. Visit "
	  + "their site to lean more at <a target='_blank' href='http://www.api4animals.org' style='color:blue' "
	  + "title='Go to the Animal Protection Institute&#146;s website'>www.api4animals.org</a>." 
	  + "<br><div style='line-height:5px'>&nbsp;</div>"
	  + "<a target='_blank' title='Click for larger image' "
	  + "href='products/misc/JellyBellyTangerineCarrotBag_3.jpg'>"
	  + "<img src='products/misc/JellyBellyTangerineCarrotBag_1.jpg' "
	  + "alt='Click for larger image' "
	  + "border=1 width=150 height=115 hspace=5 vspace=3 align=left></a>"
	+ "::<br>"
	  + "We can send your package directly to your recipient with a gift card. "
	  + "Be sure to order by April 5, 2006 to ensure delivery by Easter. Limited "
	  + "Quantities available.",

	"special Mothers Day collection"
	+ "::<a target='_blank' title='Click for larger image' "
	  + "href='products/misc/MothersDay2006_3.jpg'>"
	  + "<img src='products/misc/MothersDay2006_1.jpg' "
	  + "alt='Click for larger image' "
	  + "border=1 width=150 height=100 hspace=5 vspace=3 align=left></a>"
	+ "::<hr size=1 color=silver><br clear=all>"
	  + "Show Mom you care and send her Sedona Spa Products for Mother's Day, in a delicate lavendar bag "
	  + "filled with a 2 oz Mountain Moisture Shampoo, 2 oz Mountain Moisture Conditioner, 2 oz Body Balm Moisturizer, "
	  + "2 oz Botanical Sculpting Spray, 0.5 oz Sedona Red Mineral Facial, Vanilla Lip Balm SPF 30+ &amp; "
	  + "a 1.5 oz Sea Kelp Soap, absolutely free. We can send your package directly to your recipient with a gift card. "
	  + "Be sure to order by May 3, 2006 to ensure delivery by Mother&#146;s Day. Limited Quantities.",

	"Mother&#146;s Day package of yummy treats"
	+ "::<div align=center style='padding: 5px 0px 5px 0px; "
	  + "font-family:Bookman Old Style,arial,tahoma,verdana; "
	  + "font-size:12pt; font-weight:bold; font-style:italic; color:teal'>"
	    + "<nobr>Sedona Spa for Lovely Ladies</nobr></div>"
	  + "<div align=justify><a target='_blank' title='Click for larger image' "
	  + "href='products/misc/MothersDay2007_3.jpg'>"
	  + "<img src='products/misc/MothersDay2007_1.jpg' border=1 width=125 height=100 align=left "
	  + "alt='Click for larger image' style='margin: 2px 5px 5px 0px; border-color:blue' "
	  + "onMouseOver=\"this.style.borderColor='red'\" onMouseOut=\"this.style.borderColor='blue'\"></a>"
	  + "<div align=center style='margin: 5px 0px 8px 0px; font-weight:bold; color:maroon'>"
	    + "<nobr>Mother&#146;s Day Special Offer</nobr></div>"
	+ "::<br clear=all>"
	  + "This Mother&#146;s Day, delight all the special Moms in your life with our Sedona Spa Products. "
	  + "We have a fabulous selection of face, body, bath and hair care items to treat all our treasured gals."
	    + "<div style='line-height:5px'>&nbsp;</div>"
	  + "With any $75 purchase of Sedona Spa Products (excluding tax and shipping), we&#146;ll tuck in a "
	  + "fabulous package of Spring Pastel Mint Meltaways! These are yummy treats (chocolate mint meltaway "
	  + "centers enrobed in milk chocolate and pastel coatings), the perfect complement to our cruelty-free "
	  + "line of products created using animal-free ingredients and select Southwestern botanicals."
	    + "<div style='line-height:5px'>&nbsp;</div>"
	  + "Select gift baskets are decorated with gorgeous colorful bows and include a hand written gift card. "
	  + "Let our Customer Service Representatives at (800)RED-ROCK (800-733-7625) offer suggestions!</div>"
	  + "<div align=center style='font-weight:bold; line-height:1.5em; color:#800000; "
	    +"border: 2px dashed teal; padding:3px; margin: 8px 3px 3px 3px'>"
	    + "For guaranteed ground shipment by Mother&#146;s Day, Sunday, May 13<sup>th</sup>, please place your "
	    + "order by Wednesday, May 2<sup>nd</sup>, 2007.&nbsp; We look forward to serving you!<sup>&nbsp;</sup> "
	    + "Hurry, supplies are limited!!"
	  + "</div>",


  /* discontinued product per Mia email 10/18/07

	"and a special gift will be included in your order, with our compliments..."
	+ "::<div align=justify><a target='_blank' title='Click for larger image' "
	  + "href='body_products.html?prodGroup=Body&prodName=Peace%20Rose%20Bath%20Salts'>"
	  + "<img src='products/body/PeaceRoseBathSalts_1.jpg' border=1 width=120 height=160 align=left "
	  + "alt='Click for &quot;Peace Rose Bath Salts&quot; product information' style='margin: 2px 5px 5px 0px; border-color:blue' "
	  + "onMouseOver=\"this.style.borderColor='red'\" onMouseOut=\"this.style.borderColor='blue'\"></a>"
	  + "<div align=center style='padding: 5px 0px 5px 0px; font-family:arial,tahoma,verdana'>"
	    + "<div style='font-size:14pt; font-weight:bold; font-style:italic; color:teal'>"
	        + "<nobr>Our gift for you...</nobr>"
	    + "</div>"
	    + "<div style='margin: 5px 0px 8px 0px; font-weight:bold; font-size:12pt; color:maroon'>"
	      + "<nobr>a $15.95 value<i>!</i></nobr>"
	    + "</div>"
	  + "</div>"
	+ "</div>"
	+ "::<br clear=all>",
  */


	"&quot;Limited Quantity Special&quot; &#150; Retail value $110.00,"
	+ "::<div align=justify>"
	  + "<div align=center style='padding: 5px 0px 5px 0px; font-family:arial,tahoma,verdana'>"
	    + "<div style='font-size:14pt; font-weight:bold; font-style:italic; color:teal'>"
	        + "<nobr>Limited Quantity Special</nobr>"
	    + "</div>"
	    + "<div style='margin: 5px 0px 5px 0px; font-weight:bold; font-size:12pt; color:maroon'>"
	      + "<nobr>Big Savings on our Favorites<i>!</i></nobr>"
	    + "</div>"
	    + "<div style='margin: 5px 0px 5px 0px; font-weight:bold; font-size:12pt; color:crimson'>"
	      + "<nobr>&quot;Sedona In A Box&quot;</nobr>"
	    + "</div>"
	  + "</div>"
	  + "<div align=justify>"
	    + "<a target='_blank' title='Click for larger image' "
	    + "href='gift_products.html?prodGroup=Gift&prodName=Sedona%20In%20A%20Box'>"
	    + "<img src='products/gift/SedonaInABox_1.jpg' border=1 width=120 height=160 align=right "
	    + "alt='Click for &quot;Sedona In A Box&quot; product information' style='margin: 5px 0px 10px 5px; border-color:blue' "
	    + "onMouseOver=\"this.style.borderColor='red'\" onMouseOut=\"this.style.borderColor='blue'\"></a>"
	  + "</div>"
	+ "</div>"
	+ "::<br clear=all>",


	"order any of our specially designed gift baskets, and <b>receive 30% off<i>!</i></b>"
	+ "::<div align=center style='margin: 2px 0px 8px 0px; font-family:arial,tahoma,verdana; font-size:12pt; font-weight:bold; color:#800000'>"
	  + "<nobr>&#149; &#149; &#149; &nbsp; Mother&#146;s Day Special &nbsp; &#149; &#149; &#149;</nobr></div>"
	  + "<a href='products/misc/MothersDay2008_2a.jpg' target='_blank' title='Sedona Spa products - click for larger image'>"
	    + "<img src='products/misc/MothersDay2008_1a.jpg' border=1 align=right vspace=2 style='margin-left:5px; border-color:#0066ff' "
	      + "onMouseOver=\"this.style.borderColor='#ff0000'\" onMouseOut=\"this.style.borderColor='#0066ff'\"></a>"
	+ "::<br clear=all>",


	"and we will include <u>another one</u> <b>FREE!</b>"
	+ "::<div align=center style='margin: 2px 0px 8px 0px; font-family:arial,tahoma,verdana; font-size:11pt; font-weight:bold; color:#800000'>"
	  + "<nobr>&#149; &#149; &#149; &nbsp; GET ONE FREE<i>!</i> &nbsp; &#149; &#149; &#149;</nobr></div>"
	  + "<a href='products/hair/MaximumBodyConditioner_3.jpg' target='_blank' title='Maximum Body Conditioner - click for larger image'>"
	    + "<img src='products/hair/MaximumBodyConditioner_1.jpg' border=1 align=right vspace=2 style='margin-left:8px; border-color:#0066ff' "
	      + "onMouseOver=\"this.style.borderColor='#ff0000'\" onMouseOut=\"this.style.borderColor='#0066ff'\"></a><br>"
	+ "::<br clear=all>",


	"and  we&#146;ll  include standard shipping "
	+ "::<div align=center style='margin: 2px 0px 8px 0px; font-family:arial,tahoma,verdana; font-size:14pt; font-weight:bold; color:#800000'>"
	  + "<nobr>&#149; &#149; &#149; &nbsp; FREE SHIPPING &nbsp; &#149; &#149; &#149;</nobr></div>"
	+ "::<br clear=all>",


	"we&#146;ll also include one Nighttime Refining Moisturizer (retail value $34.95)"
	+ "::<div align=center style='margin: 2px 0px 8px 0px; font-family:arial,tahoma,verdana; font-size:14pt; font-weight:bold; color:#800000'>"
	  + "<nobr>&#149; &#149; &nbsp; Our Holiday Gift to You &nbsp; &#149; &#149;</nobr></div>"
	+ "::<div align=center style='margin: 8px 0px 2px 0px; font-family:arial,tahoma,verdana; font-size:13.5pt; font-weight:bold; color:#800000'>"
	  + "<nobr>"
	    + "<a href='face_products.html?prodGroup=Face&prodName=Firming Anti-Wrinkle Eye Cream' target='_blank' "
	      + "title='Firming Anti-Wrinkle Eye Cream - included absolutely FREE with orders of $25 or more (excluding taxes & shipping)'>"
	      + "<img src='products/face/FirmingAnti-WrinkleEyeCream_1.jpg' border=1 width=72 height=96 hspace=2 align=left></a>"
	    + "<a href='face_products.html?prodGroup=Face&prodName=Nighttime Refining Moisturizer' target='_blank' "
	      + "title='Nighttime Refining Moisturizer - included absolutely FREE with orders of $50 or more (excluding taxes & shipping)'>"
	      + "<img src='products/face/NighttimeRefiningMoisturizer_1.jpg' border=1 width=72 height=96 hspace=2 align=right></a>"
	    + "Happy Holidays<br>from<br>Sedona Spa<sup>&reg;</sup><br>Products!<br clear=all>"
	  + "</nobr></div>",


	"");


function specialsDataAdjust()
  {
    var saRec, saStart, saStop, saGroup, saProd, saFlag, 
	saBuyGroup, saBuyProd, saBuySize, saBuyPreText, saBuyPostText,
	saGetGroup, saGetProd, saGetSize, saGetPreText, saGetPostText,
	saRec1, saRec2, saRec3, saPage=getPageName(), 
	scRec, scString1, scInsert1, scInsert2 ;

    for (sdax = 0 ; sdax < specialsData.length ; sdax++)
      {
	if (specialsData[sdax].indexOf("::") == -1) { continue };
	saRec		= specialsData[sdax].split("::");
	saStart		= saRec[0];
	saStop		= saRec[1];
	saGroup		= saRec[2];
	saProd		= saRec[3];
	saFlag		= saRec[4];
	saBuyGroup	= saRec[5];
	saBuyProd	= saRec[6];
	saBuySize	= saRec[7];
	saBuyPreText	= saRec[8];
	saBuyPostText	= saRec[9];
	saGetGroup	= saRec[10];
	saGetProd	= saRec[11];
	saGetSize	= saRec[12];
	saGetPreText	= saRec[13];
	saGetPostText	= saRec[14];

	for (sdcx = 0 ; sdcx < specialsDataCode.length ; sdcx++)
	  {
	    if (specialsDataCode[sdcx].indexOf("::") == -1) { continue };
	    scRec	= specialsDataCode[sdcx].split("::");
	    scString1	= scRec[0];
	    scInsert1	= scRec[1];
	    scInsert2	= scRec[2];

	    // ADJUST SELECTED RECORDS

	    if ((saGetPreText.indexOf(scString1) != -1) && (saPage == "specialoffers"))
	      { 
		saRec1	= saStart	+ "::"
			+ saStop	+ "::"
			+ saGroup	+ "::"
			+ saProd	+ "::"
			+ saFlag	+ "::"
			+ saBuyGroup	+ "::"
			+ saBuyProd	+ "::"
			+ saBuySize	+ "::"		;

		saRec2	= scInsert1
			+ saBuyPreText	+ "::"		;

		saRec3	= saBuyPostText	+ "::"
			+ saGetGroup	+ "::"
			+ saGetProd	+ "::"
			+ saGetSize	+ "::"
			+ saGetPreText	+ "::"
			+ saGetPostText + scInsert2	;

		specialsData[sdax] = saRec1 + saRec2 + saRec3
	      }
	  }
      }
  }


specialsDataAdjust();


buttSpecial0		= new Image();
buttSpecial0.src	= "images/button_specials.gif";

buttSpecials1		= new Image();
buttSpecials1.src	= "images/button_specials_over.gif";

buttBuy0		= new Image();
buttBuy0.src		= "images/button_buy.gif";

buttBuy1		= new Image();
buttBuy1.src		= "images/button_buy_over.gif";

var specialsFlag	= 0;
var sNowDate		= new Date();
var sNowDateMS		= sNowDate.getTime();

var sBreak		= "<br clear=all><hr size=1 color=#009980 style='line-height:3px'>";


specialsList		= new Array();



function buildSpecials()
  {
    var bsRec, bsStart, bsStop, bsGroup, bsProd, bsFlag, 
	bsBuyGroup, bsBuyProd, bsBuySize, bsBuyPreText, bsBuyPostText,
	bsGetGroup, bsGetProd, bsGetSize, bsGetPreText, bsGetPostText,
	bsStartDate, bsStopDate, bsStartDateMS, bsStopDateMS, 
	bsDesc = "", bsRec1 = "", bsRec2 = "" ;

    // specialsList array - record format:
    //		start date (mm/dd/yyyy) :: end date (mm/dd/yyyy) :: group :: product :: flag 
    //		:: special offer description (with product names spelled out exactly)

    for (bsx = 0 ; bsx < specialsData.length ; bsx++)
      {
	if (specialsData[bsx].indexOf("::") == -1) { continue };
	bsRec		= specialsData[bsx].split("::");
	bsStart		= bsRec[0];
	bsStop		= bsRec[1];
	bsGroup		= bsRec[2];
	bsProd		= bsRec[3];
	bsFlag		= bsRec[4];
	bsBuyGroup	= bsRec[5];
	bsBuyProd	= bsRec[6];
	bsBuySize	= bsRec[7];
	bsBuyPreText	= bsRec[8];
	bsBuyPostText	= bsRec[9];
	bsGetGroup	= bsRec[10];
	bsGetProd	= bsRec[11];
	bsGetSize	= bsRec[12];
	bsGetPreText	= bsRec[13];
	bsGetPostText	= bsRec[14];

	bsRec1		= bsStart	+ "::"
			+ bsStop	+ "::"
			+ bsGroup	+ "::"
			+ bsProd	+ "::";

	bsRec2		= "::"
			+ bsBuyGroup	+ "::"
			+ bsBuyProd	+ "::"
			+ bsBuySize	+ "::"
			+ bsBuyPreText	+ "::"
			+ bsBuyPostText	+ "::"
			+ bsGetGroup	+ "::"
			+ bsGetProd	+ "::"
			+ bsGetSize	+ "::"
			+ bsGetPreText	+ "::"
			+ bsGetPostText	;

	bsStartDate	= new Date(bsStart+" 00:01");
	bsStopDate	= new Date(bsStop+" 23:59");
	bsStartDateMS	= bsStartDate.getTime();
	bsStopDateMS	= bsStopDate.getTime();

	if ((bsStartDateMS < sNowDateMS) && (bsStopDateMS > sNowDateMS) && (bsBuyGroup.length > 1) && (bsBuyProd.length > 1))
	  {
	    bsDesc += "<a href='easyorder.html#"+bsBuyGroup+"_"+bsBuyProd+"' "
		+ "title='Click to go to the \"Easy Order\" page to add this \""+bsBuyProd+"\" special to your shopping cart'>"
		+ "<img src='"+buttBuy0.src+"' border=0 width=40 height=20 hspace=5 vspace=5 align=left "
		+ "alt='Click to go to the \"Easy Order\" page to add this \""+bsBuyProd+"\" special to your shopping cart' "
		+ "onMouseOver='this.src=buttBuy1.src' onMouseOut='this.src=buttBuy0.src'></a>";
	  }

	bsDesc	+= (bsBuyPreText.length > 1)	? ""+bsBuyPreText+" "			: "Buy " ;
	bsDesc	+= (bsBuySize.length > 1)	? ""+bsBuySize+" "			: "" ;
	bsDesc	+= ((bsBuyGroup.length > 1) && (bsBuyProd.length > 1)) 
						// ? showPopWin(bsBuyGroup,bsBuyProd,"info")	: "" ;
						? makeProdLink(bsBuyGroup,bsBuyProd)	: "" ;
	bsDesc	+= (bsBuyPostText.length > 1)	? " "+bsBuyPostText+", "		: ", " ;

	bsDesc	+= (bsGetPreText.length > 1)	? ""+bsGetPreText+" "			: "get " ;
	bsDesc	+= (bsGetSize.length > 1)	? ""+bsGetSize+" "			: "" ;
	bsDesc	+= ((bsGetGroup.length > 1) && (bsGetProd.length > 1)) 
						// ? showPopWin(bsGetGroup,bsGetProd,"info")	: "" ;
						? makeProdLink(bsGetGroup,bsGetProd)	: "" ;
	bsDesc	+= (bsGetPostText.length > 1)	? " "+bsGetPostText			: "." ;

	if ((specialsData[bsx+1].indexOf("::") == -1)		|| 
	    (specialsData[bsx+1].split("::")[0] != bsStart)	|| 
	    (specialsData[bsx+1].split("::")[1] != bsStop))
	  {
	    bsRec	= monthList[bsStartDate.getMonth()]+" "+bsStartDate.getDate()+", "+bsStartDate.getYear()	+ "::"
			+ monthList[bsStopDate.getMonth()]+" "+bsStopDate.getDate()+", "+bsStopDate.getYear()		+ "::"
			+ bsGroup											+ "::"
			+ bsProd											+ "::";
  	    if ((bsStartDateMS < sNowDateMS) && (bsStopDateMS > sNowDateMS))
	      {
		specialsFlag = 1;
		bsRec += "1";
		specialsData[bsx] = bsRec1+"1"+bsRec2
	      } else 
	      {
		bsRec += "0";
		specialsData[bsx] = bsRec1+"0"+bsRec2
	      }
	    bsRec += "::"+bsDesc;
	    specialsList[specialsList.length] = bsRec;
	    bsDesc = "";
	  } else
	  {
	    bsDesc += sBreak;
  	    if ((bsStartDateMS < sNowDateMS) && (bsStopDateMS > sNowDateMS))
	      {
		specialsData[bsx] = bsRec1+"1"+bsRec2
	      } else 
	      {
		specialsData[bsx] = bsRec1+"0"+bsRec2
	      }
	  }
	//alert(specialsData[bsx])
      }
    specialsList[specialsList.length] = ""
  }



function listSpecials(lsFunc,lsTarg)
  {
    var lsRec, lsStart, lsStop, lsGroup, lsProd, lsFlag, lsDesc, lsContent ;

    if (lsTarg == "win")
      {
	var isWindow	= 1;
	var lsClose	= 180;
	var lsWinName	= "specialsWindow";
	var lsWinParams	= "width=720,height=360,scrollbars,resizable";
	var lsWin	= window.open("",lsWinName,lsWinParams);
	//var lsWrite	= lsWin.document.write
      } else
      {
	var isWindow	= 0;
	//var lsWrite	= document.write
      }

    if (isWindow)
      {
	lsContent = "<html><head>"
	+ "<title>Sedona Spa - Specials</title>"
	+ "<meta http-equiv='refresh' "
	  + "content='"+lsClose+"; URL=javascript:self.close()'>"
	+ "<link href='css/pagestyle1.css' rel='stylesheet' type='text/css'>"
	+ "<style> a{text-decoration:none}; a:hover{text-decoration:underline overline}</style>"
	+ "</head><body bgcolor=white text=black marginHeight=5 marginWidth=5 "
	+ "leftMargin=5 rightMargin=5 topMargin=5 bottomMargin=5><center>"
	+ "<div align=center style='margin-top:10px'>"
	+ "<img src='images/popWinSpecialsHeader1_560x50.jpg' alt='Specials' "
	  + "border=1 width=560 height=50>"
	  + "<div style='line-height:20px'>&nbsp;</div>"
      } else
      {
	lsContent = "<div align=center style='margin-top:10px'>"
	  + "<span style='font-family:arial,tahoma,verdana; font-size:12pt; font-weight:bold; "
	    + "color:maroon'>CURRENT &nbsp; SPECIALS</span>"
	  + "<div style='line-height:10px'>&nbsp;</div>"
      }

    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };

    lsContent = "<nobr>"
	  + "<span style='font-family:verdana; font-size:8pt; font-weight:normal; color:dimgray'>"
	    + "The following special offers are currently active &amp; available to you!<br>"
	    + "Use these opportunities to try new products and enjoy savings too!<br>"
	  + "</span>"
	+ "</nobr>"
	+ "<table bgColor=snow border=1 cellspacing=0 cellpadding=5 "
	+ "borderColorLight='"+document.bgColor+"' borderColorDark=teal "
	+ "style='font-family:arial,tahoma,verdana; font-size:8pt; font-weight:normal; "
	+ "font-style:normal; color:navy; margin-top:10px; margin-bottom:10px'>"
	+ "<tr align=center valign=bottom style='font-size:10pt; font-weight:bold'>"
	  + "<th nowrap>ACTIVE DATES</th>"
	//  + "<th>THRU</th>"
	  + "<th nowrap>SPECIAL DESCRIPTION</th>"
	+ "</tr>";

    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };

    for (lsx = 0 ; lsx < specialsList.length ; lsx++)
      {
	if (specialsList[lsx].indexOf("::") == -1) { continue };
	lsRec		= specialsList[lsx].split("::");
	lsStart		= lsRec[0];
	lsStop		= lsRec[1];
	lsGroup		= lsRec[2];
	lsProd		= lsRec[3];
	lsFlag		= Math.abs(lsRec[4]);
	lsDesc		= lsRec[5];

	// if ((lsFlag) || (lsFunc == "all") || (!onlineFlag))
	if ((lsFlag) || (lsFunc == "all"))
	  {
	    if (lsFlag)
	      { lsContent = "<tr valign=middle bgColor='#ffffcc'>"	} else
	      { lsContent = "<tr valign=middle>"			} ;
	    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };
	    lsContent = "<td align=center valign=middle nowrap>"+lsStart+"<br>thru<br>"+lsStop+"<br></td>"
	    //  + "<td nowrap>"+lsStop+"</td>"
	      + "<td>"+lsDesc+"</td>"
	      + "</tr>";
	    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };
	  }
      }

    lsContent = "</table>";

    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };

    if (isWindow)
      {
	lsContent = "<nobr>"
	  + "<span style='font-family:verdana; font-size:8pt; font-weight:normal; color:dimgray'>"
	    + "Although our shopping cart may not always directly reflect the<br>"
	    + "above detail when you order online, we will automatically include<br>"
	    + "the appropriate product and/or pricing &quot;specials&quot; with your<br>"
	    + "order (based on the date/time of your order submittal).<br>"
	  + "</span>"
        + "</nobr>"
      } else
      {
	lsContent = "<nobr>"
	  + "<span style='font-family:verdana; font-size:8pt; font-weight:normal; color:dimgray'>"
	    + "Although our shopping cart may not always directly reflect the above<br>"
	    + "detail when you order online, please be assured we will automatically<br>"
	    + "include all current applicable product and/or pricing &quot;specials&quot; with<br>"
	    + "your order (based on the date/time of your order submittal).<br>"
	  + "</span>"
        + "</nobr>"
	+ "<hr size=1 color=silver>"
      }

    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };

    lsContent = "</div>";

    if (isWindow) { lsWin.document.write(lsContent) } else { document.write(lsContent) };

    if (isWindow)
      {
	lsWin.document.write("<div style='line-height:10px'>&nbsp;</div>"
	+ showSpecialsFooter()+"</center></body></html>");
      }

    if ((isWindow) && (isCurrent))
      { lsWin.setTimeout("self.close()",Math.abs(lsClose*1000)) }
  }



function listNoSpecials()
  {
    document.write("<div align=center style='margin-top:10px; margin-bottom:10px; "
      + "margin-left:20px; margin-right:20px; padding:30px; "
      + "font-family:arial,tahoma,verdana; font-size:12pt; font-weight:bold; "
      + "color:maroon; background-color:#ffff99'>"
      + "<nobr>"
	+ "N O &nbsp; O T H E R &nbsp; S P E C I A L S<br><br>"
	+ "C U R R E N T L Y &nbsp; A V A I L A B L E<br><br>"
	+ "<span style='font-size:10pt; font-weight:normal; color:indigo'>"
	  + "We offer specials frequently, so please<br>come back and check this page often<i>!</i>"
	  + "<div style='line-height:8px'>&nbsp;</div>");
	addFavBookmark();
	document.write("<div style='line-height:8px'>&nbsp;</div>"
	  + "Whenever special offers are available,<br>look for this <img src='images/button_specials.gif' "
	  + "border=0 vspace=2 hspace=2 align=absmiddle style='cursor:help' "
	  + "alt='This button always takes you to this page'> button<br>to appear on most site pages."
	+ "</span>"
      + "</nobr>"
    + "</div>");
  }



function showSpecialsFooter()
  {
    var sfString = "";
    var sfColor = "gray"; 
    var sfEmail	= "<a href='mailto:"+ssEmailTo
		+ "?subject=Online Inquiry ("+document.title+")"
		+ "&cc="+ssEmailCC+"' title='Send email to Sedona Spa' "
		+ "style='color:"+sfColor+"'>info@SedonaSpa.com</a>";

    sfString	+= "<div style='margin-top:12px; "
		+ "font-family:arial,verdana; font-size:10pt; "
		+ "font-weight:normal; font-style:normal; color:navy'>"
		+ "<hr size=1 width=90% color=deepskyblue>"
		+ "<a href='javascript:self.close()' style='color:#0066ff'><b>CLOSE</b></a> "
		+ "this Sedona Spa<sup>&reg;</sup> window"
		+ "<hr size=1 width=90% color=deepskyblue></div>";

    sfString	+= "<div style='margin-bottom:16px; "
		+ "font-family:verdana,arial; font-size:7pt; font-weight:normal; "
		+ "color:"+sfColor+"'><nobr>Copyright "+getDate("copyright")
		+ ", Sedona Spa.<sup>&reg;</sup>&nbsp; All rights reserved.<br>"
		+ ssAddress+" &#149; "+ssPhone+" &#149; "+sfEmail+"</nobr></div>";

    return sfString
  }



function activeSpecial(asItemGroup,asItemProd,asItemSize)
  {
    if ((!asItemSize) || (asItemSize.length < 1)) { var asItemSize = "" };
    var asRec, asStart, asStop, asGroup, asProd, asFlag, 
	asBuyGroup, asBuyProd, asBuySize, asBuyPreText, asBuyPostText, 
	asGetGroup, asGetProd, asGetSize, asGetPreText, asGetPostText, 
	asStatus = 0 ;
    for (asx = 0 ; asx < specialsData.length ; asx++)
      {
	if (specialsData[asx].indexOf("::") == -1) { continue };
	asRec		= specialsData[asx].split("::");
	asStart		= asRec[0];
	asStop		= asRec[1];
	asGroup		= asRec[2];
	asProd		= asRec[3];
	asFlag		= Math.abs(asRec[4]);
	asBuyGroup	= asRec[5];
	asBuyProd	= asRec[6];
	asBuySize	= asRec[7];
	asBuyPreText	= asRec[8];
	asBuyPostText	= asRec[9];
	asGetGroup	= asRec[10];
	asGetProd	= asRec[11];
	asGetSize	= asRec[12];
	asGetPreText	= asRec[13];
	asGetPostText	= asRec[14];

	if (!asFlag) { continue };

	if (((asBuyGroup.length > 1) && (asItemGroup.indexOf(asBuyGroup) != -1)) &&
	    ((asBuyProd.length > 1) && (asItemProd.indexOf(asBuyProd) != -1)))
	  {
	    asStatus = 1;
	    if ((asBuySize.length > 1) && (asItemSize.length > 1) && (asItemSize.indexOf(asBuySize) == -1)) { asStatus = 0 };
	  } else
	  { asStatus = 0 };
	if (asStatus) { break };

	if (((asGetGroup.length > 1) && (asItemGroup.indexOf(asGetGroup) != -1)) &&
	    ((asGetProd.length > 1) && (asItemProd.indexOf(asGetProd) != -1)))
	  {
	    asStatus = 1;
	    if ((asGetSize.length > 1) && (asItemSize.length > 1) && (asItemSize.indexOf(asGetSize) == -1)) { asStatus = 0 };
	  } else
	  { asStatus = 0 };
	if (asStatus) { break };
      }
    return asStatus
  }


buildSpecials();


//-->
