function checkContact () {
	var elm = document.getElementById('zmaildest');
	if(elm.value == '')
	{
		alert('You must choose who you want to contact!')
		document.getElementById('z_recipient').style.backgroundColor = 'maroon';
		return false;
	}
	else
	{
		return true;
	}
}

function setSearch() {
	var sfield = document.getElementById('zMbSearch');
	sfield.style.visibility = 'visible';
	sfield.style.display = 'inline';
	var sinput = document.getElementById('zSearchIn');
	sinput.focus();
}

function zToggle(id, state){
	if(state == 'on'){
		document.getElementById(id).style.backgroundColor = '#dddddd';
	} else {
		document.getElementById(id).style.backgroundColor = 'transparent';
	}
}


function gallery(artid,imgid){
	var mywin = open("/av/gallery.php?aid=" + artid + "&imgid=" + imgid, "", "toolbar=no,width=540,height=510,top=40,left=300,scrollbars=yes")
}

function printView(artid){
	if(confirm('Vil du \xE5pne et nytt vindu for utskrift? '))
	{
		var mywin = open("/elements/print.php?aid=" + artid, "", "toolbar=no,width=700,height=400,top=40,left=300,scrollbars=yes")
	}
	return false;
}

function zgHigh(id, state  ) {
	if( id == undefined)
	{
		alert(id + 'called with state '+ state);
	}
	var elem = 'zgDiv-' + id;
	if(state == 1)
	{
		// new Effect.Puff(document.getElementById(elem));
		document.getElementById(elem).className = 'highlight';
	}
	else
	{
		// new Effect.Appear(document.getElementById(elem));
		document.getElementById(elem).className = 'highlight h';
	}
}