var mousex = 0
var mousey = 0
var mouseb = -10
var altl = 0;
if(isNC4) document.captureEvents(Event.MOUSEMOVE)
if(isMSIE || isOpera7){
  document.onmousemove=function(){
   	mousex=event.clientX+getScrollX()
    mousey=event.clientY+getScrollY()
    KRF_drag();
   	moveFollower()
   	return true
  }
}else if(isOpera){
  document.onmousemove=function(){
   	mousex=event.clientX
   	mousey=event.clientY
   	KRF_drag();
   	moveFollower()
   	return true
  }
}else if(isNC){
  document.onmousemove=function(e){
   	mousex = e.pageX
   	mousey = e.pageY
   	KRF_drag();
   	moveFollower()
   	return true
  }  
}
if(isNC4) document.captureEvents(Event.MOUSEDOWN)
if(isMSIE || isOpera7){
  document.onmousedown=function(){
    mouseb = event.button;
    return true
  }
}else if(isOpera){
  document.onmousedown=function(){
    mouseb = event.button;
    return true
  }
}else if(isNC){
  document.onmousedown=function(e){
    mouseb = e.button;
    return true
  }  
}

if(isNC4) document.captureEvents(Event.MOUSEUP)
if(isMSIE || isOpera7){
  document.onmouseup=function(){
  	dragID = 0;
    mouseb = -10;
    return true
  }
}else if(isOpera){
  document.onmouseup=function(){
    dragID = 0;
    mouseb = -10;
    return true
  }
}else if(isNC){
  document.onmouseup=function(e){
    dragID = 0;
    mouseb = -10;
    return true
  }  
}

function initalt(){
	altl=layer("altmessage")
	altl.hide();
        Changehead();
	for (i in document.images)
	if (document.images[i].className == 'preview'){
		document.images[i].onmouseover = function(){
			var Im = new Image();
			Im.src = this.src;
			return overlib('', SHADOW, WIDTH, Im.width, HEIGHT, Im.height, FGBACKGROUND, Im.src, FGCOLOR,'');
		}
		document.images[i].onmouseout=function(){return nd();}
	}
}

function doalt(message){
	if (!altl) return;
	if (message != ''){
		altl.write(message);
        altl.show();
	}
}
function realt(){
	if (!altl) return;
	altl.hide();
	altl.moveTo(0,0);
}

function moveFollower(){
	if (!altl) return;
	if (altl.getVisibility()) 
	{
		posy = mousey+15;
		posx = mousex;
		if (altl.getWidth()  + posx >= getDocumentWidth()  + getScrollX()) posx = getScrollX() + getDocumentWidth()  - altl.getWidth();
		if (altl.getHeight() + posy + 20 >= getWindowHeight() + getScrollY()) posy = getScrollY() + getWindowHeight() - altl.getHeight() - 20;
		if (posy + altl.getHeight() > mousey && posy < mousey)
		{
			posy = mousey-altl.getHeight()-15;
		}
		altl.moveTo(posx,posy)
	}
}

massive_length=5;
colors_= new Array(massive_length);
colors_[0] = "red";
colors_[1] = "green";
colors_[2] = "blue";
colors_[3] = "fuchsia";
colors_[4] = "maroon";
var next_ = 0;

function Changehead(){
	walkDOM(document.body, 'blink', colors_[next_]);
	next_++;
	if(next_>massive_length-1) next_=0;
	window.setTimeout("Changehead()",1000);
}

function walkDOM(parent, class, color){
	N = parent.childNodes.length;
	for(i=0 ; i<N; i++){
		d = parent.childNodes;
		if (d.className == class){
			d.style.color = color;
                        d.style.fontSize =  large;
			walkDOM(d, class, color);
		}
	}
}

