/* 
 * application.js
 * 
 * @desc: This is where all scripts specific to this cobrand/shop/application goes.
 */

/*
 * This function is used instead of window.onload().
		It executes when DOM is ready. It will not wait for images to load.
 * 
 * @dependencies: js-zlib.js
 */
function onDomReady() {
	
}

<!-- START -- Shopping Cart script -->
function writeItems() {
    var items = readCookies('scitems');
	var stuff = 'Shopping Bag (<span class="cartnum">' + items + '</span>';
    if (items) {
        if (items == 1) { 
	        document.write(stuff + ' item)' );
		} else {
		    document.write(stuff + ' items)' );
		}
    } else {
	    document.write('Shopping Bag (' + '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) ;
	}
}

<!-- END -- Shopping Cart script-->
