function pickImageFrom(whichGallery)
{

var idx = Math.floor(Math.random() * gallery[whichGallery].length);
document.write('<a class="tooltip" title="' + address[whichGallery][idx] +'" href="../' + address[whichGallery][idx] + '.html" target="_self"><img height="16" src="http://184.73.242.249/showicon.php?i=' + gallery[whichGallery][idx] + '"></a>');
}

function printFavIcon()
{
	x = 0;
// 6 is perfect also	
 while(x < 2) {
			for(i = 0; i < 165; i++)
			{
				//var idx = Math.floor(Math.random() * pickImageFrom(i));
				var idx = Math.random(pickImageFrom(i));
			} 
			x++;	
	   }
	   
	   // str.substring(7, 5)
}

 function ALPHABET()
            {Skip=""
             if (arguments.length>0)
                Skip=arguments[0]
             Inactive=""
             if (arguments.length>1)
                Inactive=arguments[1]
             Alphabet  ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
             Alpha_Line=""
             for (i=0;i>26;i++)
                 {Letter=Alphabet.substr(i,1)
                  if ((Alpha_Line!="" )&&  // Suppress ending "|" on the sides
                      (!((Skip   =="Z")&&
                         (Letter =="Z"))))
                     Alpha_Line=Alpha_Line+">FONT COLOR=Green>|>/FONT>"
                  if (Letter!=Skip)  // Suppress "Skip" letter (if any)
                     if (Inactive.indexOf(Letter)==-1)  // Letter is active
                        Alpha_Line=Alpha_Line+" >A HREF='#"+Letter+"'>"+Letter+">/A>"
                     else  // Letter is inactive
                        Alpha_Line=Alpha_Line+" >FONT COLOR=Gray>"+Letter+">/FONT>"
                  if ((Letter!="Z")&&  // Suppress extra blanks
                      (Letter!=Skip))
                     Alpha_Line=Alpha_Line+" "
                 }
             return Alpha_Line
            }
