var popupwnd = null;

function openpopup(url,xs,ys) {
  if (popupwnd != null && !popupwnd.closed) {
    popupwnd.focus();
  }
  x = window.screen.width;
  y = window.screen.height-100;
  if (x != 0 && y != 0) {
    x = (x - xs) / 2;
    y = (y - ys) / 2;
  }
  coords = ",screenx=" + x + ",screeny=" + y + ",left=" + x + ",top=" + y;
  popupwnd = window.open(url,"shd_demo","toolbar=no,directories=no,menubar=no,width="+xs+",height="+ys+",scrollbars=yes,resizable=no"+coords);
}

function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}


function ontopmenuover(item) {
	item.oldclassName = item.className;
	item.className = "topmenu_hover";
}
function ontopmenuout(item) {
  item.className = item.oldclassName;
}
function ontopmenuclick(url) {
  document.location.href = url;
}


function ontablerowover(item) {
	item.oldclassName = item.className;
	item.className = "table_hover";
}
function ontablerowout(item) {
  item.className = item.oldclassName;
}


function oninputfocus(item) {
	item.className = "input_selected";
}
function oninputblur(item) {
  item.className = "input_normal";
}


function imgover(item, img) {
  document.images[item].src = img;
}
function imgout(item, img) {
  document.images[item].src = img;
}


function do_over(obj,color) {
  obj.style.oldbackgroundColor = obj.style.backgroundColor;
  obj.style.oldcolor = obj.style.color;
  obj.style.oldcursor = obj.style.cursor;

  obj.style.backgroundColor = color;
  obj.style.color = 'blue';
  obj.style.cursor = 'hand';
}

function do_out(obj) {
  obj.style.backgroundColor = obj.style.oldbackgroundColor;
  obj.style.color = obj.style.oldcolor;
  obj.style.cursor = obj.style.oldcursor;
}


function mainMenuBounce(dest) {
  if (dest != '') {
		window.location.href = dest;
		return true;
  }
  else {
    return false;
  }
}
