var Config={
	imgsrc : new Array(),
	imgtitle : new Array(),
	currentimg : 0,
	interval : 20,
	activeClass : 'active-point',
	navigationContainer : "#navigation",
	container: "#container",
	titleContainer: "#titlebox",
	
	
	getImageMaxLength: function(){
		return Config.imgsrc.length;
	},
	
	getInterval:function(){
		return this.interval;
	},
	
	
	/*
	addImages:function(imgs){
		newimgs = imgs.split(",");
		for(i=0;i<newimgs.length;i++){
			this.imgsrc[i] = newimgs[i];
		}
	},*/
	
	
	addImage:function(imsrc,imtitle){
		var ptr = this.getImageMaxLength();
		this.imgsrc[ptr] = imsrc;
		this.imgtitle[ptr] = imtitle;
	},
	
	
	returnImages:function(){
		var tmp="";
		var seperator = "";
		alert(this.imgsrc.length);
		for(i=0;i<this.imgsrc.length;i++){
			tmp += this.imgsrc[i] + seperator; 
			seperator = ",";
		}
		return tmp;
	},
	
	
	
	renderImage:function(){
		imgtag = "<img src=\""+this.imgsrc[Config.getCurrentImage()]+"\" />";
		$(this.getContainer()).html(imgtag);
		this.applyCurrentPageClass(Config.getCurrentImage());
		this.renderTitle();
	},
	
	
	
	
	renderTitle:function(){
		$(this.getTitleContainer()).html(this.imgtitle[Config.getCurrentImage()]);
	},
	
	
	
	setCurrentImage:function(action){
		if(action=="-"){
			this.currentimg--;
		}else{
			this.currentimg++;
		}
	},
	
	
	
	applyCurrentPageClass:function(i){
		$(".pages").removeClass(this.activeClass);
		$(".pages:eq("+i+")").addClass(this.activeClass);
	},
	
	
	
	setCurrentImagePos:function(pos){
		this.currentimg = parseInt(pos);
	},
	
	
	
	getCurrentImage:function(){
		return this.currentimg;
	},
	
	
	
	setNavigationContainer:function(divid){
		this.navigationContainer = "#"+divid;
	},
	
	
	getNavigationContainer:function(){
		return this.navigationContainer;
	},
	
	setContainer:function(divid){
		this.container = "#"+divid;
	},
	
	
	
	
	getContainer:function(){
		return this.container;
	},	
	
	
	
	setTitleContainer:function(divid){
		this.titleContainer = "#"+divid;
	},
	
	
	
	getTitleContainer:function(){
		return this.titleContainer;
	},		
	
	renderLinks:function(){
		var txtLinks="";
		if(this.getImageMaxLength() > 0){
			txtLinks += '<div class="previous" id="prev"><a href="javascript:void(0);"></a>&nbsp;</div>';
			for(i=0;i<this.getImageMaxLength();i++){
					txtLinks += '<a class="normal-points pages" href="javascript:void(0);"></a>';
			}
			txtLinks += '<div class="next" id="next"><a href="javascript:void(0);"></a></div>';
		}
		
		$(this.getNavigationContainer()).html(txtLinks);
	}
	
	
};