function popup(url, ww, wh) {
    noteWindow = window.open(url, "noteWindowlet", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+ww+",height="+wh);
		noteWindow.focus();
}

function getRelp() {

	m = location.href.match('live/|elixir/');
	if ( m != null && m.length > 0 ) {
		return '../';
	}
	return '';
}

$(document).ready(function() {

		var relp = getRelp();

if (document.images) {

	on = '_purple.gif';
  off = '_orange.gif';

	$('#leftmenu img').each(function() {
			this.on = new Image(this.width,this.height);
			this.off = new Image(this.width,this.height);
			this.on.src = relp+"images/"+this.id+on;
			this.off.src = relp+"images/"+this.id+off;
		}
		);
}


$('#leftmenu img').hover(
function() {
	this.src = this.on.src;
},
function() {
	this.src = this.off.src;
});

$('#wh').hover(
function() {
	window.status="About this Image";
  return true;
},
function() {
	window.status="";
	return true;
});

$('#wh').click(function() {
		// get the baseurl. Unless the ajax call matches exactly the page base
		// url firefox will throw a security exception.
		var urlre = /^.*sufiorder.org\//; 
		var baseurl =	(window.location+"").match(urlre)[0];
		$(this).after("<div />");
		$(this).next().load(baseurl+"wingedheart.htmx");
		return false;
});


});



