Can't get two functions to initialize each other
<pre><code>function funcA() {
 var fB;

 function init() {
  fB = new funcB(false); //error here
 }

 init();
}

function funcB(usefuncA) {
 var fA;

 function init() {
  if (usefuncA) fA = new funcA();
 }

 init();
}

$(function() {
 var test = new funcB(true);
});
</code></pre>

<p>I know how to get around this problem in C++, but no idea what tricks there are to fix it in javascript.  There is a way, though, right?  I absolutely must have each function in the other, and the only other alternative I can think of is putting the contents of funcB in its own .js file then using PHP to create two versions of funcB, one for funcA to use and one in current place of funcB.  But that's ridiculous...</p>
