
/*
 * Utilitar js for members area
 * @author: Petcu Mihai
 * @version: 1.0
 * @date: 29.05.2009
 * */

function members(){
	
	this.zoomedImg = null;
	this.activeTab = 'related_right';
	
	this.zoomPic = function(id){
		if(this.zoomedImg == id){
			this.unzoomImg();
		}else{	
			this.unzoomImg();
			document.getElementById(id).style.position = "absolute";
			document.getElementById(id).style.width = "600px";
			document.getElementById(id).style.zIndex = '2';
			this.zoomedImg = id;
		}
	}

	this.changeImage = function(id, url){
		document.getElementById(id).src = url;
	}
	
	this.unzoomImg = function(){
		if(this.zoomedImg != null){
			document.getElementById(this.zoomedImg).style.position = "relative";
			document.getElementById(this.zoomedImg).style.width = "200px";
			document.getElementById(this.zoomedImg).style.zIndex = '1';
			this.zoomedImg = null;
		}		
	}
	
	this.changeTab = function(id){
		if(this.activeTab != null){
			document.getElementById(this.activeTab+'_content').style.display = 'none';
			document.getElementById(this.activeTab).className = 'item';
		}
		this.activeTab = id;
		document.getElementById(this.activeTab+'_content').style.display = 'block';
		document.getElementById(this.activeTab).className = 'item selected';
	}
}	

var members = new members();