itemsPerPage = 40;
curPos = 0;
function browseXML()
{
resultSetLength = $("session",xmlDataSet).length;
strToAppend = "
";
if (curPos + itemsPerPage > resultSetLength)
{
showingThrough = resultSetLength;
}
else
{
showingThrough = parseInt(curPos + itemsPerPage);
}
// strToAppend += "Showing " + parseInt(curPos + 1) + " through " + eresultSetLength + " of " + eresultSetLength + "
";
strToAppend += "";
// if (itemsPerPage > resultSetLength ) {
// strToAppend += "";
// }
// if (itemsPerPage < resultSetLength) {
// if (curPos == 0) // First page. Go forward only.
// {
// strToAppend += "
";
// }
// if (itemsPerPage > resultSetLength) // One page only
// {
// strToAppend += "
";
// }
// if (curPos > 0 && parseInt(curPos + itemsPerPage) < resultSetLength) // Somewhere inbetween.
// {
// strToAppend += "
";
// }
// if (parseInt(curPos + itemsPerPage) >= resultSetLength) // Last page. Go back only.
// {
// strToAppend += "
« Previous Items ";
// }
// }
// strToAppend += "
";
// strToAppend += "";
$("session",xmlDataSet).each(function(i) {
var eventType = $(this).find("eventAttribute[name=event_type]").text();
var eventTitle = $(this).find("eventAttribute[name=title]").text();
var eventName = $(this).find("eventAttribute[name=name]").text();
var eventBio = $(this).find("eventAttribute[name=eventdescription]").text();
var eventdescription = $(this).find("eventAttribute[name=eventdescription]").text();
var description = $(this).find("eventAttribute[name=description]").text();
var organizer = $(this).find("eventAttribute[name=organizer]").text();
var email = $(this).find("eventAttribute[name=email]").text();
var level = $(this).find("eventAttribute[name=level]").text();
var prereqs = $(this).find("eventAttribute[name=prereqs]").text();
var authoraffil = $(this).find("eventAttribute[name=authoraffil]").text();
var intendedaudience = $(this).find("eventAttribute[name=intendedaudience]").text();
var venueName = $(this).find('venueName').text()
var locationName = $(this).find('locationName').text()
var img = $(this).find('eventImage').text();
var filename = img.split('/').slice(-1);
var start = $(this).find('sessionStartTime').text()
var end = $(this).find('sessionEndTime').text()
if (start != "") {
// var startFormat = Date.parse(start).toString('M/d/yyyy');
var startFormat = Date.parse(start).toString('dddd, d MMMM | h:mm tt');
var endFormat = Date.parse(end).toString('h:mm tt');
}
strToAppend += "";
if (img != "") {
strToAppend += "

";
}
if (eventName != "") {
strToAppend += "
" + eventName + "
" + eventBio + "
";
} else {
strToAppend += "
" + eventTitle + "
";
if (start != "" && eventType == "bof") {
strToAppend += "
" + startFormat + " - " + endFormat + " | " + locationName + " " + venueName +"
";
} else if (start != "" ) {
strToAppend += "
" + startFormat + " - " + endFormat + " | " + venueName +"
";
} else {
}
if (level != "") {
strToAppend += "
" + level + "
";
}
if (eventdescription != "") {
strToAppend += "
" + eventdescription + "
"
} else {
strToAppend += "
" + description + "
"
}
if (prereqs != "") {
strToAppend += "
Prerequisites
" + prereqs + "
";
}
if (intendedaudience != "") {
strToAppend += "
Intended Audience
" + intendedaudience + "
";
}
if (authoraffil != "" && eventType == "panel") {
strToAppend += "
Panelists
" + authoraffil + "
";
}
if (authoraffil != "" && eventType != "panel") {
strToAppend += "
Instructor(s)
" + authoraffil + "
";
}
if (organizer != "") {
strToAppend += "
" + organizer + "
" + email + "
";
}
}
// TEST
// strToAppend += "
" + eventTitle + "
";
strToAppend += "
";
});
// strToAppend += "";
$("#content-update").html(strToAppend);
}