//snowflake object

function Snowflake(id, imgUrl) {
	this.id = 'snowflake'+id;
	this.image = imgUrl;	
}

function Snowflake_getID(){
	return this.id;
}

function Snowflake_getImage(){
	return this.image;
}

function Snowflake_getHTML(){
	var strHtml = '';
	strHtml += '<div id="'+this.getID()+'" class="flk"><img src="';
	strHtml += this.getImage();
	strHtml += '" border="0"></div>';
	
	return strHtml;
}

function Snowflake_move(x,y) {
	var flakeObj = this.getReference();
	flakeObj.left = x;
	flakeObj.top = y;
}

function Snowflake_getReference() {
	if(document.all)
		return document.all[this.getID()].style;
	else if(document.layers)
		return document.layers[this.getID()];
	else if(document.getElementById)
		return document.getElementById(this.getID()).style
}

Snowflake.prototype.getID = Snowflake_getID;
Snowflake.prototype.getImage = Snowflake_getImage;
Snowflake.prototype.getHTML = Snowflake_getHTML;
Snowflake.prototype.move = Snowflake_move;
Snowflake.prototype.getReference = Snowflake_getReference;