function toggledivisible(thisdiv)
{
try {
	var divisible=document.getElementById(thisdiv);
	var parentdiv=document.getElementById(thisdiv).parentNode;

	//if (divisible.style.visibility == 'hidden' || divisible.style.display == 'none') {
		var alldivs=parentdiv.getElementsByTagName('div');
		for (var x = 0; x < alldivs.length; x++) {
			if (alldivs[x].className == 'divisible') {
				if (alldivs[x].id==thisdiv ) {
					alldivs[x].style.visibility = 'visible';
					alldivs[x].style.display = 'block';
				}
				else {
					alldivs[x].style.visibility = 'hidden';
					alldivs[x].style.display = 'none';
				}
			}
		}
	//}
} catch( myError ) {
  //if an error occurs, this code will be run
  //two properties will (by default) be available on the
  //object passed to the statement
  alert( myError.name + ': ' + myError.message);
} finally {
  //optional - this code will always be run before the
  //control structure ends, even if you rethrow the error
  //in the catch
}
}

function lightsearch ()
{
	document.getElementById('search').src='http://nationalmarker.com/images/search_but2.gif';
	document.getElementById('searchlabellink').style.color='#73A0E0';
}

function dimsearch ()
{
	document.getElementById('search').src='http://nationalmarker.com/images/search_but.gif';
	document.getElementById('searchlabellink').style.color='#007CC4';
}

function overlayform(formdiv)
{
	var formtooverlay=document.getElementById(formdiv);
	
	if (formtooverlay.style.visibility=='hidden' || formtooverlay.style.display=='none') {
		formtooverlay.style.visibility='visible';
		formtooverlay.style.display='block';
	} else {
		formtooverlay.style.visibility='hidden';
		formtooverlay.style.display='none';
	}
}

function linkpreview (previewdiv,previewimg,thislink)
{
try {
	var thepreview=document.getElementById(previewdiv);
	var preview=thepreview.getElementsByTagName('img');
			
	if (thepreview.style.visibility=='hidden' || thepreview.style.display=='none') {
		thepreview.style.visibility='visible';
		thepreview.style.display='block';
		var linktop=document.getElementById(thislink).offsetTop;
		var linkright=document.getElementById(thislink).offsetLeft + document.getElementById(thislink).offsetWidth;
		thepreview.style.top=linktop + 'px';
		thepreview.style.left=linkright +'px';
		preview[0].src='http://nationalmarker.com/images/previews/' + previewimg;
	} else {
		thepreview.style.visibility='hidden';
		thepreview.style.display='none';
		thepreview.style.top='500px';
		thepreview.style.left='0px';		
		preview[0].src='';
	}
} catch( myError ) {
  //if an error occurs, this code will be run
  //two properties will (by default) be available on the
  //object passed to the statement
  alert( myError.name + ': ' + myError.message + ' ' + linkright + ' ' + linktop + this);
} finally {
  //optional - this code will always be run before the
  //control structure ends, even if you rethrow the error
  //in the catch
}
}