/*
 * Image Gallery Class for the project images
 *
 * @Author			Jochen Vandendriessche
 * @Date				2007 05 09
 * @Version			0.1
 *
 */
 
 var GLOBALURI = 'http://modular_dev.glbserv04/';
 
 function Gallery(curImg, imgArr, imgSiz, imgId, txtId, relId){
 	
 	this.cur    = curImg;
 	this.tot    = imgArr.length - 1;
 	this.imgArr = imgArr;
 	this.imgSiz = imgSiz;
 	this.imgObj = document.getElementById(imgId);
 	this.txtObj = document.getElementById(txtId);
 	this.relObj = document.getElementById(relId); 	
 }
 
 //vDivSlider.prototype.doSlide = function(){
 
 Gallery.prototype.doNext = function(){
 	 
    if (this.cur < this.tot){
       this.cur++;
    }else{
    	 this.cur = 0;
    }
	 this.imgObj.src			= GLOBALURI + "/assets/Web/pixel.gif";
    this.imgObj.width		= this.imgSiz[this.cur][0];
    this.imgObj.height		= this.imgSiz[this.cur][1]; 
    this.imgObj.src 			= this.imgArr[this.cur].src;
    this.txtObj.innerHTML 	= (this.cur+1) + " / " + (this.tot + 1);
    if (this.relObj){
    	this.relObj.href			= 'index.php?id=' + this.imgSiz[this.cur][2];
    }
 }
 
  Gallery.prototype.doPrevious = function(){
  	 this.imgObj.src			= GLOBALURI + "/assets/Web/pixel.gif";
    if (this.cur > 0){
       this.cur--;
    }else{
    	 this.cur = this.tot;
    }
	 this.imgObj.src			= "/assets/Web/pixel.gif";
    this.imgObj.width		= this.imgSiz[this.cur][0];
    this.imgObj.height		= this.imgSiz[this.cur][1]; 
    this.imgObj.src 			= this.imgArr[this.cur].src;
    this.txtObj.innerHTML 	= (this.cur + 1) + " / " + (this.tot + 1);
	 if (this.relObj){
    	this.relObj.href			= 'index.php?id=' + this.imgSiz[this.cur][2];
    }
 }
 
 
function tblShowHide(id, div){
	
	var ul = document.getElementById(id);
	var div = document.getElementById(div);
		
	if (ul.style.display == 'none'){
		ul.style.display = 'block';
		div.className = div.className.replace(/collapsed/, '');	
	}else{
		ul.style.display = 'none';
		div.className += ' collapsed';			
	}	
} 

function openAnn(){
	window.open('http://www.superkrediet.be/blog/2008/01/18/naaktfotos-ann-van-elsen-in-playboy-uitgelekt');		
}
		