var jsCode = ''; var jsCodeStatic = ''; jsCodeStatic = jsCodeStatic + ''; if ( location.href.indexOf('ev.php-URL_ID') != -1 ) { document.write(jsCodeStatic); } else { document.write(jsCode); }