function toggle_menucolumn() {
if(div_menucolumn.style.display == 'none'){
div_menucolumn.style.display = 'block';
div_mainbody.className = "showmin";}
else
{
div_menucolumn.style.display = 'none';
div_mainbody.className = "showmax";}
}

function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}

function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function blendimage(imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;

  changeOpac(0, imageid);
	document.getElementById(imageid).src = imagefile;

	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function WinOpen(id) {
  var e = id.src;
  e = e.replace(/!pre_/,"");
  e = "viewimage.asp?fImg=" + e
  var para = 'left=0,top=0,width=400,height=400,scrollbars=yes,toolbar=0,resizable=1'
  win = window.open(e,'photowin',para);
  win = win.focus();
}

function chkTmbSize(id) {
var h = id.height;
var w = id.width;
id.resize = true;
  if (h>w) {
    id.width = 30 / id.height * id.width;
    id.height = '30';
  }
  else {
    id.height = 40 / id.width * id.height;
    id.width = '40';
  }
}

function chkMaxSize(id) {
  if (id.width > 410) {
    id.resized = true;
    id.height = 410/id.width * id.height; 
    id.width = 410;
  }
}

function changeHTML(id, txt) {
document.getElementById(id).innerHTML = txt;
}

