
var inNotes=0;
var initNotesDone=0;

//function initNotes()
{
	Amount=20;
	Ypos=new Array();
	Xpos=new Array();
	HSpeed=new Array();
	VSpeed=new Array();
	Gravity=new Array();
	
	document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
	for (i = 0; i < Amount; i++)
	{
	 document.write('<img id="si'+i+'" src="fta/pic/note.gif" style="visibility:hidden; position:absolute;top:0px;left:0px">');
	}
	document.write('</div></div>');
	
	WinHeight=window.document.body.clientHeight;
	WinWidth=window.document.body.clientWidth;
	for (i=0; i < Amount; i++)
	{
	  Xpos[i] = (Math.random()*WinWidth);
	  Ypos[i] = (Math.random()*WinHeight/2) ;
	  HSpeed[i] = Math.random()*10-10;
	  Gravity[i] = Math.random()*0.3+0.1;
	
	  VSpeed[i] = 0;
	}
	initNotesDone=1;
}

function Notes()
{
	var WinHeight=window.document.body.clientHeight;
	var WinWidth=window.document.body.clientWidth;
	var hscrll=document.body.scrollTop;

	for (i=0; i < Amount; i++)
	{
		Xpos[i]+=HSpeed[i];
		if ( (Xpos[i]>WinWidth) || (Xpos[i]<0) )
		{
			Xpos[i]-=HSpeed[i];
			HSpeed[i]=0-HSpeed[i];
		}
	
		
		Ypos[i]+=VSpeed[i];
		if (Ypos[i]>WinHeight)
		{
			Ypos[i]-=VSpeed[i];
			VSpeed[i]=0-VSpeed[i];
		}
		VSpeed[i]+=Gravity[i];
	
		eval("document.all.si"+i).style.left=Xpos[i];
  		eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
  		if (inNotes)
  			eval("document.all.si"+i).style.visibility="visible";
  		else
  			eval("document.all.si"+i).style.visibility="hidden";
  	}
 
 	if (inNotes)
		setTimeout('Notes()',20);
	
	
} 


function toggleNotes()
{
	
	
	if (!inNotes)
	{
	
		if ( ( typeof(window.page)=="object") && (typeof(window.page.productlist)=="object") && (typeof(window.page.productlist.allowNotes)=="number") )
		{
			if (!window.page.productlist.allowNotes) return ;
			{
				/*
				if (!initNotesDone)
					initNotes();
					*/
				inNotes=1;
				Notes();
			}
		}
	}
	else
		inNotes=0;
		
}

//initNotes();