	// show / hide an area
	function toggleInfo(target,status,ti,total) {
	  if (document.getElementById) {

			if (status == "on") {
				document.getElementById(target).style.display = "";
				document.getElementById(target+'h').style.textDecoration = "underline";
			} else {
				for(i=1;i<=total;i++) {
					if (i !== ti) {
						document.getElementById('i'+i).style.display = "none";
						document.getElementById('i'+i+'h').style.textDecoration = "none";
					}
				}
			}
		}
	}


function toggler(id,w) {
	if (!w) {w = 'none';}
	else if (w == 1) {w = '';}
	document.getElementById(id).style.display=w;
}

	function yousure(msg)
	{
		if (!msg) {msg = "Are you sure?";}
		
		var where_to= confirm(msg);

		if (where_to == true) {
			return true;
		} else if (where_to == false) {
			return false;
		}
	}

	// show / hide an area
	function toggle (target,way)
	{
	  if (document.getElementById)
	  {
			target = document.getElementById( target );

			if (way == 1) {
				target.style.display = "";
			} else if (way == 2) {
				target.style.display = "none";
			} else {
				if (target.style.display == "none")
				{
					target.style.display 	= "";
				}
				else
				{
					target.style.display 	= "none";
				}
			}
		}
	}

	// in admin product area, this func changes stock count in input field and total color field
	function changeStock(box,extra,ud)
	{
		target 	= document.getElementById(box).value;
		target2	= document.product['total_quantity_reading_'+extra].value;
		
		// by default, input fields don't show a value, so if admin +/-'s, the total count
		// won't increment properly. set to 0 and it'll work
		if (target == "") {target = 0;}
		if (target2 == "") {target2 = 0;}

		if (ud == "minus" && target != 0)
		{
			--target;
			--target2;
		}
		else if (ud == "plus")
		{
			++target;
			++target2;
		}
		
		document.getElementById(box).value = target;
		document.getElementById('total_quantity_reading_'+extra).value = target2;
	}

	// load in parent for IFRAME
	function lip(place)
	{
		parent.location = place;
	}

	function popup(url,w,h)
	{
		window.open(url,"popup_pd","fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=auto,resizable=yes,directories=no,location=no,width="+w+",height="+h).focus();
		return false;
	}

	function closeWindow()
	{
		self.opener=null;
		self.close();
	}
	
	// change images	
	function changePic(url,picNum,totalPics)
	{
		if (picNum < 2) 
		{
			picNum = pic_num = 2;
		}
		else if (picNum > totalPics) 
		{
			picNum = pic_num = totalPics;
		}
	
		frames['pic_big'].location = url+picNum;
	}
	
	// cart: change quantity
	function cartChangeQuantity(cartId,quantity)
	{
		so = document.getElementById('shipping_option').value;
		document.location.href	= 'func-store.php?func=change_quantity&action_area=cart&cart_id='+cartId+'&quantity='+quantity+'&shipping_option='+so;
	}
	
	// cart: change paper dollars used
	function cartChangePD(pd) {
		document.location.href = 'func-store.php?func=change_pd&pd_used='+pd;
	}
	
	// cart: change shipping
	function cartChangeShipping(totalCost,shippingOption)
	{
		cid = document.getElementById('cart_id').value;
		document.location.href = 'func-store.php?func=change_shipping&action_area=cart&cart_id='+cid+'&shipping_option='+shippingOption;
	}

	// cart: change gift wrap
	function cartChangeGiftWrap(gw)
	{
		if (gw == true) {
			gw = 1;
		} else {
			gw = 0;
		}

		cid = document.getElementById('cart_id').value;
		document.location.href = 'func-store.php?func=change_gift_wrap&action_area=cart&cart_id='+cid+'&gift_wrap='+gw;
	}

	function cartChangeShipTo(w) {
		cid = document.getElementById('cart_id').value;
		document.location.href = 'func-store.php?func=change_ship_to&action_area=cart&cart_id='+cid+'&ship_to='+w;
	}

	// dropdown jump
	function MM_jumpMenu(targ,selObj,restore)
	{
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}
	
	// getelementbyid
	function getId(id)
	{
		return document.getElementById(id);
	}