var myrules = {
		'.popup' : function(element) {
			element.onclick = function() {
				var w = 900;
				var h = 600;
				
				if (element.width < 325) {
					w = 334;
					h = 608;
				} else if (element.width < 350) {
					w = 360;
					h = 498;
				} else if (element.width < 542) {
					w = 542;
					h = 534;
				}
				
				popUp(element, w, h);
				return false; // so link does not go to destination
			}
		},
		'.popup-horiz' : function(element) {
			element.onclick = function() {
				var w = 542;
				var h = 534;
				popUp(element, w, h);
				return false; // so link does not go to destination
			}
		},
		'.popup-square' : function(element) {
			element.onclick = function() {
				var w = 360;
				var h = 498;
				popUp(element, w, h);
				return false; // so link does not go to destination
			}
		},
		'.popup-vert' : function(element) {
			element.onclick = function() {
				var w = 334;
				var h = 608;
				popUp(element, w, h);
				return false; // so link does not go to destination
			}
		}
	};
	
Behaviour.register(myrules);