Hello, good people!
I would appreciate if anyone out there could help me wriggle out of a stupefying problem (at least for me :o). Namely, I would like to make the JS slide show:
1) pause for n seconds before displaying the next image;
2) pause for as long as the mouse pointer is over an image and then to resume when the mouse is out;
3) hold still when an image is clicked on (in order to display the individual image) and then resume when the popup window is closed.
The resources are as follows: several A-Z.htm pages each containing a slide show that opens up as a popup window defined by a single 'rss.js' script. The slide show is initiated through a link that triggers the appropriate A-Z function at the .htm page, and the array of images is also defined at the .htm page, for example:
Code:
    function arss()
            {
            pic = new Array()//names of the .jpg images to display
            des = new Array()//text to display below the images
header = "Ardabil, Regionalni Slide Show"//window title
 }
The rather lengthy JS script goes like this:
Code:
function popupwin(page) {
         var CT = '"'
         if (screen.Width < 1024) {
            var winsize = "menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,left=60,top=30,width=800,height=600";
            } 
           else {
	var winsize = "menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,left=80,top=50,width=1024,height=768";
         } 
	var winpop = "<html>\n<head>\n";
	winpop += "<title>" + header + "</title>\n";
	winpop += "</head>\n<body  background='Clip/Bullet/LMSBBG.gif'>\n";
        winpop += "<style>\n<!--\n"; 
        winpop += ".P5 { color: rgb(190,220,190); font-family: sans-serif; font-size: 8pt }\n"; 
        winpop += ".P4 { color: rgb(0,200,0); font-family: sans-serif; font-size: 8pt }\n"; 
        winpop += "-->\n</style>\n"; 
        winpop += "<script language='javascript'>\n";
        winpop += "<!--" + "\n" + "var currentpos=0,alt=1,curpos1=0,curpos2=-1" + "\n";
        winpop += "function initialize(){" + "\n" + "startit()" + "\n" + "}" + "\n";
		winpop += "function scrollwindow(){" + "\n";
        winpop += "if (document.all)" + "\n" + "temp=document.body.scrollTop" + "\n";
        winpop += "else" + "\n" + "temp=window.pageYOffset" + "\n" + "if (alt==0)" + "\n" + "alt=1" + "\n";
        winpop += "else" + "\n" + "alt=0" + "\n" + "if (alt==0)" + "\n" + "curpos1=temp" + "\n";
        winpop += "else" + "\n" + "curpos2=temp" + "\n";
        winpop += "if (curpos1!=curpos2){" + "\n";
        winpop += "if (document.all)" + "\n";
        winpop += "currentpos=document.body.scrollTop+1" + "\n";
        winpop += "else" + "\n" + "currentpos=window.pageYOffset+1" + "\n" + "window.scroll(0,currentpos)"+ "\n" + "}" + "\n" + "}" + "\n";
        winpop += "function startit(){" + "\n";
        winpop += "setInterval('scrollwindow()',10)" + "\n" + "}" + "\n";
        winpop += "window.onload=initialize" + "\n";
        winpop += "function mpopupwin(mdes,mpic) {" + "\n"; 	
	winpop += "         mpic = mpic.toUpperCase();" +";\n";
	winpop += "         var winsize = 'menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,left=100,top=100,width=1024,height=768'" +";\n";
	winpop += "         var mwinpop = '<html><head>'" + ";\n";
        winpop += "         mwinpop += '<title>' + mdes + '</title>'" + ";\n";
        winpop += "         mwinpop += '</head><body bgcolor=#000000 topmargin=0 leftmargin=0>'" + ";\n";
        winpop += "         mwinpop += '<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>'" + ";\n";
        winpop += "         mwinpop += '<tr>'" + ";\n";
        winpop += "         mwinpop += '<td width=100% valign=middle align=center><table border=0 cellpadding=0 cellspacing=0>'" + ";\n";
        winpop += "         mwinpop += '<tr><td width=100% align=center>'" + ";\n";
        winpop += "         mwinpop += '<img src=Clip/Photos/' + mpic + '><br>'" + ";\n";
        winpop += "         mwinpop += '<small><font face=Sans-Serif color=#FFCC66>' + mdes   + '</font></small><br>'" + ";\n";
		winpop += "			mwinpop += '<br>'\n";
	winpop += "         mwinpop += '<a href=javascript:window.close();>'" + ";\n";
        winpop += "         mwinpop += '<font face=Sans-Serif size=2 color=#AA0000>Izlaz</font></a>'" + ";\n";
        winpop += "         mwinpop += '</td></tr>'" + ";\n"; 
        winpop += "         mwinpop += '</table>'" + ";\n"; 
        winpop += "         mwinpop += '</td></tr>'" + ";\n"; 
        winpop += "         mwinpop += '</table>'" + ";\n"; 
	winpop += "         mwinpop += '</body></html>'" + ";\n"; 
	winpop += "         mwinpopup = window.open('',mpic.replace('.',''),winsize)" + ";\n";
        winpop += "         mwinpopup.document.open()" + ";\n"; 
	winpop += "         mwinpopup.document.write(mwinpop)" + ";\n";
	winpop += "         mwinpopup.document.close()" + ";\n";
	winpop += "         mwinpopup.focus()" + ";\n"; 
        winpop += "         }" + "\n";              
        winpop += "-->" + "\n" + "</script>" + "\n";
        winpop += "<p align=center class=P5>\n";
        for (i=0; i<pic.length; i++)
            { 
            winpop += "<a href=" + CT + "javascript:mpopupwin('" + des[i] + "', '" +  pic[i] + "');" + CT + "><img src='Clip/Photos/" + pic[i] + "'  border=0 ></a><br><br>\n";
	    winpop += "<img src='Clip/Bullet/Bullet6x.gif'> " + des[i] + "<br><br>\n";
            winpop +=   " " + "<br>\n";
            }
			winpop += "<br>\n";
	winpop += "<a href='javascript:window.close();' class='P4'>Izlaz</a></p>\n"; 
	winpop += "</body>\n</html>\n";
	winpopup = window.open('',page,winsize);
	winpopup.document.open(); 
	winpopup.document.write(winpop);
	winpopup.document.close();
	winpopup.focus(); 
        }
