Prototype.Browser.IE6 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 6;
Prototype.Browser.IE7 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5)) == 7;
Prototype.Browser.IE8 = Prototype.Browser.IE && !Prototype.Browser.IE6 && !Prototype.Browser.IE7;

var sv=new Array;
var csillagok;
//    CHANGES HERE ***  CHANGES HERE *** CHANGES HERE

// The star image path and name. Feel free to change it as long as it is in the directory of the html that you are using the script.
sv[15]=new Array;
sv[15][0]="favat/images/star1_teszt.gif";
sv[15][1]="favat/images/star2_teszt.gif";
var csillagdb = 2;
if (Prototype.Browser.IE6 == false) {
	sv[15][2]="favat/images/star01.png";
	sv[15][3]="favat/images/star02.png";
	var csillagdb = 4;
}
// The number of the stars.
sv[0]=7;
// Minimum speed. (the lower the faster)
sv[1]=30;
// Maximum speed. (it should be greater then minimum speed)
sv[12]=40;
// Minimum size. (the lower the smaller)
sv[4]=20;
// Maximum size. (it should be greater then minimum size)
sv[5]=40;
// Reappearance time. (1000 is one second)
sv[3]=2000;

//           END OF CHANGES *** END OF CHANGES *** END OF CHANGES

sv[2]=sv[12]-sv[1];
sv[11]=sv[5]-sv[4];

for (var to=1; to < sv[0]; to++){
	var ato="astir"+to;
	var img = Math.floor(Math.random()*csillagdb);
	document.write('<img id='+ato+' STYLE="position:absolute; left:100px; width:2px; top:0px; height:2px; visibility:visible; Z-INDEX:9" src='+sv[15][img]+'>');
}

function isos(){
	for (var to=1; to < sv[0]; to++){
		setTimeout("ksana('"+to+"')", 10);
	}
}

function ksana(to){
	divoffset = $('csillagok').cumulativeOffset();
	var poso=Math.floor(Math.random()*sv[11])+sv[4];
	var perx=divoffset.left+Math.floor(Math.random()*(480-poso)); /* X pozicio */
	var pery=poso+Math.floor(Math.random()*(55-poso))+90;/* Y pozicio */
	var se=Math.floor(Math.random()*sv[2])+sv[1];
	setTimeout("anw('"+to+"','"+poso+"','"+perx+"','"+pery+"','"+se+"')", sv[3]);
}

function anw(to,poso,perx,pery,se){
	var ato="astir"+to;
	var ayto=konstantinos(ato);
	ayto.left = perx+'px';
	ayto.top = pery+'px';
	ayto.width=parseInt(ayto.width)+2+'px';
	ayto.height=parseInt(ayto.height)+2+'px';
	if (poso > 2){
		var poso=poso-2;
		var perx=perx-1;
		var pery=pery-1;
		setTimeout ("anw('"+to+"','"+poso+"','"+perx+"','"+pery+"','"+se+"')", se);
	}
	else{
		perx++;
		pery++;
		setTimeout ("katw('"+to+"','"+perx+"','"+pery+"','"+se+"')", se);
	}
}

function katw(to,perx,pery,se){
	var ato="astir"+to;
	var ayto=konstantinos(ato);
	ayto.left = perx+'px';
	ayto.top = pery+'px';
	ayto.width=parseInt(ayto.width)-2+'px';
	ayto.height=parseInt(ayto.height)-2+'px';
	var elen=parseInt(ayto.width);
	if (elen > 2){
		perx++;
		pery++;
		setTimeout("katw('"+to+"','"+perx+"','"+pery+"','"+se+"')", se);
	}
	else{
		setTimeout("ksana('"+to+"')", se);
	}
}

function konstantinos(id){
	if (document.all){
		return document.all[id].style;
	}
	else if(document.layers){
		return document.layers[id];
	}
	else if(document.getElementById && document.getElementById(id) != null){
		return document.getElementById(id).style;
	}
}
// Copyright 9dir.com 2006
var ky=document.body.clientHeight;
var kx=document.body.clientWidth/2;

