Page is a not externally linkable
-- Google AdSense
---- Responsive Design and AdSense
denisl - 7:13 am on Sep 27, 2012 (gmt 0)Thread source:: http://www.webmasterworld.com/google_adsense/4430922.htm
I assume google won't like it as you are changing their code.
Wouldn't it be better to have 3 complete ad codes and use your script to select the appropriate one?
Brought to you by WebmasterWorld: http://www.webmasterworld.com