function init(default_loc,default_img) {

  counter = image_array.length ;
  speed = 1 ;
  
  	if(default_loc){
 		if(top.header.loaded==1){
  			hilight(default_img,'bdr') ;
  			top.body.location=default_loc ;
  		}else
  			top.header.loaded = 1;
	}

	if (navigator.appName == "Netscape") { isNav = true; isIE = false
		img_objects = document.layers.length ;

             	for(i=0,image_counter = 0 ; i < img_objects ; i++,image_counter < (counter-1) ? image_counter++ : image_counter = 0 ){
			document.layers[i].document.images[0].src = image_array[image_counter];
			document.layers[i].document.images[0].alt = link_array[image_counter].replace(/.+\//,'');
			document.layers[i].document.links[0].href = link_array[image_counter];              
		}  
	}
	else { isNav = false; isIE = true;
            	img_objects = document.images.length ;

              	for(i=0,pos=40,dist=120 ; i < img_objects ; i++,pos -= dist){
              		eval("img" + i + ".style.pixelTop =" + pos) ;
              	}

               	for(i=0,image_counter = 0 ; i < img_objects ; i++,image_counter < (counter-1) ? image_counter++ : image_counter = 0 ){
			document.images[i].src = image_array[image_counter];
			document.images[i].alt = link_array[image_counter].replace(/.+\//,'');
			document.links[i].href=link_array[image_counter];              
		}	  
              
	}
  	if(image_array.length > 1) dummy = setTimeout("write_some()", 1000);
	document.status = "";
}

	function write_some () {
		dummy = setTimeout("write_some()", 80);
		for (counter = 0; counter < 2; counter++){
			if (isNav) {
				img_objects = document.layers.length ;
				for(i=0; i < img_objects ; i++){
				     eval("document.img" + i + ".moveTo(20, document.img" + i + ".top + speed)" ) ;
				}
			

				for(i=0, j=false ; i < img_objects ; i++){
				     eval(" j = (document.img" + i + ".top > 590) ");
				     if ( j ) { 
					document.layers[i].document.links[0].href = link_array[image_counter]; 
					document.layers[i].document.links[0].target = 'body'; 
					document.layers[i].document.images[0].src = image_array[image_counter]; 
					document.layers[i].document.images[0].alt = link_array[image_counter].replace(/.+\//,'');
					document.layers[i].document.images[0].border = 3 ;
					eval("document.img" + i + ".top = -110" ) ; 
					eval("document.img" + i + ".moveTo(20, -127) " ); 
					image_counter += 1 ; 
				     }
				}
				

			}else {

				img0.style.pixelTop += speed;
				img1.style.pixelTop += speed;
				img2.style.pixelTop += speed;
				img3.style.pixelTop += speed;
				img4.style.pixelTop += speed;
				img5.style.pixelTop += speed;

				if (img0.style.pixelTop > 590) {
					document.images[0].src = image_array[image_counter];
					document.images[0].alt = link_array[image_counter].replace(/.+\//,'');
					document.links[0].href=link_array[image_counter];
					img0.style.pixelTop = -127 ;
					image_counter += 1
				}
				if (img5.style.pixelTop > 590) {
					document.images[5].src = image_array[image_counter];
					document.images[5].alt = link_array[image_counter].replace(/.+\//,'');
					document.links[5].href=link_array[image_counter];
					img5.style.pixelTop = -127 ;
					image_counter += 1
				}
				if (img4.style.pixelTop > 590) {
					document.images[4].src = image_array[image_counter];
					document.images[4].alt = link_array[image_counter].replace(/.+\//,'');
					document.links[4].href=link_array[image_counter];
					img4.style.pixelTop = -127 ;
					image_counter += 1
				}
				if (img3.style.pixelTop > 590) {
					document.images[3].src = image_array[image_counter];
					document.images[3].alt = link_array[image_counter].replace(/.+\//,'');
					document.links[3].href=link_array[image_counter];
					img3.style.pixelTop = -127 ;
					image_counter += 1
				}
				if (img2.style.pixelTop > 590) {
					document.images[2].src = image_array[image_counter];
					document.images[2].alt = link_array[image_counter].replace(/.+\//,'');
					document.links[2].href=link_array[image_counter];
					img2.style.pixelTop = -127 ;
					image_counter += 1
				}
				if (img1.style.pixelTop > 590) {
					document.images[1].src = image_array[image_counter];
					document.images[1].alt = link_array[image_counter].replace(/.+\//,'');
					document.links[1].href=link_array[image_counter];
					img1.style.pixelTop = -127 ;
					image_counter += 1
				}


			}
			if(image_counter > image_array.length-1) image_counter = 0 ;
		}
	}


function pause (milliseconds_in, href_in){
		//alert('pause/resume .. ' + image_counter);
		var myTime = new Date();
		//setTimeout("window.status=" + myTime.getSeconds(), milliseconds_in);
		//setTimeout("window.status=" + " (" + milliseconds_in + ") " + myTime.getSeconds(), milliseconds_in);
		if (href_in != 0) { parent.frames[1].document.href = href_in; for (ctr=0;ctr<4000;ctr++) {1;} }
	}


function accelerate(frm_idx, incr){
    if(incr){
    	top.frames[frm_idx].speed += (top.frames[frm_idx].speed < 10 || incr < 0)? incr : 0 ;
    	if(top.frames[frm_idx].speed < 0) top.frames[frm_idx].speed = 0;  // line should be removed to implement reverse
    }else
    	top.frames[frm_idx].speed = 0 ;
}


function hilight(obj_name,state){
//alert(obj_name);
//

if(state=='bdr'){
     var style_id= obj_name.match(/\d+$/),img_name;
   
     if (navigator.appName == "Netscape") {
	img_name = document.layers[style_id].document.images[0].src;
  	style_id='img'+  style_id;
     }
     else{	
  	style_id='img'+  style_id;
  	img_name =  document.images[obj_name].src;
     }

     img_name = img_name.replace(/.+\//,'');
     img_name = img_name.match(/^\w+/);
     style_border(style_id,img_name);

	return;
   }

  var img_name =  obj_name.src;

  if(state == 'on'){
      img_name = img_name.replace(/_off/,'_on');
   }else{
      img_name = img_name.replace(/_on/,'_off');
   }

//document.images[obj_name].src = img_name ;
  obj_name.src = img_name ;

}

function style_border(style_id,name){
  if (navigator.appName == "Netscape") {
	doc='document.';
  	styl=''
  }
  else{	doc='';
  	styl='.style'
  }

    if(document.forms[0].curr_style.value!=''){
	curr_style = document.forms[0].curr_style.value;

	eval(doc + curr_style  + styl + ".border = ''");
    }
    eval(doc + style_id + styl +".border = 'solid red ' ") ;

    document.forms[0].curr_img.value=name ;
    document.forms[0].curr_style.value = style_id;

}