multiple gui windows

I want to call two different gui windows from sperate scripts, one in c# and the other in JS, the gui’s are functional when presented seperately but if present at the same time, the gui done in JS does not function, everything is visible but none of the buttons work. The c# gui will still run fine. here is an example of the JS GUI I have

//var stlights1 : GameObject;
var go : GameObject;
var cur1 : GameObject;
var cur2 : GameObject;
var cur3 : GameObject;
var cur4 : GameObject;
var cur5 : GameObject;
var cur6 : GameObject;
//var stlightsBool = false;
var windowRect6 : Rect = Rect (500,10,200,400);

function OnGUI () {
	windowRect6 = GUI.Window (6, windowRect6, wind, "City Controls");
	}
	
	function wind (windowID : int) {
	
//stlightsBool = GUI.Toggle (Rect (10, 20, 100, 20), stlightsBool, "Street Lights");


//if (GUI.enabled == stlightsBool) stlights1.active = true;
//if (GUI.enabled != stlightsBool) stlights1.active = true;


	if (GUI.Button (Rect (10,50,150,50), "Current Layout")) {
		
		go.active = false;
		cur1.active = true;
		cur2.active = true;
		cur3.active = true;
		cur4.active = true;
		cur5.active = true;
		cur6.active = true;
		
		}

	if (GUI.Button (Rect (10,110,150,50), "Hotel Proposal")) {
	
		go.active = true;
		cur1.active = false;
		cur2.active = false;
		cur3.active = false;
		cur4.active = false;
		cur5.active = false;
		cur6.active = false;
		
	}
}

any ideas?

note that the

//call commands

are ones I currently have disabled

Can you post the C# script too? Also, is there any information you can give about how you are using the scripts? Are they both on the same object or two different objects? Do you have GUI.depth set the same or differently for each script?

They are on two different game objects and GUI.depth is not set at all, I am unfamiliar with it but will look it up in the scripting reference. I am still new to scripting, and more literate with JS than C#, the C# script was written by someone else… here is the juice of it for the GUI windows

Rect windowRect1 = new Rect (10, 10, 295, 360); 
	Rect windowRect2 = new Rect (10, 375, 295, 100);
	
.....//more code/scripts in here, it is a very long script

    void OnGUI()
    {

		if (debug)
		{	
			
			if (errorWindowValue == false)
			{
			windowRect1 = GUI.Window (0, windowRect1, doMyWindow, "Sun Positioner Settings"); 
			GUI.FocusWindow (0);
			}
			
			else
			{
			windowRect1 = GUI.Window (0, windowRect1, doMyWindow, "Sun Positioner Settings"); 
			windowRect2 = GUI.Window (1, windowRect2, errorWindow, "Incorrect Format Entered");
			}
		}

	}
}

I also forgot to mention that mouse over effects work on both gui’s the JS one just won’t register a click for some reason. It is as if it will not bring the window to the front on click?

…After looking at it some more it seems to be an issue with the GUI.FocusWindow function, i might try taking it out, lets see…

That was it!!! Great i figured it out. Thanks for the help, the GUI.depth note you made gave me the hint i needed to find this issue, thanks