<!-- BEGIN JAVASCRIPT CODE ----------------------------------------------------------\

	// Browser detection
	var browserIsMac = ((navigator.appVersion.indexOf("Macintosh") >= 0) || (navigator.appVersion.indexOf("Mac_") >= 0));
	var browserIsSafari = (navigator.appVersion.indexOf("Safari") >= 0);
	var browserIsMSIE = ((navigator.appName != "Netscape") || (navigator.appVersion.indexOf("MSIE") >= 0) || (navigator.appVersion.indexOf("Internet Explorer") >= 0));
	var browserIsWTV = (navigator.appVersion.indexOf("TV") > 0);
	var browserVersion = parseInt(navigator.appVersion);
	if (navigator.appVersion.indexOf(" 5.") >=0) { browserVersion = 5; }
	var allowRollover = false;
	if (browserVersion >= 3) allowRollover = true;
	if (browserIsMSIE && browserIsMac && (browserVersion == 3)) allowRollover = false;


	// Style sheet selection
	if (browserIsSafari || (browserIsMac && (browserVersion < 5))) {
		document.write('<link rel="stylesheet" type="text/css" href="http://www.mindfulgreetings.com/js/mac.css">');
	} else {
		document.write('<link rel="stylesheet" type="text/css" href="http://www.mindfulgreetings.com/js/win.css">');
	}


	// Variable declaration
	var buttonsLoaded = new Array();
	var formToClear;


	// yourstuffpopup event
	function yourstuffpopup() {
		window.open('', 'yourstuffpopup', 'width=640,height=400,scrollbars=yes,resizable=yes,menubar=no,toolbar=yes,location=yes,directories=no,status=yes');
	}


	// cardpopup event
	function cardpopup(shape) {
		var w, h;
		if (shape == "wide_2panel") {
			w = 424; h = 606;
		} else if (shape == "wide_1panel") {
			w = 424; h = 365;
		} else if (shape == "tall_2panel") {
			w = 596; h = 460;
		} else if (shape == "tall_1panel") {
			w = 350; h = 460;
		}
		w = window.open('', 'cardpopup_'+shape, 'width='+w+',height='+h+',scrollbars=yes,resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
		w.focus();
	}


	// bookpopup event
	function bookpopup(productID, imageWidth, imageHeight) {
		w = window.open('', 'bookpopup'+productID, 'width='+imageWidth+',height='+imageHeight+',scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
		w.focus();
	}


	// giftpopup event
	function giftpopup(productID, imageWidth, imageHeight) {
		w = window.open('', 'giftpopup'+productID, 'width='+imageWidth+',height='+imageHeight+',scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
		w.focus();
	}


	// buttonPreload event
	function buttonPreload(which) {
		if (allowRollover) {
			buttonsLoaded[which+'_active'] = new Image();
			buttonsLoaded[which+'_active'].src = '/images/global/buttons/'+which+'_active.gif';
			buttonsLoaded[which+'_inactive'] = new Image();
			buttonsLoaded[which+'_inactive'].src = '/images/global/buttons/'+which+'_inactive.gif';
		}
	}


	// buttonActive event
	function buttonActive(which,obj) {
		if (allowRollover) {
			document[obj].src = buttonsLoaded[which+'_active'].src;
		}
	}


	// buttonInactive event
	function buttonInactive(which,obj) {
		if (allowRollover) {
			document[obj].src = buttonsLoaded[which+'_inactive'].src;
		}
	}


	// addToYourStuff event
	function addToYourStuff(frm) {
		var iframePresent = 0;
		if (document.all) {
			if (document.all.yourstuff) {
				iframePresent = 1;
				frm.mode.value = "iframe";
			}
		} else if (document.layers) {
			if (document.layers['yourstuff']) {
				iframePresent = 1;
				frm.mode.value = "iframe";
			}
		} else if (document.getElementById) {
			iframePresent = 1;
			frm.mode.value = "iframe";
		}
		if (!iframePresent) {
			window.open('', 'yourstuff', 'width=200,height=100,scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
		}
		formToClear = frm;
		frm.submit();
		return false;
	}


	// clearForm event
	function clearForm() {
		if (formToClear) {
			for (i=1; i<=6; i++) {
				if (eval('formToClear.option'+i)) { eval('formToClear.option'+i+'.value = ""'); }
			}
			formToClear = null;
		}
	}

// END JAVASCRIPT CODE --------------------------------------------------------------/
// -->
