function swapImg(name,img){
  document[name].src = img.src;
}

//hides corresponding div
function hide(divId) {
if (document.layers) {document.layers[divId].visibility = 'hide';}
else if (document.all) {document.all[divId].style.visibility = 'hidden';}
else if (document.getElementById) {document.getElementById(divId).style.visibility = 'hidden';}
}

//shows corresponding div
function show(divId) {
if (document.layers) {document.layers[divId].visibility = 'show';}
else if (document.all) {document.all[divId].style.visibility = 'visible';}
else if (document.getElementById) {document.getElementById(divId).style.visibility = 'visible';}
} 

function layerSwap(divId1,divId2){
	show(divId1);
	hide(divId2);  
}


function picture_max(url,desc,title){
	picture_max_win=window.open("",'picture_max','width=300,height=300,menubar=no,scrollbars=yes,left=100,top=100,resizable=1');
	
	if (title != null){
	titletext = title + '<br>';
	}
	else {
	titletext = '';
	}

	if (desc == '' || desc == null){
	  desc = '';
	  if (title == null){
		title	= 'Picture';
	  }
	}
	
picture_max_win.document.clear();
picture_max_win.document.writeln('<html>');
picture_max_win.document.writeln('  <head>');
picture_max_win.document.writeln('    <title>');
if (title == null){
picture_max_win.document.writeln('      ' + desc);
}
else{
picture_max_win.document.writeln('      ' + title);
}
picture_max_win.document.writeln('    </title>');
picture_max_win.document.writeln('  </head>');
picture_max_win.document.writeln('  <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
picture_max_win.document.writeln('    <table align="center" height="100%">');
picture_max_win.document.writeln('      <tr><td valign="middle" align="center" style="font-family: Tahoma; font-size: 11px; color: #000000">');
picture_max_win.document.writeln('        <img src="' + url + '"><br>');
picture_max_win.document.writeln('        ' + titletext + desc);
picture_max_win.document.writeln('      </td></tr>');
picture_max_win.document.writeln('    </table>');
picture_max_win.document.writeln('  </body>');
picture_max_win.document.writeln('</html>');
picture_max_win.document.close();
picture_max_win.focus();
}

