Determining the page type through template variables

Is it possible to determine the page type through template variables?

What I am trying to do is work out if the page is the forum index or not, the reason being is to do with the width for an advert and whether or not there is a sidebar or not (as the sidebar adds about 320px+ to the page before it is moved to the bottom when being responsive).

Hope that makes sense???!
Perfect, exactly what I was after - cheers!

I have already clocked your responsive adsense guide and will be taking full advantage of it also, so thanks again :)