/*
www.dkscripts.tk
*/

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
 * destop - destination transparency level (ie 80, for mostly solid)
 * rate   - time in milliseconds between trasparency changes (best under 100)
 * delta  - amount of change each time (ie 5, for 5% change in transparency)
 */

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
function popitup(url)
{
	newwindow=window.open(url,'name','height=430,width=460','scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}
function poppress(url)
{
	newwindow=window.open(url,'name','height=900,width=900');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popinfo(url)
{
	newwindow=window.open(url,'name','height=300,width=300');
	if (window.focus) {newwindow.focus()}
	return false;
}
function oploadwind(url)
{
	newwindow=window.open(url,'name','height=300,width=400');
	if (window.focus) {newwindow.focus()}
	return false;
}
function bignews(url)
{
	newwindow=window.open(url,'name','height=400,width=400');
	if (window.focus) {newwindow.focus()}
	return false;
}
function delimage(){
msg = "Are you sure you want to delete this image? This cannot be undone!";
//all we have to do is return the return value of the confirm() method
return confirm(msg);
}