function aktiv(n){ 
	document.images[n].src=document.images[n].src.replace("_off","_on"); 
} 

function inaktiv(n){ 
	document.images[n].src=document.images[n].src.replace("_on","_off"); 
} 

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

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);
    }
}

if (document.images) {
    var offimg = new Array()
    offimg["cool"] = new Image(120,50)
    offimg["cool"].src = "[INSERT]"

    function imageOn(imgName) {
	if (document.images) {
	    document.images[imgName].src = onimg[imgName].src
	}
    }

    function imageOff(imgName) {
	if (document.images) {
	    document.images[imgName].src = offimg[imgName].src
	}
    }

    function setMsg(msg) {
	window.status = msg
	return true
    }

    function playIt() {
    }
}

function ablak(file,width,height,name) {
    nagyablak =window.open('',name,'top=0,left=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height);
    nagyablak.document.open();
    nagyablak.document.write("<html><head><title>Marosgyöngye.hu</title></head><body bgcolor=#D7ecff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");
    nagyablak.document.write("<a href='javascript:window.close()'><img src='"+file+"' border='0' alt='"+name+"'></a>");
    nagyablak.document.write("</body></html>");
    nagyablak.document.close();
} 

