try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

function writeItems() {
    var items = readCookies('scitems');
    if (items) {
        if (items == 1) { 
	        document.write( items + ' item' );
		} else {
		    document.write( items + ' items' );
		}
    } else {
	    document.write( '0 items' );
	}
}

function readCookies(name) {
	var cname = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(cname) == 0) return c.substring(cname.length,c.length) ;
	}
}

/*(function (){
	function whatsNewRotator(){	
		if (!document.getElementById('whatsnew')) return;
		
		// update the following 2 lines (images array and alt tags) and the image maps in the htmlf file
		var images = ['0109', '0109b', '0109c', '0109d'];
		var altTags = ['Trend File 2009 Colors - New Metallics, Tan, Deep Browns, Reds', 'Trend File 2009 Embellishments - Fabric Covered Buckle, Cork/Leather, Wood/Pearl Buttons, Wrapped Bottoms', 'Trend File 2009 Heels - Architectural, Shapes, Glossed, Wood Finish', 'Trend File 2009 Peep Toes'];

		var rand = Math.floor(Math.random() * images.length);
		var mainDiv = document.getElementById('whatsnew');
		var mainImg = document.createElement('img');
		var source = '/img/cobrand/indigo/indigo_whatsnew_bg_';
		source += images[rand] + '.jpg';
		mainImg.setAttribute('src', source);
		mainImg.setAttribute('useMap', '#' + images[rand]);
		mainImg.setAttribute('alt', altTags[rand]);
		mainDiv.appendChild(mainImg);
	}	
	var load = window.onload;
	window.onload = function(){
		if (typeof load == "function") load();
		whatsNewRotator();
	}	
})();*/

