function returnObjById( id ) 
{ 
    if (document.getElementById) 
        var returnVar = document.getElementById(id); 
    else if (document.all) 
        var returnVar = document.all[id]; 
    else if (document.layers) 
        var returnVar = document.layers[id]; 
    return returnVar; 
}

function hideForPopup()
{
  if(top.frames["cmsdesktop"] != null) {
    //alert("test");
  } else if (top.location != location) {
      returnObjById("pageTop").style.display = "none";
      returnObjById("pageBottom").style.display = "none";
      returnObjById("pageNavigation").style.display = "none";
      returnObjById("leftbox").style.display = "none";
      // added by JBEST 4-10-08
      
      
      returnObjById("container").style.maxWidth = "515px";
      returnObjById("torn2").style.background = "#FFFFFF none";
      returnObjById("torn2").style.maxWidth = "515px";
      returnObjById("twocol").style.maxWidth = "515px";
      returnObjById("catpagebox").style.display = "block";
      returnObjById("catpagebox").style.border = "none";
      returnObjById("catpagebox").style.padding = "none";
      returnObjById("catpagebox").style.margin = "none";
      //end Added by JBEST
   }
}
