## #set ($_MathTool.toInteger($count) = 1)
#if ($articles.size() > 0)
## #set ($count = 1)
#foreach ($article in $articles)
## #set ($count = $count + 1)
### EXTRACT DATA STRUCTURE FROM CURRENT PAGE ###
#set ($sds= $_XPathTool.selectSingleNode($article , "system-data-structure"))
### DECLARE VARIABLES ###
#### USING RAW SYSTEM TIME = EPOCH ####
#set ($rOpenDate= $sds.getChild("date").value)
#set ($OpenDate= $_DateTool.getDate($sds.getChild("date").value))
#set ($NowDateInt = $_MathTool.toInteger($NowDate) )
#set ($rCloseDate= $sds.getChild("enddate").value)
#set ($CloseDate= $_DateTool.getDate($sds.getChild("enddate").value))
#set ($rCloseDateInt= $_MathTool.toInteger($rCloseDate) )
#set ($NowDate= $_DateTool.getSystemTime())
#set ($OpenUntilFiled = $sds.getChild("OpenUntilFiled").value)
#set ($JobCat= $_XPathTool.selectSingleNode($sds, "JobPost/JobSearchCategory"))
### INDEX PAGE ###
#set ($indexed = $article.getChild("name").value)
### FORMAT DISPLAY ###
#set ($fCloseDate = $_DateTool.format('MMMM dd yyyy', $CloseDate))
#set ($fNowDate = $_DateTool.format('MMMM dd yyyy', $NowDate))
#set ($DateCompare = $_DateTool.difference($NowDate, $CloseDate))
#set ($Difference = $_MathTool.sub($rCloseDate,$NowDate))
#set($DisplayName = $_SerializerTool.serialize($article.getChild("display-name"), true))
#set($Path = $_SerializerTool.serialize($article.getChild("path"), true))
### LOOPING THROUGH SORTED CATEGORIES LIST ###
#if ($indexed == "index") ## INDEX CHECK BEGINS ##
##
#set($NavHeader= $DisplayName )
#set($NavHeaderUrl= $article.getChild('path').value)
#elseif ($currentJobCat != $JobCat.value) ## EXTRACT CATEGORY TITLE BEGINS ##
#set($CatHeader= $Header.add($JobCat.value))
#end ## INDEX CHECK ENDS ##
#if (($JobCat.value== "Faculty")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0)))
#set($dummy = $Faculty.add($DisplayName))
#set($dummy = $FacultyUrl.add($Path))
#end
#if (($JobCat.value == "Executive")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0)))
#set($dummy = $Executive.add($DisplayName))
#set($dummy = $ExecutiveUrl.add($Path))
#end
#if (($JobCat.value == "Managerial and Professional") && ( ($OpenUntilFiled == "Yes") || ($Difference > 0)))
#set($dummy = $Managerial.add($DisplayName))
#set($dummy = $ManagerialUrl.add($Path))
#end
#if (($JobCat.value== "Support Staff")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0)))
#set($dummy = $Support.add($DisplayName))
#set($dummy = $SupportUrl.add($Path))
#end
#if (($JobCa.valuet== "Information Technology/Technical")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0)))
#set($dummy = $Technical.add($DisplayName))
#set($dummy = $TechnicalUrl.add($Path))
#end
#end
#end
#set ($CatHeader= [0])
### DISPLAY ###
#foreach ($val in $Support)
#set ($countSUrl = 0)
#foreach ($url in $SupportUrl)
#if (($countSUrl == $countS) && $countS > 0)
$val
#end
#set($countSUrl = $countSUrl + 1)
#end
#set($countS = $countS + 1)
#end
### DEALLOCATE MEMORY
#set ($Support= [0])
#set ($SupportUrl= [0])
#foreach ($val in $Managerial )
#set ($countMUrl = 0)
#foreach ($url in $ManagerialUrl )
#if (($countMUrl == $countM) && $countM > 0)
$val
#end
#set($countMUrl = $countMUrl + 1)
#end
#set($countM = $countM + 1)
#end
### DEALLOCATE MEMORY
#set ($Managerial = [0])
#set ($ManagerialUrl= [0])
#foreach ($val in $Technical)
#set ($countTUrl = 0)
#foreach ($url in $TechnicalUrl)
#if (($countTUrl == $countT) && $countT > 0)
$val
#end
#set($countTUrl = $countTUrl + 1)
#end
#set($countT = $countT + 1)
#end
### DEALLOCATE MEMORY
#set ($Technical= [0])
#set ($TechnicalUrl= [0])
#foreach ($val in $Faculty)
#set ($countFUrl = 0)
#foreach ($url in $FacultyUrl )
#if (($countFUrl == $countF) && $countF > 0)
$val
#end
#set($countFUrl = $countFUrl + 1)
#end
#set($countF = $countF + 1)
#end
### DEALLOCATE MEMORY
#set ($Faculty= [0])
#set ($FacultyUrl= [0])
#foreach ($val in $Executive)
#set ($countEUrl = 0)
#foreach ($url in $ExecutiveUrl)
#if (($countEUrl == $countE) && $countE > 0)
$val
#end
#set($countEUrl = $countEUrl + 1)
#end
#set($countE = $countE + 1)
#end
### DEALLOCATE MEMORY
#set ($Executive= [0])
#set ($ExecutiveUrl= [0])