function passConfirm(){
	var msg = 'Access to a person\'s contact information requires a password. \n';
	msg += "You may request a password by sending an email to info@unddr.org. \n";
	
	msg += "Continue to password-protected area? \n";
	
	var agree = confirm(msg);
	if (agree){
		return true;
	} else {
		return false;
	}
}

function popContact(recordnum){
	var recordnum;
	var url = "contact.php?p="+recordnum;
	var w = window.open(url, "smallwin", "width=600,height=275,status=yes,resizable=yes");
	
}

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

function popPhoto(pid){
	var pid;
	var url = "photopop.php?p="+pid;
	var w = window.open(url, "smallwin", "width=800,height=600,status=1,resizable=1,scrollbars=1");	
}

function popMap(cid){
	var cid;
	var url = "mappop.php?c="+cid;
	var w = window.open(url, "smallwin", "width=800,height=600,status=1,resizable=1,scrollbars=1");	
}

function slideShow(path_array, caption_array, copy_array){
	var trigger;
	
	//initial slide
	document.getElementById("photo_cell").innerHTML = "<center><a href=\"photos.php\"><img src=" + path_array[0] + " width=\"140\"></a></center>";
	document.getElementById("text_cell").innerHTML = "<em>" + caption_array[index] + "</em>&nbsp;&nbsp;" + copy_array[0];
	
	//the slideshow
	trigger = setInterval( function(){
		document.getElementById("photo_cell").innerHTML = "<center><a href=\"photos.php\"><img src=" + path_array[index] + " width=\"140\"></a></center>";
		document.getElementById("text_cell").innerHTML = "<em>" + caption_array[index] + "</em>&nbsp;&nbsp;" + copy_array[index];
		if (index == (path_array.length - 1)) {
			index = 0;
		} else {
			index++;
		}
	}, 10000);
									 
}

function nothingToSeeHere(mode, pref, mid){

var suff;
var place;

switch (mode){
	case 1:
	suff = ".com";
	break;
	
	case 2:
	suff = ".net";
	break;
	
	case 3:
	suff = ".org";
	break;
}

place = pref + "@" + mid + suff;

document.write(place);

}