/************************************************************
*           web-sn_genericdialogfuncs.js - part of EditAce  *
*           copyright Simon Norris 2002                     *
*           email: si@web-sn.com                            *
*           EditAce home page: http://www.web-sn.com        *
*                                                           *
*           Removal or modification of this notice is       *
*		    a violation of copyright and the terms of use   *
*           Last Modified: June 24 2002                     *
************************************************************/
function btnMouseover(el) {
  with (el.style) {
	borderLeft = "1px solid buttonhighlight";
	borderRight = "1px buttonface outset";
	borderTop = "1px solid buttonhighlight";
	borderBottom = "1px solid buttonshadow";
	background = "buttonface";
	padding = "1px";
  }
}

function btnMouseout(el) {
  with (el.style) {
    background = "buttonface";
	border = "1px solid buttonface";
	padding = "1px";
  }
}

function btnMousedown(el) {
  with (el.style) {
    borderLeft = "1 solid buttonshadow";
	borderRight = "1 solid buttonhighlight";
	borderTop = "1 solid buttonshadow";
	borderBottom = "1 solid buttonhighlight";
	paddingTop = "2px";
	paddingLeft = "2px";
	paddingBottom = "0px";
	paddingRight = "0px";
	backgroundColor = "buttonhighlight";
  }
}

function btnMouseup(el) {
  with (el.style) {
    borderLeft = "1px solid buttonhighlight";
	borderRight = "1px buttonface outset";
	borderTop = "1px solid buttonhighlight";
	borderBottom = "1px solid buttonshadow";
	background = "buttonface";
	padding = "1px";
  }
}

function autoDialogHeight() {
  var h = document.body.scrollHeight;
  window.dialogHeight = (h + 30) + "px";
}

function highlightcell(c) {
  var allcells = document.getElementsByTagName("TD");
  for (i=0;i<allcells.length;i++) {
    allcells[i].style.backgroundColor = "white"; allcells[i].style.color = "black";
  }
  c.style.backgroundColor = "highlight"; c.style.color = "highlighttext";
}

function websn_upfolder(path) {
 arrloc = curloc.split("/"); str = "";
 for (i=0;i<arrloc.length-2;i++) {
   str += arrloc[i] + "/";
 }
 location.href = path + ".asp?loc=" + str + "&u=y";
}

function dorefresh() {
 location.href = location.href;
}
