#EventManagerTmpl000006
#create
#title:Default Event Management System Search
#menuTitle:Default Event Management System Search
#url:default-ems-search-template
#namespace:EventManagementSystem_search
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>

<tmpl_if session.var.adminOn>
        <p><tmpl_var controls></p><br /><br />
</tmpl_if>
<ul>
<tmpl_if canManageEvents>
   <li><a href='<tmpl_var addEvent.url>'><tmpl_var addEvent.label></a></li>
   <li><a href='<tmpl_var manageEvents.url>'><tmpl_var manageEvents.label></a></li>
</tmpl_if>
<li><a href='<tmpl_var managePurchases.url>'><tmpl_var managePurchases.label></a></li>
</ul>
<tmpl_var calendarJS>
<tmpl_unless noSearchDialog>
<script type="text/javascript" src="<tmpl_var ems.wobject.dir>/script/dynamicForms.js"></script>
<script type="text/javascript">
   <tmpl_var search.filters.options>
   var advanced = 0;
   var filterCount = 0;

	function setSelectValue(selObj,newValue) {
		for (var i=0; i<selObj.options.length; i++) {
			selObj.options[i].selected = (selObj.options[i].value==newValue)?true:false;
		}
	}
	
   function toggleAdvanced() {
      var ids = ["cParams","cResults","cSearch"];
	  var toggle = "";
	  for (var i = 0; i < ids.length; i++) {
	     if(advanced == 1) {
		    toggle = "none";
		 }
		 document.getElementById(ids[i]).style.display=toggle;
	  }
	  advanced = (advanced == 1)?0:1;
	  return false;
   }
   
   function toggleTitle(obj) {
      if (obj.checked) {
	     document.getElementById('cs_search_title_td').style.display='inline';
	  } else {
	     document.getElementById('cs_search_title_td').style.display='none';
	  }
   }
   
   function openWin (url, name, param) {
      var newwin = window.open(url, name, param);
      newwin.focus();
   }
   
   function buildFilterList() {
      return "Custom Filter";
   }
   
   function stripDelim(value,delim) {
      value = value.replace(/delim/g,"");
	  return value;
   }

	function unset(array, valueToUnset){
		var output=new Array(0);
		for(var i in array){
			if(i==valueToUnset){continue;}
			output[i]=array[i];
		}
		return output;
	}
	function advSearch() {
		var mee = document.getElementById('basicSearch')
		if (mee) mee.style.display='none';
		var pee = document.getElementById('advSearchDiv');
		if (pee) pee.style.display='block';
	}
	function basicSearch() {
		var vee = document.getElementById('basicSearch');
		if (vee) vee.style.display='block';
		var dee = document.getElementById('advSearchDiv');
		if (dee) dee.style.display='none';
	}
</script>

<div id="basicSearch">
<tmpl_var advSearch.formHeader>
<table width="100%" border="0" padding="1" style="border-bottom:double gray 5px;border-top:solid gray 1px;margin-bottom:5px;margin-top:5px;">
   <tbody id="filterbody">
   <tr>
      <td style="font-weight:bold;width:40%;">Search Keywords:</td>
	  <td style="width:60%;"><input name="searchKeywords" style="width:100%;" /></td>
   </tr>
   
   </tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td align="left"><tmpl_var search.formSubmit></td>
	<td align="right" valign="top"><a href="javascript:void(addField())">Add a custom filter</a></td>
</tr>
</table>
<tmpl_var search.formFooter>
</div>

</tmpl_unless>
<br /><br />

<tmpl_if managePrereqs><p><tmpl_var managePrereqsMessage></p><tmpl_var prereqForm.header></tmpl_if>
<p><tmpl_var message></p>
<p>Your search returned <tmpl_var numberOfSearchResults> results.</p>
<p><tmpl_var addToBadgeMessage></p>

<table width="100%" border="0" cellpadding="8" cellspacing="0" style="border-top:solid gray 2px;border-bottom:solid gray 2px;">
<tr>
<tmpl_if managePrereqs><th>&nbsp;</th></tmpl_if>
<th><tmpl_var name.label></th>
<th><tmpl_var starts.label></th>
<th><tmpl_var ends.label></th>
<th><tmpl_var seats.label></th>
<th><tmpl_var price.label></th>
<th><tmpl_var requirement.label></th>
<th><tmpl_var addToCart.label></th></tr>
<tmpl_loop events_loop>
  <tr<tmpl_unless __ODD__> class="oddRow"<tmpl_else> class="evenRow"</tmpl_unless>>

  <tmpl_if managePrereqs><td><tmpl_var prereqForm.checkbox></td></tmpl_if>
  <td nowrap><tmpl_if canManageEvents><tmpl_var manageToolbar>&nbsp;</tmpl_if><tmpl_var title>
  </td><td><tmpl_var startDate.human>
  </td><td><tmpl_var endDate.human>
  </td><td><tmpl_var seatsRemaining>
  </td><td><tmpl_var price>
  </td><td><tmpl_var requirement>
  </td><td><tmpl_unless eventIsFull><a href="<tmpl_var purchase.url>"><tmpl_var purchase.label></a><tmpl_else><tmpl_var purchase.label><br /></tmpl_unless>
  </td></tr>
</tmpl_loop>
<tmpl_if managePrereqs><tr><td><tmpl_var prereqForm.operator></td></tr></tmpl_if>
</table>
<tmpl_if managePrereqs><tmpl_var prereqForm.submit><tmpl_var prereqForm.footer></tmpl_if>

<table width="100%">
<tr><td align="right"><a href='<tmpl_var continue.url>'><tmpl_var continue.label></a></td></tr>
</table>
<tmpl_var paginateBar>


~~~
<style type="text/css">
tr.oddRow td {
	background-color:#DADADA;
	border-right:solid gray 1px;
}
tr.evenRow td {
	background-color:#E8E8E8;
	border-right:solid gray 1px;
}
.manageEvents {
	margin-top:5px;
	margin-bottom:5px;
}
.datacardtitle {
	background: #3D5690;
	color: white;
	font-family: verdana;
	font-weight: bold;
	font-size:13px;
}

.leftnav{
	padding: 1px 1px 1px 1px;
	background: white;
	color: black;
	font-family: verdana;
	font-weight: bold;
	font-size:11px;
	border: 2px #3D5690 ridge;
}
.leftnavon{
	padding: 1px 1px 1px 1px;
	background: yellow;
	color: black;
	font-family: verdana;
	font-weight: bold;
	font-size:11px;
	border: 2px #3D5690 ridge;
}
.calendartitle {
	background: #3D5690;
	color: white;
	font-family: verdana;
	font-weight: bold;
	font-size:11px;
}
.filter-select {
	font-family: verdana;
	font-size: 10px;
	font-weight: normal;
	color: black;
	width: 105px;
}
.compare-select {
	font-family: verdana;
	font-size: 10px;
	font-weight: normal;
	color: black;
	width: 76px;
}
.filter-text {
	font-family: verdana;
	font-size: 10px;
	font-weight: normal;
	color: black;
	width: 114px;
}
.smLink {
   font-family: verdana;
   font-size: 10px;
   font-weight: normal;
   color: blue;
}

#extendedSearchLayer {display: inline;}

</style>

<link href="^Extras(calendar/calendar-win2k-1.css);" rel="stylesheet" type="text/css" />
