// JScript File
function Quote(text,author) {
    this.text = text;
    this.author = author;
}
function GetQuoteObject(myQuote) {
    var newQuote;
    try {
        newQuote = document.createElement('<div class="Q">');
    } catch(err) {
        newQuote = document.createElement('div');
        newQuote.setAttribute('class','Q');
    }
    var newText;
    try {
        newText = document.createElement('<div class="Qtitle">');
    } catch(err) {
        newQuote = document.createElement('div');
        newQuote.setAttribute('class','Qtitle');
    }
    newText.innerText = "Quote of the Moment";
    newQuote.appendChild(newText);
    try {
        newText = document.createElement('<div class="Qbody">');
    } catch(err) {
        newText = document.createElement('div');
        newtext.setAttribute('class','Qbody');
    }
    newText.appendChild(document.createTextNode(myQuote.text));
    //newText = ;
    var newAuthor;
    try {
        newAuthor = document.createElement('<div class="Qsig">');
    } catch(err) {
        newAuthor = document.createElement('div');
        newAuthor.setAttribute('class','Qsig');
    }
    newQuote.appendChild(newText);
    newText = document.createTextNode("- " + myQuote.author);
    newAuthor.appendChild(newText);
    newQuote.appendChild(newAuthor);
    return newQuote;
}
var main_quote=[];
    main_quote[0] = new Quote("One thing that we got out of it (WJCC) was that we made lots of friends. (It was) my first entry into the Jewish world and we still have the friends here in Walden that are still surviving. That was the best part for me. I finally felt like going because I was going to see people that I enjoyed being with. That to me was the religion for me.","Dave Lustig");
    main_quote[1] = new Quote("The key to it is getting the parents involved by being actively involved when their children are learning Jewish things. I'd like to see the parents learning those things too and being involved in that way.","Leo Flax");
    main_quote[2] = new Quote("My Jewish values and beliefs up until the time I was 20 were close to nil ...my father was anti-religious, he was a Marxist...but I was very emotionally involved in the founding of the State of Israel...after my son was born, we became interested in getting a Jewish education for him...and some of it must have rubbed off because my son became very strictly orthodox and his 6 children are orthodox and observant...","Norman Hecht");
    main_quote[3] = new Quote("There has to be a Jewish presence in Walden so that when a Jew comes into town he can meet people and get answers to questions...The important thing is being involved.","Trudy Flax");
    main_quote[4] = new Quote("I always felt that the value of a synagogue in Walden was an ultimate necessity because every religion, every belief should have its presence known in a community and one of the reasons that I work for the synagogue is to see that the lights stay on in our Jewish community.","Marty Besdesky");
    main_quote[5] = new Quote("My early memories of the temple was the warmth and friendliness of the congregation, it was like belonging to a family. We were there to help each other in good times and difficult times. Many people commented on the warm welcome they got and the feeling of belonging.","Bea Singer");
    main_quote[6] = new Quote("When I first came to Beth Hillel, I received a very warm welcome and 'Good Shabbos' from the members. I liked that, and being that I am alone, I need to have a place that suits me to pray, and the people are warm and lovely... I need a place where I can say my prayers for my family, for my husband  and it helps me a lot to get through life.","Edith Leeser");
var specific_quote=[0];

function ChooseRandomMainQuote(ElementId) {
    var i = Math.round((main_quote.length-1)*Math.random());
    document.getElementById(ElementId).appendChild(GetQuoteObject(main_quote[i]));
}
function ChooseRandomPersonalQuote(ElementID,Author) {
    var i = Math.round((main_quote.length-1)*Math.random());
    document.getElementById(ElementId).appendChild(GetQuoteObject(main_quote[i]));
}
