{   
  function getCookie(c_name)  {
  
    if (document.cookie.length>0) {
    
      c_start=document.cookie.indexOf(c_name + "=")
      
      if (c_start!=-1) {
       
        c_start=c_start + c_name.length+1 
        c_end=document.cookie.indexOf(";",c_start)
        if (c_end==-1) c_end=document.cookie.length
          return unescape(document.cookie.substring(c_start,c_end))
      } 
    }
    
    return null
  }
  
  function displayPromos() {
    region = getCookie('region');
        
    //Airmiles large slot under flash
    switch(region) {
      case "qc":
      case "nb":
      document.write('<a href="CRVContest.aspx"><img title="CRV Contest" alt="CRV Contest" src="/flash/airmilesPagePromos/smallPromos/concours_CRV_en.png" border="0" /></a>');
	  //document.write('<a onclick="window.open(\'popup.aspx?id=12884\',null,\'height=500, width=700,status= no, resizable=no,scrollbars=yes, toolbar=no,location=no,menubar=no \');return false;" href="#"><img title="Reward Yourself!" alt="Reward Yourself!" src="/flash/airmilesPagePromos/smallPromos/promo_recompense_en_qcnb.png" border="0" /></a>');
      break;
      case "on":
      document.write('<img title="Reward Yourself!" alt="Reward Yourself!" src="/flash/airmilesPagePromos/smallPromos/promo_recompense_en_on.png" border="0" />');
      break;
    }
    
  }
  displayPromos();

}



