function browserdetect(){//returns 1 for IE, 2for N6,3 for N4 and others
 if(navigator.appName=="Microsoft Internet Explorer"){
  return 1;
 }
 else if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)==5){
  return 2;
 }
 else{
  return 3;
 }
}

function changenavbutton(source,imgname,netscape4string){
 browsertype=browserdetect();
 if(browsertype==1){//if IE 
  document.all[imgname].src=source;
 }
 if(browsertype==2){//if N6
   document.getElementById(imgname).src=source; 
 }
 if(browsertype==3){//if N4
   var imgptr;  //alert(netscape4string);
   imgptr=eval(netscape4string+imgname);
   imgptr.src=source;
 }
}

function preloadimages(imagesstring){
var imagesarray;
var count;
imagesarray=imagesstring.split(",");
for(count=0;count<imagesarray.length;count++){
newimage=new Image();
newimage.src=imagesarray[count];
}
}
