// You must load prototype.lite.js and moo.fx.js before you can use these functions

function tooltipIn(id) {
	var fadeIn = new fx.Opacity(id, {duration:1}); 
	fadeIn.custom(.01,1);
}

function tooltipOut(id) {
	var fadeOut = new fx.Opacity(id, {duration:1});
	fadeOut.custom(1,.01);
}

function flyBubble(bubbleID) {

    var TOP_Y = -160;
    var yPos = TOP_Y + (18 * bubbleID);
    document.getElementById('deviceImage').src = popDevice[bubbleID][0].src;
    document.getElementById('bubbleBox').className = 'dev_tt';
    document.getElementById('bubbleBox').style.zIndex = 10000;
    document.getElementById('bubbleBox').style.top = yPos + "px";

}

function crashBubble() {

    document.getElementById('bubbleBox').className = 'bubbleBox';

}

function loadNewDevices() {

    var newDevices = document.getElementById("newDevices");

    for (var i = 0; i < popDevice.length; i++) {
        //var deviceName = popDevice[i][1].split(";")[1]; //commented by Deepak
        //var deviceUrl = popDevice[i][1].split(";")[0];  //commented by Deepak
		var deviceName = popDevice[i][1].split("|")[1];
        var deviceUrl = popDevice[i][1].split("|")[0];

        newDevices.innerHTML += "<li><a onmouseover=flyBubble('" + i + "') onmouseout=crashBubble() href='" + deviceUrl + "'>" + deviceName + "</a></li>";
    }
        
}