function RAE_open_window (wid, ht, txt, pictfile)
{
  wid+=10;
  ht+=45;  
  str='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n';
  str+='<html><head>\n';
  str+='<title>' + txt + '</title><link rel="stylesheet" type="text/css" href="karen2.css" />\n';
  str+='<script src="scripts.js" type="text/javascript"></script>\n';
  str+='<meta http-equiv="imagetoolbar" content="no" />\n';
  str+='</head><body>\n';
  str+='<img id="bigpic" alt="' + txt + '" src="' + pictfile + '">\n';
  str+='<div id="button" onclick="RAE_close_window();" onmouseover="RAE_mouse_pointer();"\n';
  str+=' onmouseout="RAE_mouse_revert();">\n';
  str+='Close Window</div>\n';
  str+='</body></html>\n';

  if (screen.width < 1024)
  {
    scrb=',scrollbars=yes';
  }
  else
  {
    scrb='';
  }

  mywinref=window.open('', '', 'width=' + wid + ',height=' + ht + ',menubar=no,location=no' + scrb);
  mywinref.document.write(str);
  mywinref.document.close();
}

function RAE_close_window ()
{
  window.close();
}

function RAE_mouse_pointer ()
{
  document.body.style.cursor='pointer';
}

function RAE_mouse_revert ()
{
  document.body.style.cursor='auto';
}

function RAE_karen ()
{
  var karen;
  karen="karen";
  karen+=".";
  karen+="textiles";
  karen+="@";
  karen+="karenerlebach";
  karen+=".co.uk";
  return karen;
}

function RAE_mail ()
{
  var karen=RAE_karen();

  document.write('<p class="middle">If you are interested in any of my work please either telephone me, ');
  document.write('Karen Erlebach, on (01202) 701231 or send an email to me at ');
  document.write('<a href="mailto:' + karen + '?subject=Website%20Enquiry">'+ karen + '</a>.</p>');
}

function RAE_dropdown (id)
/* Make the contained ul visible */
{
  var cn;
/* only need to do for IE6
Firefox under Ubuntu
CN:Mozilla AN:Netscape AV:5.0 (X11; en-GB) UA:Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.8) Gecko/20100723 Ubuntu/9.04 (jaunty) Firefox/3.6.8
IE6 under wine on Ubuntu
CN:Mozilla AN:Microsoft Internet Explorer AV:4.0 (compatible; MSIE 6.0; Windows NT 5.1) UA: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
IE6 under NT
CN:Mozilla AN:Microsoft Internet Explorer AV:4.0 (compatible; MSIE 6.0; Windows NT 5.1; sv1) UA: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sv1)
Firefox under NT
CN:Mozilla AN:Netscape AV:5.0 (Windows; en-GB) UA:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.1) Gecko/20091102 Firefox/3.5.5
alert("CN:" + navigator.appCodeName + " AN:" + navigator.appName + " AV:" + navigator.appVersion + " UA:" + navigator.userAgent);

display:inline or inline-block in CSS fixes some IE6 bugs
or there is the forcing layout fix

*/
  cn=id.firstChild;
  while (cn != null)
  {
    if (cn.tagName == "UL")
    {
      cn.style.visibility="visible";
      cn=null;
    }
    else
      cn=cn.nextSibling;
  }
}

function RAE_rollup (id)
/* Re-hide the contained ul */
{
  var cn;

  cn=id.firstChild;
  while (cn != null)
  {
    if (cn.tagName == "UL")
    {
      cn.style.visibility="hidden";
      cn=null;
    }
    else
      cn=cn.nextSibling;
  }
}

function RAE_back ()
/* Return to previous page */
{
  window.history.back();
}

function RAE_animate ()
/* Animate images on index.html */
{
  /* No "var" so global variables */
  img=["mainpics/three handbags.jpg","mainpics/bubbles scarf.jpg","mainpics/hat mid blues2.jpg","mainpics/bubbles multi2.jpg"];
  num_images=4;
  img_num=0;
  interval=5000; /* 5 seconds */
  window.setTimeout("RAE_next_image()", interval);
}

function RAE_next_image ()
{
  document.getElementById("mainimg").src=img[img_num];
  img_num++;
  if (img_num >= num_images)
    img_num=0;
  window.setTimeout("RAE_next_image()", interval);
}
