	var img_array = new Array();
	var species_array = new Array("Dipni", "Oukin", "Drym", "Hifflo", "Kassegat", "Pinixy");
	// Preloading species popup images
      	for (i=0;i<6;i++) {
                img_array[species_array[i]] = new Image(403, 600);
                img_array[species_array[i]].src = "/images/gameguide/" + "species" + species_array[i] + "Popup.png";
      	}

	function close_popup(id) {
        document.getElementById(id).style.display = "none";
        }

        function close_species_popup(id) {
               document.getElementById(id).style.display = "none";
                for (i in species_array) {
                        document.getElementById(species_array[i]).className = species_array[i] + "_btn";
                }
        }


        var species = new Array();
        species["Dipni"] = "<b>Dipni</b><br />Dipnis are timid and reserved creatures, constantly wary and easily startled.  They get especially nervous around sharp objects and have a tendency to dart away and hide at the slights provocation.  Despite this, Dipnis are still affectionate and shyly inquisitive.  When happy, they make cute gurgling noises in their throats.";
        species["Drym"] = "<b>Drym</b><br />Dryms are loved for their perky, bright personalities.  Their curious nature and their predisposition for mischief give them a reputation for being troublemakers, but they are more a source of amusement than annoyance.  Dryms love shiny things and have a keen sense of smell that allows them to track down almost anything!";
        species["Hifflo"] = "<b>Hifflo</b><br />Hifflos are sweet, affectionate Petpets.  Though they usually like to relax in the shade, they can run very fast for short distances.  Despite their appearance, Hifflos possess great grace and a love for music, making them terrific dancers.  For those musically inclined, Hifflos are ideal Petpets.  It is said that a good song can cure any Hifflo!";
        species["Kassegat"] = "<b>Kassegat</b><br />Kassegats are very intelligent and clever. Originating from lush jungle areas, they like to spend most of their time relaxing and eating different kinds of jungle fruit, but these agile Petpets also love to climb around and explore!<br /><br />";
        species["Oukin"] = "<b>Oukin</b><br />Though Oukins are usually tranquil creatures, they can be very quick if the occasion calls for it, and emit a high-pitched shriek when agitated.  With their sensitive ears, Oukins can hear other Oukins from far away and come to each other's aid whenever there is trouble.  Take our word for it; you don't ever want to work up an Oukin!";
        species["Pinixy"] = "<b>Pinixy</b><br />Despite their small size, Pinixys are active and athletic.  These noisy and rambunctious Petpets are almost always engaged in some physical activity, whether it is running, jumping, wrestling, or climbing.  If your companion is a Pinixy, make sure you can keep up with them!";


        function open_popup_screenshot(el, id, offsetX, offsetY, num) {
                var el_id = document.getElementById(id);
                document.getElementById("tooltip_popup").style.display = "none";
                close_species_popup("tooltip_popup_sml");
                el_id.style.display = "block";
                el_id.style.left =  findPosX(el) + offsetX + "px";
                el_id.style.top =  findPosY(el) + offsetY + "px";
                document.getElementById("tooltip_popup_img").src = "/images/gameguide/screenshot" + num + "_lrg.jpg";
        }
        function open_popup_species(el, id, offsetX, offsetY, num) {

                var el_id = document.getElementById(id);
                document.getElementById("tooltip_popup").style.display = "none";
                close_species_popup("tooltip_popup_sml");
		document.getElementById("species_character").src = "";
	
		document.getElementById("species_character").src = img_array[num].src;
                el_id.style.left =  findPosX(el) + offsetX + "px";
                el_id.style.top =  findPosY(el) + offsetY + "px";

                        var class_ov = num + "_btn";

                        for (i in species_array) {
                                if (!(species_array[i] == num)) {
                                        document.getElementById(species_array[i]).className = species_array[i] + "_btn";

                                }
                        }
                        document.getElementById('species_desc').innerHTML = species[num];
                        document.getElementById(num).className = class_ov + " " + class_ov + "_clicked";

		el_id.style.display = "block";
        }

