	   var ie = (navigator.appName == 'Microsoft Internet Explorer');
	   var ie4 = (ie && parseInt(navigator.appVersion) >= 4);
	   var docom = (document.getElementById);
	   isNS = ((navigator.appName == "Netscape") && !(ie4 || docom));
	   
	//  Personalize values
		var persQty = false;
		
	//version = parseInt(navigator.appVersion);
	if (isNS) {
	   gLayerRef="document.layers";
	   gStyleSwitch="";

		window.captureEvents(Event.RESIZE);
		window.onresize = fixResize;
	}else{
	   gLayerRef="document.all";
	   gStyleSwitch=".style";
	}

	function fixResize(){
	   parent.display.location.reload();
	   //alert('paula');
	}


	function popupWinSize4(winurl){ // For Enlarge Image Popup
	   if(isNS){
	      newwin = window.open(winurl,"saksPopup","width=500,height=548,toolbar=no,location=no,scrollbars=no,resizable=yes,menubar=no,status=no");
	   } else {
	      newwin = window.open(winurl,"saksPopup","width=500,height=548,toolbar=no,location=no,scrollbars=no,resizable=no,menubar=no,status=no");
	   }
	}

	function popupWinSize2(winurl){ //FitAndCare Popup
	   newwin = window.open(winurl,"saksPopup","width=770,height=420,toolbar=no,location=no,scrollbars=yes,resizable=no,menubar=no,status=no");
	}

	function SetQTY(ID){
		if(document.getElementById(ID).value=="0"){
			document.getElementById(ID).value = "1";
		}
	}

	
	function setAddButton(form) {  //Display "Personalize and Add to Bag" button if Pers Qty > 1 (true), or just "Add to Bag" if Pers Qty = 0 (false).
		var hasPers = false;
		var i = 0;
		
		for (i=1; i<4; i++) {
			var currCheck = 'checkPers' + i;
			var currText = 'SaksSuggestqtyToBuy' + i;
			var hidCheck = 'hiddenCheckPers' + i;
			
			if (document.getElementById(currCheck)) {
				if (document.getElementById(currCheck).checked) {
					document.getElementById(currCheck).value = true;
					if (document.getElementById(currText).value > 0) {
						hasPers = true;						
					}
				} else {
					document.getElementById(currCheck).value = false;
				}
			}
		}
		
		if (!hasPers) {
			for (i=0; i < form.elements.length; i++) {
				var elem = form.elements[i];
				
				if (elem.type == "text" && elem.name == 'PERSONALIZE_ARRAY<>quantity') {
					if (elem.value > 0) {
						hasPers = true;
					}
				}
			}
		}	
		
		var plainAdd = document.getElementById('plainAdd');
		var persAdd = document.getElementById('persAdd');
		
		if (hasPers) {
			plainAdd.style.display = 'none';
			persAdd.style.display = '';
		} else {
			plainAdd.style.display = '';
			persAdd.style.display = 'none';
		}
	}

	function checkSaksSuggests () {
		var hasPers = false;
		var i = 0;
		
		for (i=0; i<3; i++) {
			var currCheck = 'checkPers' + i;
			var currText = 'SaksSuggestqtyToBuy' + i;
			var hidCheck = 'hiddenCheckPers' + i;
			
			if (document.getElementById(currCheck)) {
				if (document.getElementById(currCheck).checked) {
					document.getElementById(currCheck).value = true;
					if (document.getElementById(currText).value > 0) {
						hasPers = true;						
					}
				} else {
					document.getElementById(currCheck).value = false;
				}
			}
		}
		
		var plainAdd = document.getElementById('plainAdd');
		var persAdd = document.getElementById('persAdd');
		
		if (hasPers) {
			plainAdd.style.display = 'none';
			persAdd.style.display = '';
		} else {
			plainAdd.style.display = '';
			persAdd.style.display = 'none';
		}
	}

