var thepos;
var theimg;
var xml;

function hideWaterFall(pos)
{
        document.getElementById(pos).style.visibility='hidden';
        thepos=false;
        theimg=false;
}

function showpicture()
{
        if (xml.readyState==4 && thepos)
        {
                document.getElementById(thepos).style.visibility='visible';
                return true;
        }
}

function showWaterFall(pos,img)
{
		if (img.indexOf(".jpg") == -1 )
			img=img+".jpg";
        if (img == theimg)
              return true;
        thepos=pos;
        theimg=img;
        try
        {
               xml = new XMLHttpRequest();
        }
        catch(e)
        {
                try
                {
                        xml = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e)
                {
                        try
                        {
                                xml = new ActiveXObject("Microsoft.XMLHTTP");
                        }
                        catch (e)
                        {
                                document[thepos].src="http://www.gowaterfalling.com/waterfalls/images/thumbs/"+theimg;
                                document.getElementById(thepos).style.visibility='visible';
                                return true;
                        }
                }
        }
    try
    {
        xml.open("GET","http://www.gowaterfalling.com/waterfalls/images/thumbs/"+img,true);
        xml.onreadystatechange=showpicture;
        xml.send(true);
        document[thepos].src="http://www.gowaterfalling.com/waterfalls/images/thumbs/"+theimg;
    }
    catch (e)
    {
          document[thepos].src="http://www.gowaterfalling.com/waterfalls/images/thumbs/"+theimg;
          document.getElementById(thepos).style.visibility='visible';
     }
}


function hideInfo(pos)
{
	document.getElementById(pos).style.visibility='hidden';
}

function showInfo(pos,info)
{
	document.getElementById(pos).style.visibility='visible';
	document.getElementById(pos).innerHTML=
		document.getElementById(info).innerHTML;
}

function showInfo2(pos,info)
{
	document.getElementById(pos).style.visibility='visible';
	document.getElementById(pos).innerHTML=
		"<div style='border:2px double'>" +
// <a href='#' onClick='document.getElementById("
//			+'"'+pos+'"'+
//			").style.visibility="+'"hidden";'+"'>Close</a></div><div style='overflow:auto'>" + 
	document.getElementById(info).getAttribute("info")+"</div>";
}





