// JavaScript Function Library
VENDOR = ''

function imgRot(s,pt,tm) {
  document.images[s].src = "images/"+s+"/"+pt+".jpg";
  ++pt;
  if (pt>5) { pt = 1 };
  setTimeout('imgRot("' + s + '",' + pt + ',' + tm + ')',tm);
}

function verifyDelete(s) { return(confirm("Are you sure you want to delete " + s + "?")); }

function allClients() {
  var sz = document.distrib['MM_EMAILTO[]'].length;
  for (var i=0; i<sz; i++) document.distrib['MM_EMAILTO[]'][i].checked=true;
  return false;
}

function editBroadcast(bcastid)	{ window.open('admin_broadcast_edit.php?bcastid='+bcastid,'broadcast','height=260,width=500,scrollbars,resizable');	return false; }
function editMessage(msgid)		{ window.open('admin_messages_edit.php?msgid='+msgid,'message','height=500,width=500,scrollbars,resizable');		return false; }
function editMeeting(meetid)		{ window.open('admin_meetings_edit.php?meetid='+meetid,'meeting','height=500,width=500,scrollbars,resizable');	return false; }
function editOrdinance(meetid)		{ window.open('admin_ordinances_edit.php?meetid='+meetid,'ordinance','height=500,width=500,scrollbars,resizable');	return false; }

function editNotice(noticeid)		{ window.open('admin_notices_edit.php?noticeid='+noticeid,'notice','height=500,width=500,scrollbars,resizable');	return false; }
function editNewsletter(nid)		{ window.open('admin_newsletters_edit.php?nid='+nid,'newletter','height=520,width=580,scrollbars');			return false; }
function editCommissioner(staffid)	{ window.open('admin_commissioners_edit.php?staffid='+staffid,'staff','height=550,width=550,scrollbars');		return false; }
function editCalendar(eid) {
  window.open('admin_edit_calendar.php?eid='+eid,'calendar','height=600,width=800,scrollbars,resizable');
  return false;
}
function editEvent(eid) {
  window.open('admin_event.php?eid='+eid,'event','height=180,width=500,scrollbars');
  return false;
}
function editPhoto(eid,epid) {
  window.open("admin_photos_edit.php?eid="+eid+"&epid="+epid,'photo','height=600,width=600,scrollbars,resize');
  return false; 
}

function playAudio(aurl,part,tit) {
  window.open("play_audio.php?aurl="+aurl+"&part="+part+"&title="+tit,'audio','height=200,width=600,scrollbars,resize');
  return false; 
}