// //Correcao do JSCookMenu que alterava o tamanho do layout da pagina em alguns casos, quando acessado algum menu fazendo com que os submenus //nao fossem apresentados corretamente de acordo com a posicao que deveriam surgir. // function cmGetHorizontalAlign (obj, mode, p, subMenuWidth) { var horiz = mode.charAt (2); if (!(document.body)) return horiz; var body = document.body; var browserLeft; var browserRight; if (window.innerWidth) { // DOM window attributes browserLeft = window.pageXOffset; browserRight = window.innerWidth + browserLeft; } else if (body.clientWidth) { // IE attributes browserLeft = body.clientLeft; browserRight = body.clientWidth + browserLeft; } else return horiz; if (mode.charAt (0) == 'h') { if (horiz == 'r' && (cmGetXAt (obj) + subMenuWidth) > browserRight) horiz = 'l'; if (horiz == 'l' && (cmGetXAt (obj) + cmGetWidth (obj) - subMenuWidth) < browserLeft) horiz = 'r'; return horiz; } else { if (horiz == 'r' && (cmGetXAt (obj) + cmGetWidth (obj) + subMenuWidth) > browserRight) horiz = 'l'; if (horiz == 'l' && (cmGetXAt (obj, p) - subMenuWidth) < browserLeft) horiz = 'r'; return horiz; } }