
function RemoveFormatStrings(TargetElement, FormatString) {
  if (TargetElement.value == FormatString) {
    TargetElement.value = "";
  }

  TargetElement.select();
}

function gemtext(gemname)
{
var gemlist = [];

gemlist["Agate"] = "This quartz belongs to the Chalcedony family of gems and comes in a wide range of colors and is often banded/striped.  It forms in concentric layers.  Each individual agate forms by filling a cavity in host rock.  This typically results in the concentric band, like the rings of a tree trunk.  The bands sometimes look like eyes, fanciful scallops, or even a landscape with trees.  Agate was highly valued as a talisman or amulet in ancient times.  It was said to quench thirst and protect against fever.  Persian magicians used agate to divert storms.  Its metaphysical properties are said to include fostering love, abundance, wealth, good luck, longevity, acceptance, courage, protection, harmony, generosity, strength, security and appreciation of nature.";

gemlist["Amazonite"] = "Named after the Amazon river, this opaque blue-green stone owes its unique color and appearance to the presence of lead.  It can sometimes be confused with turquoise or jade.  Its metaphysical properties include the development of trust in relationships and reducing self-damaging and self-destructive behavior.  It is said to give strength in tough decisions and dispel negative energy.";

gemlist["Amethyst"] = "This semi-precious gemstone is a member of the crystal quartz or silica group, which are the most common minerals on our planet.  It ranges in color from light lavender to dark purple.  Its metaphysical properties are said to include boosting productions of hormones, calming nerves, and helping with insomnia, to name a few.  Amethyst is also said to be a crystal of protection and selflessness.";

gemlist["Ametrine"] = "This semi-precious gemstone is a quartz crystal that is part amethyst and part citrine.  It is found naturally, and is not the result of heat treatment or any other enhancement. ";

gemlist["Aventurine"] = "This is a largely green crystal that may have brown overtones due to inclusions of fuschite crystals.  Aventurine is typically jade-like green in color and opaque.  It is a metamorphic rock, meaning that it's made up of more than one mineral.  In this case, aventurine is mainly quarter and other crystals, usually green mica.  It is sometimes confused with jade and improperly called Indian Jade.  Aventurine may fade in the sun.  Its metaphysical properties are said to include protecting the heart Chakra, acting as a shield against 'energy vampires' who like to tap in and use the energy of other people.  It is also said to help to balance out your emotions, and stimulate opportunity and leadership skills.";

gemlist["Azurite"] = "An azure blue vitreous mineral of basic copper carbonate produced by weathering of copper ore deposits.  Also called chessylite.  Azurite is normally associated with cooper ore and often occurs with malachite.  Azurite was originally used in ancient cultures as a pigment.";

gemlist["Calcite"] = "Calcite gets its name from 'chalix,' the Greek word for lime.  It is one of the most common minerals on the fact of the Earth.  Calcite can form rocks of considerable mass and constitutes a significant part of all three major rock classification types.  Its color is extremely variable, but generally is white or colorless or with light shades of yellow, orange, blue, pink, red, brown, green, black and gray.  Occasionally iridescent.";

gemlist["Carnelian"] = "A finely-grained form of quartz mineral, carnelian has a uniformly reddish-brown color that shifts to a deeper red when left in sunlight.  It is a member of the chalcedony family, which derives any color from the presence of iron.  In ancient cultures, carnelian was a useful material for making seals since wax would not adhere to its polished surface.   Its metaphysical properties are said to include increased ambition and drive, promoting confidence and personal power, motivation, concentration and boldness, to name a few.";

gemlist["Charoite"] = "Russia discovered this stone in 1978 in the Murun mountains in Yakutia.  It is named after the nearby Charo River.  It is an opaque stone that has a color range from a light pinkish lavender to dark purple with wild swirls of fibrous material.  Its metaphysical properties are said to include boost productions of hormones, calm the nervous system, insomnia, the digestive tract and negate overindulgence, grief and anger.";

gemlist["Flourite"] = "Flourite is a banded gemstone that comes in every color of the rainbow.  It is often found in conjunction with calcite, and its color can be extremely variable ranging from purple, red, pink, yellow, green, blue and sometimes black.  Often the colors are banded and strongly fluorescent (blue or violet).  Fluorite, having a hardness of only 4, should be handled gently as it is not subject to abuse. ";

gemlist["Garnet"] = "This semi-precious gemstone comes in a variety of colors, the most popular being red, but it can also be seen in shades of green (also known as tsavorite or tsavolite), a tender to intense yellow, a fiery orange and some fine earth-coloroured nuances.  The only color it cannot offer is blue.  Garnets have a hardness of 7 to 7.5 on the Mohs scale.  Garnets have been known to man for thousands of years.  Noah, it is said, used a garnet lantern to help him steer his ark through the dark night.  Garnets were often found in jewelery from early Egyptian, Greek and Roman times.";

gemlist["Hematite"] = "Hematite is a mineral, colored black to steel or silver-gray, brown to reddish brown, or red.  It is mined as the main ore of iron.  The name hematite is derived from the Greek word for blood because it can be red, as in rouge, a powdered form of hematite. While the forms of hematite vary, they all have a rust-red streak.  Hematite is harder than pure iron, but much more brittle.  It has a hardness of 5.5 to 6.5 on the Mohs scale.  The mineral can precipitate out of water and collect in layers at the bottom of a lake, spring, or other standing water.  Hematite can also occur without water, however, usually as the result of volcanic activity.  According to metaphysicists, it is believed to help balance the emotions and be calming stone.";

gemlist["Howlite"] = "This opaque stone naturally occurs in a white or delicately black-veined state, often in masses weighing two kilograms or more.  It is often stained blue to imitate turquoise.  The stone is named after the discoverer, Hemry How, a geologist from Nova Scotia.  Howlite is found in Canada (Nova Scotia, Newfoundland, New Brunswick) and the United States (California).";

gemlist["Jade"] = "This gemstone comes in many fine nuances of green, but also in shades of white, grey, black, yellow, and orange and in delicate violet tones.  The stone has been known to Man for some 7000 years.  In prehistoric times, it was esteemed for its toughness, which made it an ideal material for weapons and tools.  In 3000 B.C., jade was known in China as 'yu,' the 'royal gem.'  Jade was used not only for the finest objects and cult figures, but also in grave furnishings for high-ranking members of the imperial family.  This stone was also honoured and esteemed by the Mayas, Aztecs and Olmecs of Central America.  Forms of jade include jadeite (a light green stone), nephrite (typically a dark green stone, also called greenstone), and lemon jade (a transparent greenish yellow sometimes called 'new jade').";

gemlist["Jasper"] = "Jasper is an ornamental rock composed mostly of opaque chalcedony, microcrystaline quartz, in association with other minerals which give it colorful bands and patterns.  Jasper was a favorite gem in the ancient world; its name can be traced back in Hebrew, Assyrian, Persian, Greek and Latin.  Its color palate ranges from shades of red, tan, brown, green and yellow.  Jasper is often named according to its pattern; landscape jasper, the most popular, offers a small panorama in stone.  Ribbon jasper, picture jasper, and orbicular jasper are the names of other varieties.";

gemlist["Labradorite"] = "This is a mineral that can produce a colorful play of light across cleavage planes and in sliced sections called labradorescence.  The usually intense colors range from typical blues and violets through greens, yellows and oranges.  Some rare specimens display all these colors simultaneously.  The color display results from lamellar intergrowths inside the crystal.  Labradorite is a member of the plagioclase series of minerals.  It has a hardness of 6.0 to 6.5 on the Mohs scale.";

gemlist["Lapis Lazuli"] = "This is a deep blue gemstone with golden inclusions of pyrites which shimmer like little stars.  It's name is derived from 'lapis,' the Latin word for stone, and 'Azula,' which comes from the Arabic and means blue.  Lapis is regarded by many people around the world as the stone of friendship and truth.  The blue stone is said to encourage harmony in relationships and help its wearer to be authentic and give his or her opinion openly.";

gemlist["Malachite"] = "A banded, onyx-like green mineral, malachite is semi-medium hard and was once fitted in tables, columns, and vase mosaics for czarist weddings in Russia.  Due to its lovely appearance as a pale and dark green material, malachite has long been used as an ornamental stone.";

gemlist["Obsidian"] = "Obsidian is a volcanic glass formed from lava which cools so quickly that crystals do not have time to grow.   According to Pliny, the name Obsidian comes from Obsidius who first discovered it in Ethiopia.  This mineral is found in vastly varying colors.  Historically, Obsidian was used in an Ancient Egyptian ceremony where the cutting of dead bodies of Kings and Priests was practiced.  This same ceremony was found with the Guanchos in the Canary Islands.  Australian Aborigines believed the stone to bring good fortune, protecting them from sickness.  Native Americans thought it to be a stone of great power and have used it to makes tools, arrowheads, spears, knife blades and mirrors.  It is also thought to be a very grounding stone, that is, it can help you to integrate spiritual experiences into everyday life.  Some say that it will improve eyesight.  Obsidian comes in a variety of forms.  Mahogony Obsidian is a brown mahogony color combined with streaks of black.  Snowflake Obsidian is black and opaque with the appearance of whitish 'snowflakes.'";

gemlist["Pearls"] = "Pearls are organic gems created when an oyster covers a foreign object with beautiful layers of nacre.  Today, pearls are cultured by Man.  Shell beads are placed inside an oyster and the oyster is returned to the water.  When the pearls are later harvested, the oyster has covered the bead with layers of nacre.";

gemlist["Quartz"] = "Quartz is a mineral, also known as Silica.  It comes in a variety of colors, most notably rose quartz (a soft pink generally cloudy or milky in appearance) and smokey quartz (a rarer and more expensive form of quartz, its color ranges from gray to warm brown, light and clear  to an almost 'solid' looking black/brown).";

gemlist["Rhodochrosite"] = "Named from the Greek 'rose-colored,' rhodochrosite is a remarkable rose-pink colored by manganese.  In the massive form, it is found along with calcite and siderite, and forms banded stones, often in the form of stalactites.  It also forms as small crystals, which are very rare and seldom cut.  Ranging in hue from gray and brown to pink and deep red, rhodochrosite is usually found within medium-temperature ore veins.";

gemlist["Sodalite"] = "One of the components of lapis lazuli, sodalite occurs in gray, red, yellow, green, and blue varieties, albeit only the opaque dark blue stones are commonly used.  It often includes white streaks and flecks of calcite.  The stone is said to foster knowledge, learning proficiency, communication and wisdom, and is good for healing rifts in partnerships and relationships.";

gemlist["Tigerseye"] = "An opaque form of included quartz that, when beaded and polished, is streaked by spindle-like bands of light.  These bands of light are a result of the presence of compact fibers of quartz that have replaced the original asbestos.  Albeit typically of a brown or brownish-yellow to a blue or blue-green hue, heated yellow-brown tigersyes may take on a reddish color due to oxidation of iron present inside the gemstone.  It has a hardness of 7.0 on the Mohs scale.  Tigerseye is said to be a very grounding stone that promotes balance and strength to get through difficult phases of life.";

gemlist["Turquoise"] = "Turquoise is a copper aluminum phosphate with a hardness of 6.  In Nature, it occurs in the whole range of hues from sky blue to grey-green, and it is mostly found in places where there is a high concentration of copper in the soil.  The blue color is created by copper, the green by bivalent iron and a certain amount of chrome.  Often, the material has veins or blotches running through it which are brown, light grey or black, depending on where it was found.";

gemlist["Unakite"] = "A green opaque gemstone mixed with patches of salmon pink and/or brick-red.  This stone occurs as parts of granitic masses - commonly small masses such as dikes and lenses - that have undergone epidotization with the epidote representing diverse alteration and/or replacement processes.  Unakite was named for occurrences in the Unaka rnage of the Great Smoky region in the Blude Ridge ";

return gemlist[gemname];
}

	
	var dhtmlgoodies_tooltip = false;
	var dhtmlgoodies_tooltipShadow = false;
	var dhtmlgoodies_shadowSize = 4;
	var dhtmlgoodies_tooltipMaxWidth = 200;
	var dhtmlgoodies_tooltipMinWidth = 100;
	var dhtmlgoodies_iframe = false;
	var tooltip_is_msie = (navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('opera')==-1 && document.all)?true:false;
	
	function showTooltip(e,tooltipTxt)
	{
		
		var bodyWidth = Math.max(document.body.clientWidth,document.documentElement.clientWidth) - 20;
	
		if(!dhtmlgoodies_tooltip){
			dhtmlgoodies_tooltip = document.createElement('DIV');
			dhtmlgoodies_tooltip.id = 'dhtmlgoodies_tooltip';
			dhtmlgoodies_tooltipShadow = document.createElement('DIV');
			dhtmlgoodies_tooltipShadow.id = 'dhtmlgoodies_tooltipShadow';
			
			document.body.appendChild(dhtmlgoodies_tooltip);
			document.body.appendChild(dhtmlgoodies_tooltipShadow);	
			
			if(tooltip_is_msie){
				dhtmlgoodies_iframe = document.createElement('IFRAME');
				dhtmlgoodies_iframe.frameborder='5';
				dhtmlgoodies_iframe.style.backgroundColor='#FFFFFF';
				dhtmlgoodies_iframe.src = '#'; 	
				dhtmlgoodies_iframe.style.zIndex = 100;
				dhtmlgoodies_iframe.style.position = 'absolute';
				document.body.appendChild(dhtmlgoodies_iframe);
			}
			
		}
		
		dhtmlgoodies_tooltip.style.display='block';
		dhtmlgoodies_tooltipShadow.style.display='block';
		if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='block';
		
		var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
		if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
		var leftPos = e.clientX + 10;
		
		dhtmlgoodies_tooltip.style.width = null;	// Reset style width if it's set 
		dhtmlgoodies_tooltip.innerHTML = tooltipTxt;
		dhtmlgoodies_tooltip.style.left = leftPos + 'px';
		dhtmlgoodies_tooltip.style.top = e.clientY + 10 + st + 'px';

		
		dhtmlgoodies_tooltipShadow.style.left =  leftPos + dhtmlgoodies_shadowSize + 'px';
		dhtmlgoodies_tooltipShadow.style.top = e.clientY + 10 + st + dhtmlgoodies_shadowSize + 'px';
		
		if(dhtmlgoodies_tooltip.offsetWidth>dhtmlgoodies_tooltipMaxWidth){	/* Exceeding max width of tooltip ? */
			dhtmlgoodies_tooltip.style.width = dhtmlgoodies_tooltipMaxWidth + 'px';
		}
		
		var tooltipWidth = dhtmlgoodies_tooltip.offsetWidth;		
		if(tooltipWidth<dhtmlgoodies_tooltipMinWidth)tooltipWidth = dhtmlgoodies_tooltipMinWidth;
		
		
		dhtmlgoodies_tooltip.style.width = tooltipWidth + 'px';
		dhtmlgoodies_tooltipShadow.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
		dhtmlgoodies_tooltipShadow.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';		
		
		if((leftPos + tooltipWidth)>bodyWidth){
			dhtmlgoodies_tooltip.style.left = (dhtmlgoodies_tooltipShadow.style.left.replace('px','') - ((leftPos + tooltipWidth)-bodyWidth)) + 'px';
			dhtmlgoodies_tooltipShadow.style.left = (dhtmlgoodies_tooltipShadow.style.left.replace('px','') - ((leftPos + tooltipWidth)-bodyWidth) + dhtmlgoodies_shadowSize) + 'px';
		}
		
		if(tooltip_is_msie){
			dhtmlgoodies_iframe.style.left = dhtmlgoodies_tooltip.style.left;
			dhtmlgoodies_iframe.style.top = dhtmlgoodies_tooltip.style.top;
			dhtmlgoodies_iframe.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
			dhtmlgoodies_iframe.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';
		
		}
				
	}
	
	function hideTooltip()
	{
		dhtmlgoodies_tooltip.style.display='none';
		dhtmlgoodies_tooltipShadow.style.display='none';		
		if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='none';		
	}
	

