anchor.diff:  	</cfsavecontent>
   
   	<cfreturn rtn >
  +	--->
   </cffunction>
   
   <cffunction name="getPageUrl" output="no" returntype="string">
  
positive.code: 	<cfargument name="type" type="string" required="true" default="NA"/>
  	<cfargument name="filter" type="string" required="false" default=""/>
  
  <!---
  	<cftry>
  --->
  		<cfquery datasource="cah" name="qryAssets">
  
  		<cfif arguments.type eq "user" >
  			SELECT * FROM cah.asset 
  			WHERE 	submitter = '#arguments.filter#'
  		<cfelseif arguments.type eq "open" >
  			SELECT 	*
  			FROM	cah.asset 
  			WHERE	(final_status IS NULL or
  					final_status = '')
  					and convert_status = 1
  		<cfelseif arguments.type eq "rejected" >
  			SELECT 	*
  			FROM	cah.asset 
  			WHERE	final_status = 'rejected'
  		<cfelseif arguments.type eq "accepted" >
  			SELECT 	*
  			FROM	cah.asset 
  			WHERE	final_status = 'accepted'
  		<cfelseif arguments.type eq "all" >
  			SELECT * FROM cah.asset 
  			WHERE 	convert_status = 1
  		<cfelseif arguments.type eq "unconverted" >
  			SELECT * FROM cah.asset 
  			WHERE 	convert_status = 0
  		<cfelse>
  			SELECT a.* FROM cah.asset a LEFT JOIN cah.approval b ON a.uuid = b.assetid
  			WHERE	(	a.final_status IS NULL or
  						a.final_status = '') AND 
  					a.submitter <> '#session.mura.userid#' 
  					and convert_status = 1
  				<cfif $.currentUser().isInGroup("Reviewer") >
  					AND a.uuid NOT IN  (	SELECT c.assetid FROM cah.approval c
  											WHERE 	c.assetid = a.uuid AND
  													c.reviewtype = 'peer' AND 
  													c.approver = '#session.mura.userid#')
  				<cfelseif $.currentUser().isInGroup("Developer") >
  		 			AND (	SELECT Count(*) FROM cah.approval c
  							WHERE 	c.assetid = a.uuid AND
  									c.reviewtype = 'peer') > 1 
  					GROUP BY a.uuid
  				</cfif>
  
  		</cfif>
  		
  		</cfquery>
  
  <!---
  		<cfcatch><cfrethrow><cfset qryAssets = QueryNew("none") /></cfcatch>		
  	</cftry>
  --->
  	<cfreturn qryAssets />
  </cffunction>
  
  
