diff --git google_appliance.module google_appliance.module
index e0e62dd..2e4e46e 100644
--- google_appliance.module
+++ google_appliance.module
@@ -405,12 +405,17 @@ function google_appliance_search_view($query = '', $sort = NULL) {
  *    php array structure to iterate when displaying results
  */
 function google_appliance_parse_device_response_xml($gsa_xml) {
-
+  $promoted_items_to_top_of_search = 5; // any integer
+  $promoted_items_domain_name = 'your_domain_name';
+  $promoted_results = array();
+  $occurrence = 0;
+  
   $results = array();
 
   // look for xml parse errors 
   libxml_use_internal_errors(TRUE);
   $payload = simplexml_load_string($gsa_xml);
+
   
   if (!$payload) {  // XML parse error(s)
     $errors = array();
@@ -448,27 +453,41 @@ function google_appliance_parse_device_response_xml($gsa_xml) {
       }
 
       foreach ($payload->xpath('//R') as $res) {
-        $result = array();
-        
-        // handy variants of the url for the result
-        $result['abs_url'] = (string) $res->U; 
-        $result['enc_url'] = (string) $res->UE; // urlencoded URL of result
-        $result['short_url'] = substr($result['abs_url'], 0, 80) 
-          . (strlen($result['abs_url']) > 80 ? '...' : '');  
-        
-        // result info
-        $result['title'] = (string) $res->T;                  
-        $result['snippet'] = (string) $res->S;                
-        $result['crawl_date'] = (string) $res->FS['VALUE'];
-        $result['level'] = isset($res['L']) ? (int) $res['L'] : 1;
+        $result = array();          
         
-        $results['entry'][] = $result;
+          // handy variants of the url for the result
+          $result['abs_url'] = (string) $res->U;
+  
+           
+          $result['enc_url'] = (string) $res->UE; // urlencoded URL of result
+          $result['short_url'] = substr($result['abs_url'], 0, 80) 
+            . (strlen($result['abs_url']) > 80 ? '...' : '');  
+          
+          // result info
+          $result['title'] = (string) $res->T;                  
+          $result['snippet'] = (string) $res->S;                
+          $result['crawl_date'] = (string) $res->FS['VALUE'];
+          $result['level'] = isset($res['L']) ? (int) $res['L'] : 1;
+                    
+          if (substr((string)$res->U, 11, strlen($promoted_items_domain_name)) == $promoted_items_domain_name && $occurrence < $promoted_items_to_top_of_search && !($_GET["page"])) {
+            $occurrence++;
+            $result['result_domain'] = $promoted_items_domain_name;
+            $promoted_results['entry'][] = $result;
+          
+          } else {
+            $result['result_domain'] = substr((string)$res->U, 11, strpos(substr((string)$res->U, 11), '.'));
+            $results['entry'][] = $result;
+          } 
       }
+      
+    if ($promoted_results['entry']) { 
+      $results['entry'] = array_merge($promoted_results['entry'], $results['entry']); }
+      
     }
   }
+  
   return $results;
 }
-
 /**
  * get related search via the Google Search Appliance clustering service
  * @return
diff --git theme/google-appliance-result.tpl.php theme/google-appliance-result.tpl.php
index 8a2c97c..4c84290 100644
--- theme/google-appliance-result.tpl.php
+++ theme/google-appliance-result.tpl.php
@@ -13,7 +13,7 @@
  */
 //dsm($variables);
 ?>
-<li class="search-result <?php print $classes; ?>" id="result-<?php print $result_idx; ?>"<?php print $attributes; ?>>
+ <li class="search-result <?php print $classes .' '. $result_domain; ?>" id="result-<?php print $result_idx; ?>"<?php print $attributes; ?>>
   
   <?php print render($title_prefix); ?>
   <h3 class="title"<?php print $title_attributes; ?>>