The mouse pointer changes to a hand when passed over an image:
Code:
function mOvr(src,clrOver) {
  if (!src.contains(event.fromElement)) {
      src.style.cursor = 'hand'; src.bgColor = clrOver;
    }
 }
function mOut(src,clrIn) {
  if (!src.contains(event.toElement)) {
      src.style.cursor = 'default';
      src.bgColor = clrIn;
     }
 }
function mClk(src) {
  if (event.srcElement.tagName=='TD') {
     src.children.tags('A')[0].click();
    }
 }
And it continues with the portion regulating the popup window that appears when you click on an image from the slide show:
Code:
function TRWin(Page) { 
         Page = Page.toUpperCase();
         if (screen.Width < 1024) {
            var winsize = "menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,left=50,top=20,width=800,height=600";
            } 
           else {
            var winsize = "menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,left=80,top=50,width=1024,height=768";
         } 
         wn  = Page.replace('.','');
         wn = wn.slice(0,wn.search('#'));
	 wnm = window.open(Page,wn,winsize);
	 wnm.focus(); 
}

function MWin(des,pic) {
        pic = pic.toUpperCase();
	var winsize = "menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,left=100,top=100,width=1024,height=768"; 
	var winpop = "<html>\n<head>\n";
	winpop += "<title>" + des + "</title>";
	winpop += "</head>\n<body  bgcolor='#000000' topmargin='0' leftmargin='0'>\n";
        winpop += "<table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%'>\n";
        winpop += "<tr>\n";
        winpop += "<td width='100%' valign='middle' align='center'><table border='0' cellpadding='0' cellspacing='0'>\n";
        winpop += "<tr><td width='100%' align=center>\n";
	winpop += "<img src=Clip/Photos/" + pic + " ><br>\n";
	winpop += "<small><font face='Sans-Serif' color='#FFCC66'>" + des + "</font></small><br>\n";
	winpop += "<br>\n";
        winpop += "<a href='javascript: window.close();'>"; 
	winpop += "<font face='sans-serif' size='2' color='#AA0000'>Izlaz</font></a>\n";
        winpop += "</td></tr>\n";
        winpop += "</table>\n";
        winpop += "</td></tr>\n";
        winpop += "</table>\n";
	winpop += "</body>\n</html>\n";
	winpopup = window.open('',pic.replace('.',''),winsize);
	winpopup.document.open(); 
	winpopup.document.write(winpop);
	winpopup.document.close();
	winpopup.focus(); 
        }
Now, I would be most grateful if anyone could tell me what to do in order to make this work properly. Please, HELP!!! Thanks in advance!
(I am aware of the excessive length of this post, and I sincerely apologize, but I really could not make it any other way)