

function newWindow2(page,target,winLoc,h,w,scroll,menu,tool,resize,address,status) {
// Clicking on a link opens a new window with specified properties
var dw=50
var dh=60

// Determine location of window
if (winLoc == 'center') {
  var posx=(screen.width - (w+dw))/2
  var posy=(screen.height - (h+dh))/2
}
else if (winLoc == 'lowright') {
  var posx=(screen.width - (w+dw))
  var posy=(screen.height - (h+dh))
}
else if (winLoc == 'upright') {
  var posx=(screen.width - (w+dw))
  var posy=0
}
else if (winLoc == 'lowleft') {
  var posx=0
  var posy=(screen.height - (h+dh))
}
else if (winLoc == 'upleft') {
  var posx=0
  var posy=0
}

// Set window properties
windowprops = "height=" + h + ",width=" + w + ",location=no, left=" + posx + ",screenx=" + posx + ",top=" + posy 
+ ",screeny=" + posy + ",scrollbars=" + scroll + ",menubar=" + menu + ",toolbar=" + tool + ",resizable=" + resize + ",location=" + address + ",status=" + status;

// Open new window
var Thewin=window.open(page, target, windowprops);
	Thewin.opener= window;
	Thewin.focus();
//	Thewin.location.href = page;
	return false;
}

function showAlert(){	if (!confirm ("This will make selected images viewable (All images are viewable by default). Continue?")) return false;	return true;}function deleteFromAll(){	if (!confirm ("This will make selected images hidden to all but admin users. Continue?")) return false;	return true;}function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}