#if($ajaxpost)
   $mailSent
#else
<a name="contactForm"></a>
<div class="contact-card-list">
   #foreach($card in $cards)
   
   <div class="contact-card-data card-$velocityCount.toString()" id="card-${velocityCount}">
   
      #set ($theNodeRef = $propertyUtil.getNode($card, "URL"))
     
      #set ($name = false)                        
      #set ($name = $propertyUtil.getString($theNodeRef, "contact-name"))      
      
      #set ($title = false)                        
      #set ($title = $propertyUtil.getString($theNodeRef, "contact-title"))      
      
      #set ($address = false)                        
      #set ($address = $propertyUtil.getString($theNodeRef, "contact-address"))  
      
      #set ($phone = false)                        
      #set ($phone = $propertyUtil.getString($theNodeRef, "contact-phone"))  
            
      #set ($imageNode = false)                        
      #set ($imageNode = $propertyUtil.getNode($theNodeRef, "contact-image"))

      #set ($email = false)
      #set ($email = $propertyUtil.getString($theNodeRef, "contact-email"))
            
      #set ($description = false)
      #set ($descNode = $nodeTreeUtil.findPortletByName($theNodeRef, "Beskrivning")) 
      #if($descNode)
         #set ($description = $outputUtil.getNodeOutput($theNodeRef, $descNode, 1))       
      #end
      <div class="hi-column-11">
   #if($name)
      <h3 class="contact-card-name contact-card-heading fm-subheading4 normal">$name</h3>
   #end
         
         #if($title)
            <p class="contact-card-title">$title</p>
         #end
         
         #if($description)
            <span class="contact-card-desc">$description</span>
         #end
         
          #if($address)
            <p class="contact-card-address">$address</p>
         #end
         
         #if($phone)
            <p class="contact-card-phone"><strong>$phone</strong></p>
         #end
         #if($email)
            <a href="mailto:$email" class="contact-card-phone"><strong>$email</strong></a>
         #end
         
      </div>
      <div class="hi-column-5">
      #if($imageNode || $nodeTreeUtil.findPortletByName($theNodeRef, 'Bild från MediaflowPro'))
        #if($nodeTreeUtil.findPortletByName($theNodeRef, 'Bild från MediaflowPro'))
         <div class="contact-card-image">
            #set ($imageMFP = $propertyUtil.getNode($nodeTreeUtil.findPortletByName($theNodeRef, 'Bild från MediaflowPro'), 'imageID'))
            $imageRenderer.update($imageMFP)
            $imageRenderer.render()
         </div>
        #else
         <div class="contact-card-image">
            $imageRenderer.update($imageNode)
            $imageRenderer.render()
         </div>
         #end
      #end 
      </div>
      
     #set($visible = false)
     #if($showcard == true || ($showcard == $velocityCount.toString()) || $sendcard == true || ($sendcard == $velocityCount.toString()))
         #set($visible = true)
     #end 
      
     #set($intStringSend = $sendcard)
     #set($sendCardInteger = 0)
      
     #set($sendCardIsNum = false)
     #if($sendCardInteger.parseInt($intStringSend) > 0)
         #set($sendCardIsNum = true)
     #end
          
     #set($hidemsg = false)
     #if($sendCardIsNum == true && $sendcard != $velocityCount.toString())
         #set($hidemsg = true)
     #end
    
     #set($intString = $showcard)
     #set($showCardInteger = 0)
      
     #set($showCardIsNum = false)
     #if($showCardInteger.parseInt($intString) > 0)
         #set($showCardIsNum = true)
     #end
          
     #set($hidecard = false)
     #if(($showCardIsNum == true && $showcard != $velocityCount.toString()) || $sendCardIsNum == true && $sendcard != $velocityCount.toString())
         #set($hidecard = true)
     #end  
      
     </div>
   #end   
   </div> 
#end