/* Modify the values below to suit your needs --> */
var imagePathUrl = 'http://www.enkeladress.com/images/';
var imageButtonFileName = 'enkeladress_circle.png';
var imageButtonDownFileName = 'enkeladress_circle_down.png';
var closeButtonFileName = 'enkeladress_circle_close.png'; 
/* <-- End modify */ 


var siteArray = [];
var buttonElement = null;
var menuElement = null;

function addSite(siteUrl, siteTitle) 
{
 var site = [siteTitle, siteUrl];
 siteArray.push(site);
} 
function createRingImage()
{ 
 buttonElement = document.createElement('img');
 buttonElement.src = imagePathUrl + imageButtonFileName; 
 buttonElement.onmouseover = function() { hoverRingImage(buttonElement); };
 buttonElement.onmouseout = function() {  unHoverRingImage(buttonElement); }
 buttonElement.style.position = 'fixed';
 buttonElement.style.left = '0px';
 buttonElement.style.bottom = '0px';
 buttonElement.style.zIndex = '2048';
 document.body.appendChild(buttonElement);
}

function createMenu()
{
 menuElement = document.createElement('div');
 html = '<b>Related Sites<img onclick="hideMenu();" style="float:right; position:absolute; right:0px;" src="' + imagePathUrl + closeButtonFileName + '"/></b><hr style="border-style:none; border-top-style:solid; '+
        'border-bottom-style:solid; border-width:1px; border-bottom-color:white; border-top-color:#989898; " />';
 
 for  (var siteIx = 0; siteIx < siteArray.length; siteIx ++) 
 {
	html = html.concat('<a target="_BLANK" href="' + siteArray[siteIx][1] + '" title="External Link">' + siteArray[siteIx][0] + '</a><br />');	
 }
 menuElement.innerHTML = html;
 menuElement.style.position = 'fixed';
 menuElement.style.left = '0px';
 menuElement.style.bottom = '32px';
 menuElement.style.backgroundColor = '#e3e3e3';
 menuElement.style.fontFamily = 'tahoma';
 menuElement.style.fontSize = '9pt';
 menuElement.style.padding = '4px 32px 10px 10px';
 menuElement.style.borderStyle = 'solid';
 menuElement.style.borderWidth = '1px';
 menuElement.style.borderLeftColor = '#989898';
 menuElement.style.borderBottomColor = '#989898';
 menuElement.style.borderTopColor = '#c7c7c7';
 menuElement.style.borderRightColor = '#c7c7c7';
 menuElement.style.display = 'none';	
 menuElement.style.zIndex = '2048';
 document.body.appendChild(menuElement);
 //menuDiv.focus();
}

function displayMenu()
{ 
  menuElement.style.display = 'block';
}

function hideMenu()
{
 menuElement.style.display = 'none';
}

function unHoverRingImage(ringImg) {
 ringImg.src = imagePathUrl + imageButtonFileName;
}

function hoverRingImage(ringImg)
{ 
 ringImg.src =  imagePathUrl + imageButtonDownFileName;
 displayMenu();
}

function initialize()
{
 createRingImage();
 createMenu();  
}

/* Modify the addSite calls below to suit your needs  --> */
addSite('http://www.enkeladress.com', 'EnkelAdress Home');
addSite('http://www.droidstop.org', 'DroidStop.Org');
addSite('http://www.androidvideo.mobi', 'AndroidVideo');
/* <-- End modify */
initialize();


