// jquery.xml2json.js
(function($){$.extend({xml2json:xml2json});function xml2json(xml,root){var o={};$(root==undefined?'response':root,xml).children().each(function(){o[this.tagName]=$(this).text()});return o}})(jQuery);

// When the page is loaded this is automatically called
var ps_popups = new Array();
var ps_popup_delay = 0.25;
$(document).ready(function() {
	// setup handlers for the overall login/search popups
	$('#ps-login-link').click(function(e){  return ps_overall_popup('login'); });
	$('#ps-search-link').click(function(e){ return ps_overall_popup('search'); });
	$('#ps-login-link, #ps-login-popup, #ps-search-link, #ps-search-popup').hover(stop_popup_timer, start_popup_timer);

	// setup handlers for frame collapse/expand divs
	$('div.ps-column-frame, div.ps-table-frame').not('.no-ani').each(function(i) {
		var frame = this;
		// on the frame 'header' apply the onClick handler
		$('div.ps-column-header, div.ps-frame-header', this).click(function() {
			ps_header_handler(this, frame, null, 'slow');
		});
	});

	// global ajax status animations
	$('#ajax-status').ajaxStart(ajax_start);
	$('#ajax-status').ajaxStop(ajax_stop);

	// automatically add an mouseover/out for table rows ...
	$(".ps-table tr:gt(0)").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});

	// language handler
	$('select.language').change(function(){ 
		this.form.submit();
	});
});

// popup variables
var ac