code:
function get_random(){ 
 var ranNum=Math.floor(Math.random()*2);
 return ranNum; 
} 
function getaSound(){
 var whichSound=get_random(); 
 var sound=new Array(2)
 sound[0]="CHIMES.WAV";
 sound[1]="LeaveMeAlone.mp3";
 alert(sound[whichSound]);
} 
function OnEvent_ChatWndCreated(ChatWnd){
 var ChatWndContacts = ChatWnd.Contacts;
 if(ChatWndContacts.Count == 1)
 {
  var e = new Enumerator(ChatWndContacts);
  var Contact = e.item();
  {
   var fileName = getaSound();
   MsgPlus.DisplayToastContact(Messenger.MyName , "Has Just Opened A Window With" , Contact.Name , fileName);
  }
 }
}
This still doe snot work and Ihave all that you have said to put in there. what am i missing here?
--EDIT--
code:
function getaSound(){
 var whichSound=get_random(); 
 var sound=new Array(2)
 sound[0]="CHIMES.WAV";
 sound[1]="LeaveMeAlone.mp3";
 alert(sound[whichSound]);
} 
was ment to be 
code:
function getaSound(){
 var whichSound=get_random(); 
 var sound=new Array(2)
 sound[0]="CHIMES.WAV";
 sound[1]="LeaveMeAlone.mp3";
 return sound[whichSound];
} 
Sorry for your trouble. I got it working now.
Thank you all so much.