
function maxLength(obj, max)
{
	maxLength_buffer = obj.value
	if(max < obj.value.length)
	obj.onkeyup = function() { obj.value = maxLength_buffer; } 
}

function show_message_box()
{
	 document.getElementById('message_box').style.display = 'block';
}

function swap_display(id)
{
	if( document.getElementById(id).style.display == 'none' )
		document.getElementById(id).style.display = 'block';
	else	document.getElementById(id).style.display = 'none'; 
}
 

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openWin(imgObj)
{
	var sr = imgObj.src;
	MM_openBrWindow('img.html?img='+sr+'','image','resizable=yes,width=300,height=300,top=20,left=20');
}
