var selnav=Class.create({
	initialize:function(div,form){
	this.div=div;
	this.form=form;
	this.selbox=this.form.selbox;	
	
	/*-----   GET/SET DOM ELEMENTS    ------*/
// nav
	this.navLeft=findr(this.div,'id','oneLeft');
	this.toLeft=findr(this.div,'id','allLeft');
	this.navRight=findr(this.div,'id','oneRight');	
	this.toRight=findr(this.div,'id','allRight');	
	this.navDisplay=findr(this.div,'id','navDisplay');
	this.navDisplay.id='navDisplay'+this.form.pos;
	
	this.leftCount=findr(this.div,'id','leftCount');
	this.rightCount=findr(this.div,'id','rightCount');
	},
	draw:function(){
		var start=this.form.selbox.start;
		var showing=this.form.selbox.showing;
		this.navDisplay.innerHTML='showing '+showing+' of '+this.form.vizobj.length;
		
		this.leftCount.innerHTML=start;
		var rc=this.form.vizobj.length-start-showing;
		if(rc<0){
			rc=0;
		}
		this.rightCount.innerHTML=rc;
		
		if(start<=0){
			this.navLeft.href='javascript:void(0)';
			this.toLeft.href='javascript:void(0)';
		}else{
			this.navLeft.href="javascript:f["+this.form.pos+"].selbox.incPage(-1);";
			this.toLeft.href="javascript:f["+this.form.pos+"].selbox.incPage('first');";
		}
		if((start+showing)>=this.form.vizobj.length){
			this.navRight.href='javascript:void(0)';
			this.toRight.href='javascript:void(0)';
		}else{
			this.navRight.href="javascript:f["+this.form.pos+"].selbox.incPage(1);";
			this.toRight.href="javascript:f["+this.form.pos+"].selbox.incPage('last');";
		}
	}
});