/*

 Flowers - by Gergely Kovacs - kovacsgergely@freemail.hu

 A modification of:

 Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)

 Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code

*/

  function iecompattest(){

	
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

	
  } 

  var gifs=new Array( "picture/flower1.gif", 5000, 42,
  		      "picture/flower2.gif", 5000, 70,
  		      "picture/flower3.gif", 5000, 70,
                      "picture/flower4.gif", 2000, 53,
                      "picture/flower5.gif", 4000, 126,
                      "picture/flower6.gif", 3000, 79,
                      "picture/flower7.gif", 3000, 100,
                      "picture/flower8.gif", 4000, 39,
                      "picture/flower9.gif", 4000, 69
 );
		

  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

  var xp, yp, doc_width, doc_height,nf;
  nf = -1;
 
  if (ns6up) {

    
    doc_width = self.innerWidth;

    
    doc_height = 120; // csak a felso reszen legyenek.... // self.innerHeight;

  
  } else 
  if (ie4up) {

    
    doc_width = iecompattest().clientWidth;

    
    doc_height = 120; // csak a felso reszen legyenek.... // iecompattest().clientHeight;

  
  } 

  function snowIE_NS6()  // IE and NS6 main animation function
  {
    var n = Math.round( Math.random()*(gifs.length/3-1) );
    if ( n==nf ) 
      n = (nf+1)%(gifs.length/3);
    nf = n;
    xp = Math.random()*(doc_width-140);
    yp = Math.random()*doc_height;
    document.getElementById("flowerimg").src = gifs[n*3];
    document.getElementById("flowerimg").width = gifs[n*3+2];
    document.getElementById("flowerdiv").style.top = Math.floor(yp)+"px";
    document.getElementById("flowerdiv").style.left = Math.floor(xp)+"px";
    setTimeout("snowIE_NS6()", gifs[n*3+1] );
  }



  if (ie4up||ns6up) 
  {
    xp = 0;
    yp = 0;
    document.write("<div id=\"flowerdiv\" style=\"POSITION: absolute; Z-INDEX: 1; VISIBILITY: visible; TOP: "+yp+"px; LEFT: "+xp+"px;\"><img id=\"flowerimg\" src=\"../images/empty.gif\" border=\"0\"><\/div>" );

    snowIE_NS6();
  }





