﻿<!--
		function ToggleImg(inName, inSrcA, inSrcB)
		{
			var x;
			for(x = 0; x < document.images.length; x++)
			{
				if(document.images[x].name.toLowerCase() == inName.toLowerCase())
				{
					if(inSrcA.substring(0, 1) != '/')
						inSrcA = '/' + inSrcA;
					if(inSrcB.substring(0, 1) != '/')
						inSrcB = '/' + inSrcB;
					
					if(document.images[x].src.toLowerCase().indexOf(inSrcA.toLowerCase()) >= 0)
						document.images[x].src = document.images[x].src.toLowerCase().replace(inSrcA.toLowerCase(), inSrcB);
					else if(document.images[x].src.toLowerCase().indexOf(inSrcB.toLowerCase()) >= 0)
						document.images[x].src = document.images[x].src.toLowerCase().replace(inSrcB.toLowerCase(), inSrcA);

					break;
				}
			}
		}

		function ProdCenterClick(inArg)
		{
			if(inArg == 'StyleHistory')
			{
				if($('ProdCenterDetails').style.display == 'block')
				{
					/* need to turn off details area */
					ToggleImg('imgarrowdetails', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
					$('ProdCenterDetails').style.display = 'none';
				}
				if($('ProdCenterStyleHistory'))
				{
					if($('ProdCenterStyleHistory').style.display == 'none')
					{
						/* need to turn ON styles history area */
						ToggleImg('imgarrowstylehistory', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
						$('ProdCenterStyleHistory').style.display = 'block';
					}
				}
				if($('ProdCenterReviews').style.display == 'block')
				{
					/* need to turn off styles history area */
					ToggleImg('imgarrowreviews', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
					$('ProdCenterReviews').style.display = 'none';
				}
			}
			else if(inArg == 'Details')
			{
				if($('ProdCenterDetails').style.display == 'none')
				{
					/* need to turn on details area */
					ToggleImg('imgarrowdetails', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
					$('ProdCenterDetails').style.display = 'block';
				}
				if($('ProdCenterStyleHistory'))
				{
					if($('ProdCenterStyleHistory').style.display == 'block')
					{
						/* need to turn off styles history area */
						ToggleImg('imgarrowstylehistory', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
						$('ProdCenterStyleHistory').style.display = 'none';
					}
				}
				if($('ProdCenterReviews').style.display == 'block')
				{
					/* need to turn off styles history area */
					ToggleImg('imgarrowreviews', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
					$('ProdCenterReviews').style.display = 'none';
				}
			}
			else if(inArg == 'Reviews')
			{
				if($('ProdCenterDetails').style.display == 'block')
				{
					/* need to turn off details area */
					ToggleImg('imgarrowdetails', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
					$('ProdCenterDetails').style.display = 'none';
				}
				if($('ProdCenterStyleHistory'))
				{
					if($('ProdCenterStyleHistory').style.display == 'block')
					{
						/* need to turn off styles history area */
						ToggleImg('imgarrowstylehistory', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
						$('ProdCenterStyleHistory').style.display = 'none';
					}
				}
				if($('ProdCenterReviews').style.display == 'none')
				{
					/* need to turn ON styles history area */
					ToggleImg('imgarrowreviews', 'arrows_active_lg.gif', 'arrows_off_lg.gif');
					$('ProdCenterReviews').style.display = 'block';
				}
			}
		}
		
		function AddReview(inProductId)
		{
			$('prodReviewsAddReview').toggle();
			$('ifprodReviewsAddReview').src = '/reviews/sign_in.asp?product_id=' + inProductId + '&style=' + js_style_number + '&sslmode=' + js_ssl_mode + '&j=' + Date.parse(Date());
		}
		
		function AllReviews(inProductId)
		{
			$('prodReviewsSeeAll').toggle();
			$('ifprodReviewsSeeAll').src = '/reviews/all_reviews.asp?product_id=' + inProductId + '&style=' + js_style_number + '&j=' + Date.parse(Date());
		}
		
		function CloseReviewDiv(inDivName)
		{
			var x;
			x = document.getElementById(inDivName);
			if(x)
				x.style.display = 'none';
		}
		function CloseThankyou()
		{
			$('prodReviewsThankyou').toggle();
		}
		
		function SwapCloseBtnImage(inArg, inState)
		{
			var x;
			for(x = 0; x < document.images.length; x++)
			{
				if(document.images[x].name == inArg)
				{
					if(inState == 'over')
						document.images[x].src = '/images/ratings/close_btn_over.gif';
					else
						document.images[x].src = '/images/ratings/close_button_txt.jpg';
					break;
				}
			}
		}
	
		var tmpImg;
		tmpImg = new Image();
		tmpImg.src = '/images/ratings/close_btn_over.gif';
// -->