	/********************************************************************************************/	
	// resizes the gutter pictures to fit the screen
	function resizeBorders() {
		var totWidth = '890'; // 1 pixel larger than actual width to satisfy full screen bug in Mozilla 
		imgHeight = document.getElementById('contentContainer').scrollHeight;
		imgWidth 	= document.getElementById('contentContainer').scrollWidth;
		imgWidth = (imgWidth - totWidth)/2;	// 889 is the combined width of everything else (inner content and other borders not being resized)
		if(imgWidth < 5) { imgWidth = 5; }
		
		document.getElementById('leftBorder').style.height = imgHeight;
		document.getElementById('leftBorder').style.width = imgWidth;
		
		document.getElementById('rightBorder').style.height = imgHeight;
		document.getElementById('rightBorder').style.width = imgWidth;
	}
	/*********************************************/	
	// Resets the layout when the page is refreshed of resized
	function resetLayout() {
		document.getElementById('leftBorder').style.height = 0;
		document.getElementById('leftBorder').style.width = 0;
		
		document.getElementById('rightBorder').style.height = 0;
		document.getElementById('rightBorder').style.width = 0;
		
		timer = '200';
		self.setTimeout('resizeBorders()',timer);
	}
	/*********************************************/	
	function ieDisplay(objid,way){
	// Div show/hide (way: 0=hide; 1=show);
		var obj = document.getElementById(objid);
		obj.style.display = (way)?'inline':'none';
	}
	/*********************************************/	
	// Image Hover by exact location and id
	function easySwap(location,id) {
		if(TempImg != id) {	
			imageTempOn = new Image();
			imageTempOn.src = location;
			document.images['' + id  + ''].src= imageTempOn.src;
		}
	}
	/*********************************************/	
	function hardSwap(location,id) {	
		imageTempOn = new Image();
		imageTempOn.src = location;
		document.images['' + id  + ''].src= imageTempOn.src;
	}
	/*********************************************/	
	function swapFlash(id, file) {
		if(TempImg != file) {
			file = 'media/' + file + '.swf';
			var mov = flashAccess(id+'obj');
			/*
			if(is.ie){
				//var mov = window.document.getElementById(id+'obj');
				var mov = flashAccess(id+'obj');
			}else{
				document.getElementById('fixMozilla').innerHTML = '<embed src="' + file + '" menu="false" quality="high"  id="flashbannerobj" name="flashbannerobj"   wmode="transparent" width="' + flashWidth + '" height="' + flashHeight + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
				return true;
			}
			*/
			try { 
			   mov.LoadMovie(0,file);
			   mov.play();
			}catch(er) {
				//alert("Flash Version 8 is Required!");
			} 
		}
	}
	/*********************************************/
	function setNav(area) {
		if(area== '') { area='home';}else if(area == 'cart' || area=='checkout') { area='clothing';}
		run = "parent.changeArea('" + area + "');";
		eval(run);
	}
	/*********************************************/
	function altHeight() {
		// Call altHeight() at the bottom of your IFRAME
		height = document.getElementById('getHeight').scrollHeight;	// Resize the iframe to this height
		// target the parent iframe and eval() your new height, otherwise you will get "undefined"
		// resizeIframe() is in the parent iframe and simply resets the height
		run = "parent.resizeIframe('" + height + "', 'content');";
		eval(run);
	}
	/*********************************************/		
	
	/*********************************************/		
	function jgetHeight() {	
		// Call jgetHeight() in the body onload
		// If you call jgetHeight in an image it seemes to kill all <img>s
		height = document.all.getHeight.scrollHeight;	// Resize the iframe to this height
		// target the parent iframe and eval() your new height, otherwise you will get "undefined"
		// resizeIframe() is in the parent iframe and simply resets the height
		run1 = 'window.parent.location.replace("javascript:resizeIframe';
		run2 = "('" + height + "', 'content')"; 
		run3 = ";";
		run4 = '");'
		
		eval(run1 + run2 + run3 + run4 );
	}
	/*********************************************/
	function resizeIframe(height, id) {
		if(height < 5) { height = 5; }
		document.getElementById(id).style.height = height;
		resetLayout();
	}
	/*********************************************/	
	function setClassName(objId, className) {
    	document.getElementById(objId).className = className;
	}
	/*********************************************/	
	function printImage( popupURL){

		return window.open( popupURL,"pop","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1" );
	}
	/*********************************************/	
	function fixImage(id) {
		if(is.ie) {
			document.getElementById(id).src = 'images/spacer.gif';
		}
	}
	/*********************************************/	
	function showHideLogin(mode, show) {
		if(mode == 'parent_hide') {
			document.getElementById('loginContainer').style.visibility = 'hidden';
		}else if(mode == 'parent_show') {
			document.getElementById('loginContainer').style.visibility = 'visible';
		}else if(mode == 'hide') {
			document.getElementById(show).style.visibility = 'visible';
			parent.showHideLogin('parent_hide');
		}else if(mode == 'show') {
			try  {
				document.getElementById(show).style.visibility = 'hidden';
			}catch(e) {}
			parent.showHideLogin('parent_show');
		}
	}
	
	
	function getEl(id) {
		return document.getElementById(id);
	}
	
	
	/*******************************************************
	* return a working call for the flash object
	*/
	function flashAccess(id) {
		if(navigator.appName.indexOf("Microsoft") != -1) {
			flash = window.eval(id);
		}else {
			flash = window.document.eval(id);
		}
		return flash;	
	}
	
	
	
/*********************************************
* Embed swf movies that retain API capabilities in IE (dont use the "SWFObject()")
*/
	function activeEmbed(src,id,height,width,divid,zindex) {
		if(!height) {
			height = '100%';
		}
		if(!width) {
			width = '100%';
		}
		
		if(divid) {
			embd = '<div id="'+ divid + '"><embed height="' + height + '" width="' + width + '" src="' + src + '" menu="false" quality="high"  name="' + id + '"  wmode="transparent"  align="middle"  type="application/x-shockwave-flash" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer"/></div>';
		}else {
			embd = '<embed height="' + height + '" width="' + width + '" src="' + src + '" menu="false" quality="high" id="' + id + '"  name="' + id + '"  wmode="transparent"  align="middle"  type="application/x-shockwave-flash" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer"/>';
		}
		
		objd = '<object height="' + height + '" width="' + width + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  id="' +  id + '" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" align="middle">';
			objd +=	'<param name="allowScriptAccess" value="sameDomain" />';
			objd +=	'<param name="movie" value="'+ src + '" />';
			objd +=	'<param name="menu" value="true" />';
			objd +=	'<param name="scale" value="noscale" />';
			objd +=	'<param name="quality" value="high" />';
			objd +=	'<param name="wmode" value="transparent" />';
			objd += embd;
		objd +=	'</object>';
		
		document.write(objd);
	}
	