There shouldn't be a problem with that javascript, but why are you splitting it up into different substrings?
Try this, it should do the same thing:
if (asppg_showGoogleAds) {
var script = "<script type=\"text/javascript\" src='http://pagead2.googlesyndication.com/pagead/show_ads.js'><\/script>";
document.write(script);
}