var max=4;
var img=new makearray(max);

function makearray(n) {
 for (var i=0; i<n; i++) {
   this['i'+i]=0;
  }
 this.maxlen=n;
 this.len=0; 
 return this;
}

function images(org, swap) {
 if(document.images) {
  this.org=new Image();
  this.org.src=org;
  this.swap=new Image();
  this.swap.src=swap;
 }
}

function add(name,id) {
 img[id]=new images("img/but/"+name+".gif", "img/but/"+name+"_hover.gif");
 }

function enter(id) {
 
 if (document.images) {
  document.images[id].src=img[id].swap.src;
 }
}                                         

function out(id) {
 if (document.images) {
  document.images[id].src=img[id].org.src;
 }
}
add("news","i0");
add("projects","i1");
add("services","i2");
add("telenet","i3");
add("guestbook","i4");
add("about","i5");
add("partner","i6");
add("program","i7");
add("articles","i8");
//add("links","i6");


