<!--//
var Char;
var UsedChars;
var CharID;
var CharACS;
var CharLoaded;
var LoadReq;
var HideReq;

UsedChars = "Char";

CharID = "Char";
CharACS = "";
CharLoaded = false;

Window_OnLoad();

function Window_OnLoad() {
   Bow.Connected = true;

    CharLoaded = LoadLocalChar(CharID, CharACS);

    if (!CharLoaded) {
    CharLoaded = LoadLocalChar(CharID, "");
    }

    if (CharLoaded) {
        SetCharObj();
    }
    CheckLoadStatus();
}

function LoadLocalChar(CharID, CharACS) {
    Bow.RaiseRequestErrors = false;
    if (CharACS == "") {

        LoadReq = Bow.Characters.Load(CharID);
    }
    else {
        LoadReq = Bow.Characters.Load(CharID, CharACS);
    }
    Bow.RaiseRequestErrors = true;

    if (LoadReq.Status != 1) {
        return(true);
    }
    return(false);
}

function SetCharObj() {
    Char = Bow.Characters.Character(CharID);
    Char.LanguageID = 0x409;
}

function CheckLoadStatus() {
       if (!CharLoaded) {
        LoadError();
        return(false);
    }

    window.status = "";
    AgentIntro();
    return(true);
}

function LoadError() {
    var strMsg;
    window.status = "";
    strMsg = "Error Loading Character: " + CharID + "\n";
    strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n";
    strMsg = strMsg + UsedChars;
    alert(strMsg);
}
function InitAgentCommands() {
    Char.Commands.RemoveAll();
}

function AgentIntro() {
    InitAgentCommands();
	 //    *** END CHARACTER SCRIPT ***
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 

    //    *** BEGIN CHARACTER SCRIPT ***


 


Char.MoveTo(0, 0);
    Char.Show();
    Char.MoveTo(900, 500);
    Char.Play("GetAttention");
    Char.Play("GetAttentionContinued");
    Char.Play("GetAttentionReturn");
	Char.Play("Blink");
 	Char.speak("Hi there");
	Char.Play("Acknowledge");

 	Char.speak("Welcome to Rentals Utah!");
Char.Play("Pleased");
 	Char.speak("If you are looking for a place to rent, you came to the right place.");
	Char.Play("Congratulate");
Char.speak("Congratulations!");
  Char.MoveTo (300,250);
  Char.Play("GestureRight");
  Char.speak("Here is our main Menu");
Char.Play("Pleased");
Char.speak("Help yourself!");
Char.Play("Pleased");
Char.Play("Pleased");
  
  Char.Play("Blink");
    Char.Play("Uncertain");
    Char.Speak("\\Chr=\"Whisper\"\\Make sure you find the best deals.");
    Char.Play("Wave");
    Char.Speak("and don't forget to sign up for our Free e-mail alerts!");
    Char.Play("Wave");
Char.Speak("Bye!");
    Char.Hide();


    //    *** END CHARACTER SCRIPT ***
}
//-->
