// BarkTunes 2002-2003
// song info data indicator(English)
// songinfo_en.js

// setting section

var counter2 = 0;
var song_counter = 0;
var index = 0;

// function definition

function getSongDivSize(div)
	{
	if((window.opera) || (document.all))	// for IE4+ , Opera
		{
		div_width = document.all("songdata"+index).offsetWidth;
		}
		
	else if((document.getElementById) && (!document.all)) // for NN6+
		{
		
		div_width = document.getElementById("songdata"+index).offsetWidth;
		}
	}


function songdata_indicate(number,event)
	{
	songdata_vanishing(number);
	counter2 = 0;
	getSongDivSize();
		
	if((window.opera) || (document.all))	//for IE4+ , Opera
		{
		document.all("songdata"+number).style.pixelLeft = 210;
		document.all("songdata"+number).style.pixelTop = document.body.scrollTop + 70;
		document.all("songdata"+number).style.visibility='visible';
		index = number;
		songdata_wipe_on();
		}
		
	else if((document.getElementById) && (!document.all)) // for NN6+
		{
		x_div=event.pageX;
		y_div=event.pageY;
		document.getElementById("songdata"+number).style.left = 210;
		document.getElementById("songdata"+number).style.top = window.pageYOffset + 70;
		document.getElementById("songdata"+number).style.visibility='visible';
		index = number;
		songdata_wipe_on_nn();
		}
	}

function songdata_vanishing(number)
	{
	for(i=0; i<song; i++)
		{
		if(number!=i)
			{
			if((document.getElementById) && (!document.all)) // for NN6+
				document.getElementById("songdata"+i).style.visibility="hidden";
				
			else if(document.all) // for IE4+
				document.all("songdata"+i).style.visibility="hidden";
			}
		}
	return;
	}
	
function songdata_wipe_on()
	{
	if(counter2 < div_width)
		{
		counter2 += 50;
		document.all("songdata"+index).style.pixelWidth = counter2;
		setTimeout("songdata_wipe_on()",1);
		}
	}

function songdata_wipe_on_nn()
	{
	if(counter2 < div_width)
		{
		counter2 += 100;
		document.getElementById("songdata"+index).style.width = counter2;
		setTimeout("songdata_wipe_on_nn()",1);
		}
	}

function datalink_write()
	{
	document.write('&nbsp;<a href="javascript:void(0);" title="Pop up song data" onClick="songdata_indicate(' + song_counter + ',event);" onKeyPress="songdata_indicate(' + song_counter + ',event);"><img class="button" width="18" height="18" src="../gif/data.gif" alt="SongData">Pop up song data<\/a>');
	song_counter++;
	}

function vanisher_write()
	{
	document.write ('<p class="textend"><a href="javascript:void(0);" onClick="songdata_vanishing();" onKeyPress="songdata_vanishing();" accesskey="v"><img class="button" width="20" height="20" src="../gif/close.gif" alt="CloseBox">Close this box</a></p>')
	}

