function check() { var posStandard = jQuery("head>script[src='/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js']").prevAll().size(); var posStandardApp = jQuery("head>script[src='/tobago-resource/html/standard/standard/script/tobago.js']").prevAll().size(); var posScarborough = jQuery("head>script[src='/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago.js']").prevAll().size(); var posApp = jQuery("head>script[src='/script/tobago.js']").prevAll().size(); jQuery(Tobago.Utils.escapeClientId("page:standard")).val(posStandard); jQuery(Tobago.Utils.escapeClientId("page:standardApp")).val(posStandardApp); jQuery(Tobago.Utils.escapeClientId("page:scarborough")).val(posScarborough); jQuery(Tobago.Utils.escapeClientId("page:application")).val(posApp); if (posStandard >= posStandardApp) { LOG.error("Script for theme 'standard' must be included before the application specific script of 'standard'!"); } if (posStandardApp >= posScarborough) { LOG.error("Application specific script for theme 'standard' must be included before the script of 'scarborough'!"); } if (posScarborough >= posApp) { LOG.error("Script for theme 'scarborough' must be included before the application specific script!"); } }