/**
 * @author Kalapuc Roman (rkalapuc@gmail.com)
 * @copyright Finport Technologies Inc
 * @since 2006
 * @version 1.0
 */

function wlpSwapImage(_image_on,_image_off,_message_on,_message_off,_status,_id){
	
	this.message_on = _message_on;
	this.message_off = _message_off;
	
	this.image_on = new Image();
	this.image_on.src = _image_on;
	
	this.image_off = new Image();
	this.image_off.src = _image_off;

	this.status = _status;	
	this.id = _id;
}

wlpSwapImage.prototype.show = function(){
	if (this.status){
		$(this.id).src = this.image_off.src;
		$(this.id).setAttribute("alt",this.message_off);
		$(this.id).setAttribute("title",this.message_off);
	} else {
		$(this.id).src = this.image_on.src;
		$(this.id).setAttribute("alt",this.message_on);
		$(this.id).setAttribute("title",this.message_on);
	}		
}

wlpSwapImage.prototype.swap = function(){
	if (this.status){
		this.status = false;
		$(this.id).src = this.image_on.src;
		$(this.id).setAttribute("alt",this.message_on);
		$(this.id).setAttribute("title",this.message_on);
	} else {
		this.status = true;
		$(this.id).src = this.image_off.src;
		$(this.id).setAttribute("alt",this.message_off);
		$(this.id).setAttribute("title",this.message_off);
	}
}


