Index: temp/branches/ec-cube-beta/data/Smarty/templates/campaign/index.tpl
===================================================================
--- temp/branches/ec-cube-beta/data/Smarty/templates/campaign/index.tpl	(revision 11029)
+++ temp/branches/ec-cube-beta/data/Smarty/templates/campaign/index.tpl	(revision 11031)
@@ -18,11 +18,13 @@
 }
 
-if(<!--{$tpl_test}-->) {
-	function init() {
+function init() {
+	if(<!--{$tpl_test}-->) {
 		alert(test());
 		window.location = './index.php?test=1&ids=' + ids;
 	}
-	window.onload = init;
 }
+
+window.onload = init;
+
 //-->
 </script>
