Door code help (Javascript)

I’m having a problem with my door code:

var myLevel : String;

function Update () {
	if(Input.GetButtonDown ("Interact") && function OnCollisionEnter(myCollision : Collision)) {
		if(myCollision.gameObject.name == "Player")
		Application.LoadLevel(myLevel);
		}
	}

And it says on line 4 “Unexpected token: myCollision”
and on the same line “expecting (, found ‘OnCollisionEnter’.”

I’m not sure what I’m doing wrong, help is appreciated"

DaveA i think he wants to push the button and collide. so itd be:

private bool entercollide = false;

void OnTriggerEnter(Collider other) {
    	if (other.gameObject.tag == "Player") {
    		
    		entercollide = true;
    			
    			
    		}
    	
    
    void Update () {
    	
    		if(Input.GetButtonDown("Interact") && (entercollide)){
    			Application.LoadLevel(mylevel);
    		}

sorry its in C#… (im sure its easy to convert i just dont have time atm sorry)

thats how i would do it anyway