//cookie functions taken from somewhere, can't remember where
function createCookie(nameOfCookie,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = nameOfCookie+"="+value+expires+"; path=/";
}


function readCookie(nameOfCookie) {
  var nameEQ = nameOfCookie + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function delCookie(NameOfCookie) {
  if (readCookie(NameOfCookie)) {
    document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}


// this function opens a pop-up window
var newWin;

function popUp(page, name, details) 
{
	newWin=window.open(page, name, details);
	newWin.focus();
	return false;
}
/* Use this in the A HREF tag:

Standard (nothing but the file):

<a href="images/image.jpg" onClick="return popUp('images/image.jpg', 'imageName', 'width=xxx,height=xxx')"></a>

Custom (all the options):

<a href="images/image.jpg" onClick="return popUp('images/image.jpg', 'imageName', 'width = xxx,height = xxx,
directories = no,location = no, menubar = no,resizable = no,scrollbars = no, status = no,
toolbar = no,screenX = xxx,screenY = xxx,top = xxx,left = xxx')"></a>

end pop window stuff
*/

