

// makes the "Match all search terms" span bold and the
// "Match any search terms" not bold
function popAny()
{
	document.getElementById('matchAny').style.fontWeight="bold"
	document.getElementById('matchAll').style.fontWeight="normal"
}


// makes the "Match any search terms" span bold and the
// "Match all search terms" not bold
function popAll()
{
	document.getElementById('matchAll').style.fontWeight="bold"	
	document.getElementById('matchAny').style.fontWeight="normal"
}

var myrules = {
		'.lbpanel-create' : function(element){
			element.onclick = function(){
				createLBPopUp();
				$('lbFormInputText').focus()
			}
//			element.onmouseover = function() {this.style.backgroundColor = '#CCC'}
//			element.onmouseout = function() {this.style.backgroundColor = '#000'}
		},
		'.lbpanel-delete' : function(element){
			element.onclick = function(){
				deleteLBPopUp();
			}
		},
		'.lbpanel-viewlb' : function(element){
			element.onclick = function(){
			}
		},
		'.lbpanel-email' : function(element){
			element.onclick = function(){
			}
		},
		'.lbpanel-request' : function(element){
			element.onclick = function(){
			}
		},
		'.lbpanel-help' : function(element){
			element.onclick = function(){
//				alert("wah!");
			}
		},
		'.lbpanel-logout' : function(element){
			element.onclick = function(){
			}
		}/*,
		'.lbpanel-dropdown' : function (element) {
			element.onchange = function() {
				var lb = Form.getElements('lbDropDown')[0].value // the selected lightbox
				alert("droppings")
				setCurrentLB(lb)
			}
		},
		'.search-field' : function (element) {
			element.onkeypress = function(e) {
			
				if (e == null) { // ie
					keycode = event.keyCode;
				} else { // mozilla
					keycode = e.which;
				}
	
				if (keycode == 13 || keycode == 3)
					performSearch($('searchField').value);
			}
		},
		'.search-button' : function (element) {
			element.onclick = function() {
					performSearch($('searchField').value);				
			}
		},
		'.result-link' : function (element) {
			element.onclick = function() {
					alert("blah3")
			}
		}	
*/		
	};
	
	Behaviour.register(myrules);
	Behaviour.apply();
	
	
function showtip(state, img)
{
	switch(state)
	{
		case "enlarge"	: text = "Enlarge image"; break;
		case "download"	: text = "Download zipped image"; break;
		case "comp"		: text = "Download comp"; break;
		case "add"		: text = "Add image to lightbox"; break;
		case "cart"     : text = "Add image to shopping cart"; break;
		default 		: text = "default"; break;
	}
	
	document.getElementById(img).innerHTML= text;
}

function cleartip(img)
{
	document.getElementById(img).innerHTML="";
}

function lightup(imageid)
{

	id = "oneImage" + imageid;
	document.getElementById(id).style.backgroundColor = "#CCCCCC";
}

function lightsout(imageid)
{
	id = "oneImage" + imageid;
	document.getElementById(id).style.backgroundColor = "#292929";
}	
