function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}function querySt(a){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){return ft[1]}}}function highLightTab(){if(querySt("SortByMostPopular")!=null){document.getElementById("tab_mostPopulararticles").className="active";document.getElementById("tab_latestarticles").className=""}}function FlipContent(a){if(($("#pnlInTheMagHeader")&&$("#flipperInTheMag")&&$("#pnlWinStuffHeader")&&$("#flipperCompetition"))||($("#pnlPollHeader")&&$("#pnlPubAmmoHeader")&&$("#flipperPoll")&&$("#flipperPubAmmo"))||($("#pnlPhotos")&&$("#pnlMembers"))){switch(a){case"InTheMag":$("#pnlWinStuffHeader").hide();$("#flipperCompetition").hide();$("#pnlInTheMagHeader").show();$("#flipperInTheMag").show();break;case"WinStuff":$("#pnlInTheMagHeader").hide();$("#flipperInTheMag").hide();$("#pnlWinStuffHeader").show();$("#flipperCompetition").show();break;case"Poll":$("#pnlPubAmmoHeader").hide();$("#flipperPubAmmo").hide();$("#pnlPollHeader").show();$("#flipperPoll").show();break;case"PubAmmo":$("#pnlPollHeader").hide();$("#flipperPoll").hide();$("#pnlPubAmmoHeader").show();$("#flipperPubAmmo").show();break;case"LatestPhotos":$(".community_images").toggle();break;case"LatestMembers":$(".community_images").toggle();break}}}addLoadEvent(highLightTab);