		var signedIn = false;
		var realm = "USAmazon";
		var ENDLESS_ROOT_NODE = "241745011";
		var features = {"pixelIntegration":"T1","handbagScale":"T1","freshnessSorting":"T1","gatewayCSSSplit":"T2","sims":"true","pageAssemblyTypeLogging":"T1","hasDesignerStore":"true","nullSearchImprove":"T2","afterCFScriptLoad":"T1","leftNavWidget":"T2","dpQuickView":"T1","asyncJSLoad":"T2","hasMultipleShipSpeeds":"true","hasNewStyleAlert":"true","hasRuleBasedAccessories":"true","retryRPAService":"T1","detailLargeAltSprite":"true","hasPhoneOrders":"true","retryOfferService":"T1","dpvideo":"true","cinderella":"true","afterCFScriptLoadOnGateway":"T1","dpSpriteAltViews":"true","hasCashback":"true","detailPageImagePrecaching":"T1","twoSearchResultPagelets":"T1","largerImages":"T1","precacheSearchImages":"T1"};
		var disableMouseFeatures = false;
		
		
		var jsStrings = {};
		function getString(stringID, keyValueMap) {
			
			if (typeof jsStrings == "undefined"){
				return "";
			}
			
			
			var pattern = jsStrings[stringID];
			if (typeof pattern == "undefined"){
				return "";
			}
			
			
			if (typeof keyValueMap == "undefined"){
				return pattern;
			}
			
			
			for (var key in keyValueMap) {
				var placeHolder = new RegExp("##" + key + "##", "g");
				var value = keyValueMap[key];
				pattern = pattern.replace(placeHolder, value);
			}
			return pattern;
		}
		
		function registerString(stringID, pattern) {
		    
			if (typeof jsStrings == "undefined"){
				return;
			}
			jsStrings[stringID] = pattern; 
		}
		

		function getImage(imageName) {
			return document.getElementById(imageName) ? 
				document.getElementById(imageName).innerHTML : "";
		}
		

		
		
		function fractionCurrencyString(stringValue) {
			var x = parseInt(stringValue);
			x = x / Math.pow(10,2);
			return x;
		}

		function formatCurrency(floatValue, round) {
			
			if (isNaN(floatValue)) { return floatValue; }
			var value;
			if (round) {
				value = Math.round(floatValue);
			} else {
				value = floatValue.toFixed(2);
			}
			value += ""; 
			
			var x = value.split(".");
			var x0 = x[0];
			
			var x1 = x.length > 1 ? "." + x[1] : "";
			
			var rgx = /(\d+)(\d{3})/;
			
			while (rgx.test(x0)) {
				x0 = x0.replace(rgx, "$1" + "," + "$2");
			}
			
			return "$" + x0 + x1 + "";
		}
		
		
		window.AmazonPopoverImages = {
		  snake: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/snake._V192577143_.gif',
		  btnClose: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/closeBttn._V192577469_.gif',
		  closeTan: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/close-tan-sm._V192577469_.gif',
		  closeTanDown: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/close-tan-sm-dn._V192577469_.gif',
		  loadingBar: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/loading-bar-small._V192577430_.gif',
		  pixel: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/blank-pixel._V192194450_.gif'
		};

		
		window.SharedImages = {
		  loaderImage: 'http://g-ecx.images-amazon.com/images/G/01/Endless/en_US/images/loaderIcon._V210950827_.gif'
		};
		
		var AsyncLoader = function(oParams) {
			if(oParams && oParams.script) {
				var elScript=document.createElement("script");
				elScript.src = oParams.script;
				var elHead = document.getElementsByTagName('head')[0];
				elHead.appendChild(elScript);
				if(typeof oParams.handler == 'function') {
					elScript.onload = function() {
						oParams.handler.call(window);
					};
					elScript.onreadystatechange = function(){
						if (this.readyState && (this.readyState == "loaded" || this.readyState == "complete")){
							this.onreadystatechange = null;
							oParams.handler.call(window);
						}
					};
				}
				elScript = null;
				elHead = null;
			}
		};
		
	    var amznJQ = {
	        _a: [], _s: [], _d: [], _l: [], _o: [], _w: [],
	        addLogical: function() {
	            this._l.push(arguments);
	        },
	        addStyle: function() {
	            this._s.push(arguments);
	        },
	        declareAvailable: function() {
	            this._d.push(arguments);
	        },
	        available: function() {
	            this._a.push(arguments);
	        },
	        onReady: function() {
	            this._o.push(arguments);
	        },
	        elementOnLoad : function() {
		        this._w.push(arguments);
	        },
	        strings: {},
	        chars: {
	            EOL: String.fromCharCode(0x0A),
	            SQUOTE: String.fromCharCode(0x27),
	            DQUOTE: String.fromCharCode(0x22),
	            BACKSLASH: String.fromCharCode(0x5C),
	            YEN: String.fromCharCode(0xA5)
	        }
	    }
		
		
			var cfUtils = new function() {
				
				this.cfCounter = 0;
				
				this.cfLoaded = false;
				
				this.totalCF = 0;
				
				this._q = [];
	
				this.init = function() {
					
					amznJQ.elementOnLoad(window,"EndlessScripts" ,this.wrapHandler(function() {
						if(!this.cfLoaded) {
							this.executeQueue();
							this.cfLoaded = true;
						}
					}, this));
				};
	
				this.wrapHandler = function(fHandler, oContext) {
					return function() {
						fHandler.apply(oContext,arguments);
					}
				};
	
				this.addCFCount = function(cfCount) {
					this.cfLoaded = false;
					this.totalCF = this.totalCF + cfCount;
				};
	
				this.triggerCF = function() {
					
					this.cfCounter++;
					if(this.cfCounter >= this.totalCF) {
						if(!this.cfLoaded) {
							this.executeQueue();
							this.cfLoaded = true;
						}
					}
				};
				
				this.executeQueue = function() {
					for(var i = 0; i < this._q.length; i++) {
						this._q[i].call(window);
					}
					this._q = [];
				};
				
				this.onCF = function(fHandler) {
					if(typeof fHandler == 'function') {
						
						if(this.cfLoaded || windowLoaded) {
							fHandler.call(window);
						}
						else {
							this._q.push(fHandler);
						}
					}
				};
	
				this.init();
			};
		
		
		
		function addWindowOnloadQueue(fOnLoadHandler) {
			
			amznJQ.elementOnLoad(window,"EndlessScripts", fOnLoadHandler);
		} 
    	
	    
            var clientLogNameSpace = null;
            
            


        /* global variable that tracks if the window.load() event has triggered yet */
        var windowLoaded = false;
        (function() {
	        var fPrevOnLoad = window.onload;
	        window.onload = function() {
		        try { 
					if(typeof fPrevOnLoad == 'function') {
						fPrevOnLoad.apply(this, arguments);
					}
		        }
		        catch(ex) {
		        	
			    }
				windowLoaded = true;
	        }
        })();