negative.code: 
  	<cfset sldImg = "#$.siteConfig('themeAssetPath')#/images/cah/slide-general-default.png" />
  
  	<cfset feed=$.getBean("feed").loadBy(name=arguments.colFeed,siteID=$.event("siteid")) />
  	<cfset itFeed=feed.getIterator() />
  
  	<cfif itFeed.hasNext()>
  	<cftry>
  
  		<cfset imgs=$.getBean("feed").loadBy(name=arguments.colImages,siteID=$.event("siteid")) />
  		<cfset itImage=imgs.getIterator() />
  		<cfset imgStore = StructNew() />
  		<cfif itImage.hasNext()>
  			<cfscript>
  			while(itImage.hasNext()) {
  				imgItem = itImage.next();
  				// Set Cat Name and Default
  				if (Len(Trim(imgItem.getValue('remoteCatSlide')))) {
  					catName = imgItem.getValue('remoteCatSlide');
  				} else {
  					catName = "imgDefault";
  				}
  				
  				// Determine Image to Use 
  				if (Len(Trim(imgItem.getImageUrl('cycle')))) {
  					catUrl = imgItem.getImageUrl('cycle');
  				} elseif (Len(Trim(imgItem.getBody())) and imgItem.getBody() does not contain "<p>") {
  					catUrl = imgItem.getBody();
  				} else {
  					catUrl = sldImg;
  				}
  	
  				if (NOT StructKeyExists(imgStore, catName)) {
  					tmpArray = ArrayNew();
  					ArrayAppend(tmpArray, catUrl);
  					StructInsert(imgStore, catName, Duplicate(tmpArray));
  				} else {
  					tmpArray = StructFind(imgStore, catName);
  					ArrayAppend(tmpArray, catUrl);
  					StructUpdate(imgStore, catName, Duplicate(tmpArray));
  				}
  			}
  			</cfscript>
  		</cfif>
  
  		<cfsavecontent variable="rtn">
  			<script>
  			function newsClick(url, target, param){
  				if (!target.length || target == "_self") {
  					window.location.href = url;
  				}
  				else {
  					newsOpen = window.open(url, target);
  					newsOpen.focus();
  				}
  			}
  			</script>
  	
  			<cfoutput>
  				<div id="homehero" class="stonebordersm">
  					<div class="cycle-slideshow" 
  							data-cycle-fx="fade" 
  							data-cycle-pause-on-hover="true" 
  							data-cycle-speed="1500"
  							data-cycle-manual-speed="700"
  							data-cycle-timeout="7500"
  					    	data-cycle-swipe="true"
  							data-cycle-swipe-fx="scrollHorz"
  							data-cycle-caption-plugin="caption2"
  							data-cycle-overlay-fx-sel=">div"
  							data-cycle-overlay-fx-in="fadeIn"
  							data-cycle-overlay-fx-out="fadeOut"
  							data-cycle-caption-fx-in="slideDown"
  							data-cycle-caption-fx-out="slideUp"
  					>
  						<div class="cycle-prev"></div>
  						<div class="cycle-next"></div>
  	
  						<cfloop condition="itFeed.hasNext()">
  							<cfset item=itFeed.next()>
  							<cfset makeClick = "newsClick('/index.cfm/#item.getValue('filename')#','#item.getValue('target')#','#item.getValue('targetparams')#');" >
  	
  							<cfif StructKeyExists(imgStore, item.getValue('remoteCat')) >
  								<cfset thisCatImgs = StructFind(imgStore, item.getValue('remoteCat')) />
  								<cfif IsArray(thisCatImgs) >
  									<cfset lottery = RandRange(1, ArrayLen(thisCatImgs)) />
  									<cfset curSldImg = thisCatImgs[lottery] />
  								<cfelse>
  									<cfset curSldImg = sldImg />
  								</cfif>
  							<cfelseif StructKeyExists(imgStore, "imgDefault") >
  								<cfset thisCatImgs = StructFind(imgStore, "imgDefault") />
  								<cfset lottery = RandRange(1, ArrayLen(thisCatImgs)) />
  								<cfset curSldImg = thisCatImgs[lottery] />
  							<cfelse>
  								<cfset curSldImg = sldImg />
  							</cfif>
  							
  							<cfif Len(Trim(item.getValue('title'))) and item.getValue('title') neq "<p></p>" >
  								<cfset sldTitle = Replace(item.getValue('title'), """", "","all") />
  							<cfelse>
  								<cfset sldTitle = "Untitled" />
  							</cfif>
  							<cfif Len(Trim(item.getSummary())) and item.getSummary() neq "<p></p>" >
  								<cfset sldDesc = Replace(item.getSummary(), """", "","all") />
  							<cfelse>
  								<cfset sldDesc = "<p>&nbsp;</p>" />
  							</cfif>
  							<img src="#curSldImg#" onclick="#makeClick#" data-cycle-title="#sldTitle#" data-cycle-desc="#sldDesc#">
  						</cfloop>
  	
  						<div class="cycle-overlay"></div>
  						<div class="cycle-caption"></div>
  					</div>
  				</div>
  			</cfoutput>
  		</cfsavecontent>
  		<cfcatch type="any"><p><strong>ERROR:</strong> Unable to display slideshow.</p></cfcatch>
  	</cftry>
  	</cfif>
  
  	<cfreturn rtn >
  
  