
function popUp(URL) {
	window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=950,height=750,left=100,top=0');
}

function popUp_tell_a_friend(URL) {
	window.open(URL, '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=500,left=362,top=159');
}

function popUp_album_create(URL) {
	window.open(URL, '', 'toolbar=0, scrollbars=0, toolbar=0, titlebar=0, directories=0, status=0, location=0, statusbar=0, menubar=0, resizable=0, width=400, height=160, left=362, top=159');
}

function slideShow(URL) {
	window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=710,height=610,left=250,top=25');
}


function photoViewer(URL) {
	window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=710,height=660,left=250,top=10');
}

function create_window (URL) {
	window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=880,height=610,left=0,top=0');
}

function create_window_2 (URL) {
	window.location.replace(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,left=10,top=10');
	window.resizeTo(980,710);
 	if (window.focus) {newwin.focus()}
 	return false;
}

function create_window_small(url) 
{
 var _x = 980;
 var _y = 770;
 params  = 'width='+screen.width;
 params  = ', height='+screen.height;
 params  = ', top=0, left=0'
 params += ', fullscreen=yes';
 params += ', scrollbars=yes';

 newwin=window.location.replace(url,'windowname4', params);
 window.resizeTo(_x,_y);
 if (window.focus) {newwin.focus()}
 return false;
}

function create_window_full(url) 
{
 var _x = (screen.width-5);
 var _y = (screen.height-30);
 params  = 'width='+screen.width;
 params += ', height='+screen.height;
 params += ', top=0, left=0'
 params += ', fullscreen=yes';
 params += ', scrollbars=yes';

 newwin=window.location.replace(url,'windowname4', params);
 window.resizeTo(_x,_y);
 if (window.focus) {newwin.focus()}
 return false;
}

function submitPressed() { 
document.form.submitButton.disabled = true;
document.form.cancelButton.disabled = true; 
document.form.submit(); 
}

function cancelPressed() { 
document.form.cancelButton.disabled = true;
document.form.submitButton.disabled = true; 
window.open("index.html"); 
}

function cancelPressed_member() { 
document.form.cancelButton.disabled = true;
document.form.submitButton.disabled = true; 
window.open("member_index.php"); 
}

function create_window_2 (image,width,height) {

	// add some pixels to the width and heigth.
	width = width + 50;
	height = height + 150;

	// if the window is already open resize it.
	if (window.popup_window && !window.popup_window.closed) {
		window.popup_window>resizeTo(width, height);
	}

	// set the windows properties
	var window_specs = "location=no, scrollbars=yes, menubars=yes, toolbar=no, imagetoolbar=yes, resizable=yes, status=yes, left=0, top=0, width=" + width + ", height=" + height;

	// set the url
	var url = image;

	// create the popup window
	popup_window = window.open(url, "PictureWindow", window_specs);
	popup_window.focus();

} // end of function.

function ClearText(){
document.form.guest_pin.value = "";
}

function confirm_Delete() {
var agree=confirm("Are you sure you want to delete this photo?");
if (agree)
	return true ;
else
	return false ;
}

function refreshParent() {
  window.opener.location.href = window.opener.location.href;

  if (window.opener.progressWindow)
		
 {
    window.opener.progressWindow.close()
  }
  window.close();
}

function CheckAll(fmobj) {
  for (var i=0;i<fmobj.elements.length;i++) {
    var e = fmobj.elements[i];
    if ( (e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled) ) {
      e.checked = fmobj.allbox.checked;
    }
  }
}

//==========================================
// Check all or uncheck all?
//==========================================
function CheckCheckAll(fmobj) {
  var TotalBoxes = 0;
  var TotalOn = 0;
  for (var i=0;i<fmobj.elements.length;i++) {
    var e = fmobj.elements[i];
    if ((e.name != 'allbox') && (e.type=='checkbox')) {
      TotalBoxes++;
      if (e.checked) {
       TotalOn++;
      }
    }
  }
  if (TotalBoxes==TotalOn) {
    fmobj.allbox.checked=true;
  }
  else {
   fmobj.allbox.checked=false;
  }
}

function enableob(o) { eval(o+".disabled = false"); }
function disableob(o) { eval(o+".disabled = true"); }
function toggleform(formstr,chkobstr,obstr) {
var checked = eval(formstr+"."+chkobstr+".checked");
var obs = obstr.split(",");
  for (i = 0; i < obs.length; i++) {
  obs[i] = formstr+"."+obs[i];
  }
  if (checked == false) {
    for (i = 0; i < obs.length; i++) {
    disableob(obs[i]);
    }
  }
  else {
    for (i = 0; i < obs.length; i++) {
    enableob(obs[i]);
    }
  }
}

link = new Boolean()
// link = false
function showHtml() {
var zoneCode
zoneCode = ""
zoneCode += "<p class='text_07'>Public Albums<?php echo albums_pulldown($row[3]); ?>"
//if (link) {
//document.getElementById("testZone").innerHTML = ""
//link = false
//} else {
document.getElementById("testZone").innerHTML = zoneCode
link = false
}
//}


link_secure = new Boolean()
// link_secure = false
function showHtml_secure() {
var zoneCode
zoneCode = ""
zoneCode += "<p class='text_07'>Secure Albums<?php echo albums_pulldown_secure($row[3]); ?>"
//if (link_secure) {
//document.getElementById("testZone").innerHTML = ""
//link_secure = false
//} else {
document.getElementById("testZone").innerHTML = zoneCode
link_secure = true
}
//}