var picWinHold = null;        // global variablevar musicWinHold = null;    // global variable<!------------------------------------------------------------------>function pictureWindow(imagePath,caption,imageX,imageY) {  var scx = screen.availWidth;  //screen size  var scy = screen.availHeight;  var x = window.screenX;  //current window location  var y = window.screenY;  var dx = imageX + 40;  //new window width and height  if (dx < 300) dx = 300;  var dy = imageY + 44 + (caption.length*10/imageX) * 16;  if (parseInt(navigator.appVersion) > 3) {   if (navigator.appName == "Netscape") {    winW = window.innerWidth;    winH = window.innerHeight;   }   if (navigator.appName.indexOf("Microsoft") != -1) {    winW = document.body.offsetWidth;    winH = document.body.offsetHeight;     }  }  var newX = x + (winW/2) - (dx/2);   //new window location, centered  var newY = y + 25;  if ((picWinHold != null) && (! picWinHold.closed)) picWinHold.close();  var pictureWin = window.open("","picture", "scrollbars,resizable,screenX="+newX+",screenY="+newY+",width="+dx+",height="+dy);  picWinHold = pictureWin;  //make sure window is on screen  if (newX + dx > scx) pictureWin.outerWidth = scx - newX;  if (newY + dy > scy) pictureWin.outerHeight = scy - newY;  var HTMLstr = "<html>\n<head>\n<title>Picture Viewer</title>\n";  HTMLstr += "<link rel=stylesheet type='text/css' href='../picturewindow.css'>\n</head>\n<body>\n<center>\n";  HTMLstr += "<table border=1 cellpadding=2 class=box>\n";  HTMLstr += "<tr><td align='center'><img src='" + imagePath + "' border=1></td></tr>\n";  HTMLstr += "<tr><td><table width=100% border=0 cellpadding=0 cellspacing=0 class=box>\n";  HTMLstr += "<tr height=20><td width=5%><B><font size=-2><A HREF='javascript:window.close()'>CLOSE</A></font></B></td>\n";  HTMLstr += "<td width=1%> </td>\n";  HTMLstr += "<td>" + caption + "</td>\n";  HTMLstr += "<td width=6%> </td></tr>\n";  HTMLstr += "</table></td></tr>\n";  HTMLstr += "</table>\n</center>\n";  HTMLstr += "</body>\n</html>";  pictureWin.document.writeln(HTMLstr);  pictureWin.focus();}<!------------------------------------------------------------------>function musicWindow(musicPath,coverPath,title,author,caption) {  var scx = screen.availWidth;  //screen size  var scy = screen.availHeight;  var x = window.screenX;  //current window location  var y = window.screenY;  var dx = 420;  //new window width and height  var dy = 220;  if (parseInt(navigator.appVersion) > 3) {   if (navigator.appName == "Netscape") {    winW = window.innerWidth;    winH = window.innerHeight;   }   if (navigator.appName.indexOf("Microsoft") != -1) {    winW = document.body.offsetWidth;    winH = document.body.offsetHeight;     }  }  var newX = x + (winW/2) - (dx/2);   //new window location, centered  var newY = y + 25;  if ((musicWinHold != null) && (! musicWinHold.closed)) musicWinHold.close();  var musicWin = window.open("","music", "scrollbars,resizable,screenX="+newX+",screenY="+newY+",width="+dx+",height="+dy);  musicWinHold = musicWin;  //make sure window is on screen  if (newX + dx > scx) musicWin.outerWidth = scx - newX;  if (newY + dy > scy) musicWin.outerHeight = scy - newY;  var HTMLstr = "<html>\n<head>\n<title>Listen to Music</title>\n";  HTMLstr += "<link rel=stylesheet type='text/css' href='../picturewindow.css'>\n</head>\n<body>\n<center>\n";  HTMLstr += "<table border=1 cellpadding=0 width=390 height=180 class=box2>\n";  HTMLstr += "<tr><td><table border=0 cellpadding=0 width=100% class=box2title>";  HTMLstr += "<tr><td width=50 align=left><B><font size=-2><A HREF='javascript:window.close()'>CLOSE</A></font></B></td><td align=center><font color=#441100><I><B>Play Music</B></I></font></td><td width=50></td></tr></table></td></tr>\n";  HTMLstr += "<tr><td><img src='" + coverPath + "' width=100 height=100 border=1 align=left hspace=3><b>'" + title + "'</b><br><font size=-1>" + author + "<p>" + caption + "</font><br clear=left><p>\n";  HTMLstr += "<embed src=" + musicPath + " width=320 height=16></td></tr>\n";  HTMLstr += "</table>\n</center>\n";  HTMLstr += "</body>\n</html>";  musicWin.document.writeln(HTMLstr);  musicWin.focus();}
