function SlideImage(name) {
	this.start = 1;
    this.idx = 1;
    this.deley = 2500;
    this.image = Array();
    this.imageLink = Array();
    this.imageLength = 0;
    this.target = null;
    this.name = name;
	
    SlideImage.prototype.setTarget = function(s) {this.target = document.getElementById(s)};
	SlideImage.prototype.setName = function(s) {this.name = s};
	SlideImage.prototype.getName = function() {return this.name};
    SlideImage.prototype.getLength = function() {return this.imageLength};
    SlideImage.prototype.setStart = function(s) {this.start = s};
	SlideImage.prototype.getStart = function() {return this.start};
    SlideImage.prototype.setDeley = function(s) {this.deley = s};
	SlideImage.prototype.getDeley = function() {return this.deley};
	SlideImage.prototype.getTarget = function() {return this.target};
	
    SlideImage.prototype.addImage = function(imgURL,imgLink){
    	this.imageLength++;
        this.image[this.imageLength] = new Image();
		this.image[this.imageLength].src = imgURL;
        this.imageLink[this.imageLength] = imgLink;
    };
    SlideImage.prototype.clickLink = function() {
    	if(this.imageLink[this.idx] != null && this.imageLink[this.idx] != ""){
    		window.location = this.imageLink[this.idx];
        }
    };
    SlideImage.prototype.show = function() {
        if(!document.images || this.target == null)
        return
        this.target.src = this.image[this.start].src;
        this.idx = this.start;
        if(this.start < this.imageLength){
            this.start++;
        }else{
        	this.start = 1;
        }
        //call function "slideit()" every 2.5 seconds        
        setTimeout(this.name+".show()",this.deley);
    };    
};

/*
<a href="Javascript:slide1.clickLink();"><img src="" width="420" name="slide1" id="slide1" border="0"></a>
<script>
<!--	
	var slide1 = new SlideImage('slide1');
	slide1.setTarget('slide1');
	slide1.addImage('images/model_01.gif','index.php');
	slide1.addImage('images/model_02.gif','index.php');
	slide1.addImage('images/model_03.gif','index.php');
	slide1.addImage('images/model_04.gif','index.php');
	slide1.show();
//-->
</script>
*/