OnMouseDown Range Problem

My problem is that I can click on my door to load a new level which is fine but my character can do it from any range which means if he clicks the door from across the map it will still work, how is it I would make it so you have to have a minimum of like 5yards to be in range of making the door work when clicking on it.

My Character


How is it I would make it say :

My character


The script I am using;

// Loads the level named "SomeLevel" as a response
	// to the user clicking on the object
	function OnMouseDown () {
		Application.LoadLevel ("Shop 1");

You could store a reference to your door object as a variable and then use Vector3.Distance.

var doorObject:Transform;
var neededDistance:float=5;

function OnMouseDown(){
      Application.LoadLevel ("Shop 1");