function GetEmail(strSID, strAction) {
// item is drop into the buy folder
// send request to the server to update the basket
var httprq = new ActiveXObject("Microsoft.XMLHTTP");
var Doc = new ActiveXObject("Microsoft.XMLDOM");
var retval;
				
Doc.loadXML("<msg><sid>" + strSID + "</sid><action>" + strAction + "</action></msg>" );
httprq.open("POST","popup.asp", false);			
httprq.send(Doc);
retval = httprq.responseText;
			
alert(retval);

}

function ScriptHelp() {
	window.open("formatcode.asp","FormatHelp","scrollbars=yes,dependent=yes,height=600,width=800");
}

function Reset() {
document.msgmain.msg.value = "";
//Assign the input focus to the Msg field
document.msgmain.msg.focus();
}

function EditMsg(mid) {
	document.msglist.action.value = "e";
	document.msglist.mid.value = mid;
	document.msglist.submit();
	return false;
}


function QuoteMsg(mid) {
	document.msglist.action.value = "q";
	document.msglist.mid.value = mid;
	document.msglist.submit();
	return false;
}

function AddMsg() {
	document.msglist.action.value = "a";
	document.msglist.submit();
	return false;
}


function SetPage(iPage) {
	document.msglist.action.value = "p";
	document.msglist.page.value = iPage;
	document.msglist.submit();
	return false;
}


function ToChart() {
	document.msglist.action.value = "c";
	document.msglist.submit();
	return false;
}

function MsgList() {
document.msgmain.action.value = "L," + document.msgmain.mid.value;
document.msgmain.ok.value = "Y";
}

function MsgDelete() {
	if (confirm("Are you sure you want to delete this message?")) { 
		document.msgmain.action.value = "D," + document.msgmain.mid.value;
		document.msgmain.ok.value = "Y";
	}
	else {
		document.msgmain.ok.value = "N";
	}
}

function IsMsg() {
var strTemp = document.msgmain.msg.value;
if (strTemp.length < 1) {
  alert("Announcemnt field cannot be blank");
  document.msgmain.msg.focus();
  return false;
}
return true;
}


function FormSubmit() {

	if (document.msgmain.ok.value != "Y")
		return false;

	if (document.msgmain.action.value == "L," + document.msgmain.mid.value)
		return true;
	  
	if (document.msgmain.action.value == "D," + document.msgmain.mid.value)
		return true;

	if (IsMsg()) {
//	  if (IsVenue()) {
//	    if (IsLocation()) {
//	      if (IsCover()) {
//	        if (IsMonth()) {
//	          if (IsDate()) {
//	             if (IsYear()) {
		            return true;
//		         }
//	          }
//	        }
//	      }
//	    }
//	  }
	}
	return false;
}
