if (typeof(PltCoupon) == "undefined")
{
   var PltCoupon = {
      OrganizationName: null,
      Address1: null,
      Address2: null,
      Address3: null,
      City: null,
      State: null,
      Phone: null,
      FinalURL: null,
      OffsetY: 0,
      
      ShowCoupon: function(OrganizationName, Address1, Address2, Address3, City, State, Phone, FinalURL)
      {
         PltCoupon.OrganizationName = OrganizationName;
         PltCoupon.Address1 = Address1;
         PltCoupon.Address2 = Address2;
         PltCoupon.Address3 = Address3;
         PltCoupon.City = City;
         PltCoupon.State = State;
         PltCoupon.Phone = Phone;
         PltCoupon.FinalURL = FinalURL;

         // Works with all Browsers except Explorer
         if (self.pageYOffset)
         {
            PltCoupon.OffsetY = self.pageYOffset;
         }
         // IE6 Strict mode
         else if (document.documentElement && document.documentElement.scrollTop)
            
         {
            PltCoupon.OffsetY = document.documentElement.scrollTop;
         }
         // Should work with all other IE Versions
         else if (document.body)
         {
            PltCoupon.OffsetY = document.body.scrollTop;
         }

         try
         {
            window.scrollTo(0,260);
         }
         catch(err)
         {
         }
         
         var oWnd = radopen(null, "CouponWindow");
         oWnd.SetUrl(oWnd.GetUrl());
      },

      OnClientShow: function(radWindow)
      {
         //Create a new Object to be used as an argument to the radWindow
         var arg = new Object();                    
         //Using an Object as a argument is convenient as it allows setting many properties.
         arg.OrganizationName = PltCoupon.OrganizationName;
         arg.Address1 = PltCoupon.Address1;
         arg.Address2 = PltCoupon.Address2;
         arg.Address3 = PltCoupon.Address3;
         arg.City = PltCoupon.City;
         arg.State = PltCoupon.State;
         arg.Phone = PltCoupon.Phone;
         arg.FinalURL = PltCoupon.FinalURL;
                            
         //Set the argument object to the radWindow        
         radWindow.Argument = arg;
      },      
      
      OnClientClose: function(radWindow)
      {
         try
         {
            window.scrollTo(0,PltCoupon.OffsetY);
         }
         catch(err)
         {
         }
      }
   };
}
