Assign New Target on Mouse Click, Camera Focus on New Target

Is there a script(javascript, preferably) that returns the ID of the object when it is clicked?

I wanted to revise the script MouseOrbitImproved http://www.unifycommunity.com/wiki/index.php?title=MouseOrbitImproved so that when I click a certain object, a new target is assigned, whereas the camera moves and focuses on this new object.

Assuming the object is clickable (has a collider), you could have its OnMouseDown function call SendMessage to MouseOrbitImproved with the name of the object, then have that class reassign it.

ex (UNTESTED):
On the object(s)

function OnMouseDown ()
{
  Camera.main.SendMessage ("Retarget", transform); // sends this transform as a param
}

and add this to MouseORbitImproved, assuming it’s on the main camera:

function Retarget (newObj)
{
  target = newObj;
}