function ManageMainBanner( args ) {
	this.num = args.num;
	this.pic = args.pic;
	this.numop = 0;
	this.npic = 1;
	this.idInterval = null;
	this.picturenameprefix = 'bannerpicture';
	this.picturepath = 'images/';
	this.picturetype = '.jpg';
}

ManageMainBanner.prototype.changePic = function( current ) {
	this.changePicture( current );
	this.setCurrentPicture( current );
}

ManageMainBanner.prototype.changePicture = function( current ) {
	var currImage = document.getElementById( this.pic );

	currImage.src = this.picturepath + this.picturenameprefix + current + this.picturetype;
	currImage.style.opacity  =  0;
	currImage.style.filter  =  'alpha(opacity = 0)';
}

ManageMainBanner.prototype.changeOpacity = function( current ) {
	if( this.numop == 1 )
		this.numop = 0;
	
	this.numop += 0.1;
	var currImage = document.getElementById( this.pic );
	currImage.style.opacity  =  this.numop;
	currImage.style.filter  =  'alpha(opacity = ' + this.numop * 100 + ')';
}

ManageMainBanner.prototype.setCurrentPicture = function( current ) {
	this.npic = current;
}

app.ManageMainBanner = ManageMainBanner;