function photo_swap(image2){
	document.images.big_photo.src = 'images/photos/' + image2;
}

function emailCheck(FormName){
	var FormOk = true;

	/* Valid Email Address */
	if(document.forms[FormName].email.value.match(/^[\w.-]+@[\w-]+(\.[\w-]+){1,}$/) == null) {
		alert("Please Enter a Valid Email Address");
		document.forms[FormName].email.focus();
		FormOk = false;
	}

	if(FormOk == true){
		document.forms[FormName].submit();
	}
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function delpop(id,which){
	var monkey = false;
	monkey = confirm("Are you sure you want to delete this?");
	if(monkey == true){
		window.location = "alter.php?method=kill_"+ which +"&id=" + id;
	}
}

function ppop(id){
	var filename = "photos.php?ser="+id;
	var yourWidth = "400";
	var yourHeight = "125"
	w = screen.availWidth;
	h = screen.availHeight;
	var popW = yourWidth; 
	var popH = yourHeight;
	var topPos = (h-popH)/2; 
	var leftPos = (w-popW)/2;
	myWindow = window.open(filename,"openup",'width='+popW+',height='+popH+',top='+topPos+',left='+leftPos+',scrollbars=no');
			if (!myWindow.opener) myWindow.opener = self;
	myWindow.focus();
}