function CheckPictureCommentForm() {
	var errorMsg = "";
	var errorMsgLong = "";

	if (document.ForumForm.ContentArea.value.length < 2) {
		errorMsg += "\n\tComment  \t\t- Enter your Comment Text";
	    } 
	    
	if ((errorMsg != "") || (errorMsgLong != "")){
		msg = "_____________________________________________________________________\n\n";
		msg += "There are problems with the data you submitted\n";
		msg += "_____________________________________________________________________\n\n";
		msg += "You must fix the following fields: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n" + errorMsgLong);
		return false;
	}
	

	return true;
}


function CheckAlbumCommentForm() {
	var errorMsg = "";
	var errorMsgLong = "";

	if (document.ForumForm.ContentArea.value.length < 2) {
		errorMsg += "\n\tComment  \t\t- Enter your Comment Text";
	    } 
	    
	if ((errorMsg != "") || (errorMsgLong != "")){
		msg = "_____________________________________________________________________\n\n";
		msg += "There are problems with the data you submitted\n";
		msg += "_____________________________________________________________________\n\n";
		msg += "You must fix the following fields: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n" + errorMsgLong);
		return false;
	}
	

	return true;
}

function CheckFormEmail() {

	var errorMsg = "";
	var errorMsgLong = "";
	
	if (document.MailForm.Name.value.length < 2) {
		errorMsg += "\n\tYour Name \t\t- Enter your own name";
    } 
	

	var AtSym    = document.MailForm.From.value.indexOf('@');
	var Period   = document.MailForm.From.value.lastIndexOf('.');
	var Space    = document.MailForm.From.value.indexOf(' ');
	var Length   = document.MailForm.From.value.length - 1 ;

	if ((AtSym < 1) ||                  
    (Period <= AtSym+1) || 
    (Period == Length ) ||      
    (Space  != -1))      
   {  
      errorMsg += "\n\tYour Email Address \t\t- Enter a valid email address";
   }
   	
	if (document.MailForm.Content.value.length < 2) {
		errorMsg += "\n\tMessage \t\t\t- Enter a Message";
    } 
	
	if ((errorMsg != "") || (errorMsgLong != "")){
		msg = "_____________________________________________________________________\n\n";
		msg += "There were problems with the information you submitted\n";
		msg += "_____________________________________________________________________\n\n";
		msg += "Please correct the following fields: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n" + errorMsgLong);
		return false;
	}
	

	return true;
}

function OpenAlbumCommentDelete(AC_ID,AL_ID,Source)
{
strTarget = '/pictures/control/delete-album-comment.asp?comment='+AC_ID+'&album='+AL_ID+'&src='+Source;
window.open(strTarget, '', config='width=500,height=200,resizable=0,scrollbars=1,status=no,location=0,menubar=0,directories=no,copyhistory=no');
}

function OpenPictureCommentDelete(PC_ID,PI_ID,Source)
{
strTarget = '/pictures/control/delete-picture-comment.asp?comment='+PC_ID+'&pic='+PI_ID+'&src='+Source;
window.open(strTarget, '', config='width=500,height=200,resizable=0,scrollbars=1,status=no,location=0,menubar=0,directories=no,copyhistory=no');
}

function ViewSignature()
{
strTarget = '/forum/signature-view.asp';
window.open(strTarget, '', config='width=700,height=300,resizable=1,scrollbars=1,status=no,location=0,menubar=0,directories=no,copyhistory=no');
}

function EditSignature()
{
strTarget = '/forum/signature-edit.asp';
window.open(strTarget, '', config='width=700,height=300,resizable=1,scrollbars=1,status=no,location=0,menubar=0,directories=no,copyhistory=no');
}

