

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function CookieDef(expires,path,domain,secure)
{
  this.secure = secure;
  this.path = path;
  this.domain = domain;
  this.getValue = getCookie;
  this.setValue = setCookie;
  this.expire = deleteCookie;
  if (expires == 0) {
    this.expires = "";
  } else {
    var today_date = new Date();
	 var expire_seconds = today_date.getTime() + (expires * 24 * 60 * 60  * 1000);
    today_date.setTime(expire_seconds);
    this.expires = today_date.toGMTString();
  }
}
function getCV(offset) {
  var endstr = document.cookie.indexOf(";", offset);
  if (endstr == -1) endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
function getCookie(name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCV(j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return "";
}
function setCookie(name,value)
{
  document.cookie = name + "=" + escape(value) +
    ((this.expires == "") ? "" : ("; expires=" + this.expires)) +
    ((this.path == "") ? "" : ("; path=" + this.path)) +
    ((this.domain == "") ? "" : ("; domain=" + this.domain)) +
    ((this.secure == true) ? "; secure" : "");
}
function deleteCookie(name) {
  document.cookie = name + "=" + "" + "; expires=Thu,01-Jan-70 00:00:01 GMT";
}

function WA_setCookie(cookieobj, cookiename, cookievalue, cookiecheck, settype)     {
  var theValue = "";
  if (settype == 1)     {
    for (var n=0; n<cookievalue.length; n++)    {
      if (cookievalue[n].checked)     {
        theValue = cookievalue[n].value;
      }
    }
  }
  else      {
    theValue = cookievalue
  }

  if (cookiecheck)     {
    cookieobj.setValue(cookiename, theValue);
  }
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		mn_1_over = newImage("images_template/mn_1_over.gif");
		mn_2_over = newImage("images_template/mn_2_over.gif");
		mn_3_over = newImage("images_template/mn_3_over.gif");
		mn_4_over = newImage("images_template/mn_4_over.gif");
		mn_5_over = newImage("images_template/mn_5_over.gif");
		sn_1_over = newImage("images_template/sn_1_over.gif");
		sn_2_over = newImage("images_template/sn_2_over.gif");
		sn_3_over = newImage("images_template/sn_3_over.gif");
		sn_4_over = newImage("images_template/sn_4_over.gif");
		preloadFlag = true;
	}
}

function topscriptCSH(){
document.write("<TABLE WIDTH=1016 BORDER=0 CELLPADDING=0 CELLSPACING=0>");
document.write("<TR height=\"18\">");
document.write("<TD ROWSPAN=3 align=\"left\" valign=\"top\" width=\"324\" height=\"144\"><A HREF=\"index.html\">");
document.write("<IMG NAME=\"logo\" SRC=\"images_template/logo.jpg\" WIDTH=324 HEIGHT=144 ");
document.write("ALT=\"Custom Service Hardware in Cedarburg, WI. Call us at 800-882-0009\" border=\"0\"></a></TD>");
document.write("<TD COLSPAN=5 align=\"right\" valign=\"top\" bgcolor=\"#f4f1e5\" width=\"493\" height=\"18\">");
document.write("<table width=\"188\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.write("<tr>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"aboutus.html\"");
document.write("ONMOUSEOVER=\"changeImages('sn_1', 'images_template/sn_1_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_1', 'images_template/sn_1.gif'); return true;\">");
document.write("<img src=\"images_template/sn_1.gif\" alt=\"About Us\" name=\"sn_1\" width=\"67\" height=\"18\" border=\"0\"></a></td>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"feedback.htm\"");
document.write("ONMOUSEOVER=\"changeImages('sn_2', 'images_template/sn_2_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_2', 'images_template/sn_2.gif'); return true;\">");
document.write("<img src=\"images_template/sn_2.gif\" alt=\"Contact Us\" name=\"sn_2\" width=\"82\" height=\"18\" border=\"0\"></a></td>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"news.htm\"");
document.write("ONMOUSEOVER=\"changeImages('sn_3', 'images_template/sn_3_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_3', 'images_template/sn_3.gif'); return true;\">");
document.write("<img src=\"images_template/sn_3.gif\" alt=\"What's New\" name=\"sn_3\" width=\"82\" height=\"18\" border=\"0\"></a></td>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"index.html\"");
document.write("ONMOUSEOVER=\"changeImages('sn_4', 'images_template/sn_4_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_4', 'images_template/sn_4.gif'); return true;\">");
document.write("<img src=\"images_template/sn_4.gif\" alt=\"Home\" name=\"sn_4\" width=\"50\" height=\"18\" border=\"0\"></a></td>");
document.write("</tr></table></TD>");
document.write("<TD ROWSPAN=3 align=\"left\" valign=\"top\" width=\"199\" height=\"144\">");
document.write("<IMG SRC=\"images_template/right_grid.jpg\" WIDTH=199 HEIGHT=144 ALT=\"Wholesale hadware to anyone who makes sawdust\">");
document.write("</TD></TR>");
document.write("<TR height=\"19\">");
document.write("<TD align=\"left\" valign=\"top\" width=\"101\" height=\"19\"><A HREF=\"IW_Products.m4p.pvx?;PRODUCTS_NO_TREE?company=CSH\"");
document.write("ONMOUSEOVER=\"changeImages('mn_1', 'images_template/mn_1_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_1', 'images_template/mn_1.gif'); return true;\">");
document.write("<IMG NAME=\"mn_1\" SRC=\"images_template/mn_1.gif\" WIDTH=101 HEIGHT=19 BORDER=0 ALT=\"Shop On Line\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"111\" height=\"19\"><A HREF=\"products.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_2', 'images_template/mn_2_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_2', 'images_template/mn_2.gif'); return true;\">");
document.write("<IMG NAME=\"mn_2\" SRC=\"images_template/mn_2.gif\" WIDTH=111 HEIGHT=19 ALT=\"Our Products\" border=\"0\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"98\" height=\"19\"><A HREF=\"privacy.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_3', 'images_template/mn_3_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_3', 'images_template/mn_3.gif'); return true;\">");
document.write("<IMG NAME=\"mn_3\" SRC=\"images_template/mn_3.gif\" WIDTH=98 HEIGHT=19 ALT=\"Our Policies\" border=\"0\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"50\" height=\"19\"><A HREF=\"links.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_4', 'images_template/mn_4_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_4', 'images_template/mn_4.gif'); return true;\">");
document.write("<IMG NAME=\"mn_4\" SRC=\"images_template/mn_4.gif\" WIDTH=50 HEIGHT=19 ALT=\"Links\" border=\"0\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"133\" height=\"19\"><A HREF=\"CatalogsOnLine.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_5', 'images_template/mn_5_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_5', 'images_template/mn_5.gif'); return true;\">");
document.write("<IMG NAME=\"mn_5\" SRC=\"images_template/mn_5.gif\" WIDTH=133 HEIGHT=19 ALT=\"Get Our Catalog\" border=\"0\"></A>");
document.write("</TD></TR>");
document.write("<TR height=\"107\">");
document.write("<TD COLSPAN=5 align=\"left\" valign=\"top\" width=\"493\" height=\"107\">");
document.write("<IMG SRC=\"images_template/wood_bar.jpg\" WIDTH=493 HEIGHT=107 ALT=\"Wholesale hadware to anyone who makes sawdust\"></TD>");
document.write("</TR></TABLE>");
}

function topscriptCSHCom(){
document.write("<TABLE WIDTH=1016 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR height=\"18\">");
document.write("<TD ROWSPAN=3 align=\"left\" valign=\"top\" width=\"324\"><A HREF=\"index.html\">");
document.write("<IMG NAME=\"logo\" SRC=\"images_template/logo_crop.jpg\" WIDTH=324 HEIGHT=123 ");
document.write("ALT=\"Custom Service Hardware in Cedarburg, WI. Call us at 800-882-0009\" border=\"0\"></a></TD>");
document.write("<TD COLSPAN=5 align=\"right\" valign=\"top\" bgcolor=\"#f4f1e5\" width=\"493\" height=\"18\">");
document.write("<table width=\"188\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"aboutus.html\"");
document.write("ONMOUSEOVER=\"changeImages('sn_1', 'images_template/sn_1_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_1', 'images_template/sn_1.gif'); return true;\">");
document.write("<img src=\"images_template/sn_1.gif\" alt=\"About Us\" name=\"sn_1\" width=\"67\" height=\"18\" border=\"0\"></a></td>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"feedback.htm\"");
document.write("ONMOUSEOVER=\"changeImages('sn_2', 'images_template/sn_2_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_2', 'images_template/sn_2.gif'); return true;\">");
document.write("<img src=\"images_template/sn_2.gif\" alt=\"Contact Us\" name=\"sn_2\" width=\"82\" height=\"18\" border=\"0\"></a></td>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"news.htm\"");
document.write("ONMOUSEOVER=\"changeImages('sn_3', 'images_template/sn_3_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_3', 'images_template/sn_3.gif'); return true;\">");
document.write("<img src=\"images_template/sn_3.gif\" alt=\"What's New\" name=\"sn_3\" width=\"82\" height=\"18\" border=\"0\"></a></td>");
document.write("<td align=\"left\" valign=\"top\"><A HREF=\"index.html\"");
document.write("ONMOUSEOVER=\"changeImages('sn_4', 'images_template/sn_4_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('sn_4', 'images_template/sn_4.gif'); return true;\">");
document.write("<img src=\"images_template/sn_4.gif\" alt=\"Home\" name=\"sn_4\" width=\"50\" height=\"18\" border=\"0\"></a></td>");
document.write("</tr></table></TD>");
document.write("<TD ROWSPAN=3 align=\"left\" valign=\"top\" width=\"199\">");
document.write("<IMG SRC=\"images_template/right_grid_crop.jpg\" WIDTH=199 HEIGHT=123 ALT=\"Wholesale hadware to anyone who makes sawdust\">");
document.write("</TD></TR>");
document.write("<TR height=\"19\"><TD align=\"left\" valign=\"top\" width=\"101\" height=\"19\">");
document.write("<A HREF='IW_Products.m4p.pvx?;PRODUCTS_NO_TREE?company=CSH'");
document.write("ONMOUSEOVER=\"changeImages('mn_1', 'images_template/mn_1_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_1', 'images_template/mn_1.gif'); return true;\">");
document.write("<IMG NAME=\"mn_1\" SRC=\"images_template/mn_1.gif\" WIDTH=101 HEIGHT=19 BORDER=0 ALT=\"Shop On Line\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"111\" height=\"19\"><A HREF=\"products.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_2', 'images_template/mn_2_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_2', 'images_template/mn_2.gif'); return true;\">");
document.write("<IMG NAME=\"mn_2\" SRC=\"images_template/mn_2.gif\" WIDTH=111 HEIGHT=19 ALT=\"Our Products\" border=\"0\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"98\" height=\"19\"><A HREF=\"privacy.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_3', 'images_template/mn_3_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_3', 'images_template/mn_3.gif'); return true;\">");
document.write("<IMG NAME=\"mn_3\" SRC=\"images_template/mn_3.gif\" WIDTH=98 HEIGHT=19 ALT=\"Our Policies\" border=\"0\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"50\" height=\"19\"><A HREF=\"links.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_4', 'images_template/mn_4_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_4', 'images_template/mn_4.gif'); return true;\">");
document.write("<IMG NAME=\"mn_4\" SRC=\"images_template/mn_4.gif\" WIDTH=50 HEIGHT=19 ALT=\"Links\" border=\"0\"></A></TD>");
document.write("<TD align=\"left\" valign=\"top\" width=\"133\" height=\"19\"><A HREF=\"CatalogsOnLine.htm\"");
document.write("ONMOUSEOVER=\"changeImages('mn_5', 'images_template/mn_5_over.gif'); return true;\"");
document.write("ONMOUSEOUT=\"changeImages('mn_5', 'images_template/mn_5.gif'); return true;\">");
document.write("<IMG NAME=\"mn_5\" SRC=\"images_template/mn_5.gif\" WIDTH=133 HEIGHT=19 ALT=\"Get Our Catalog\" border=\"0\"></A>");
document.write("</TD></TR><TR><TD COLSPAN=5 align=\"left\" valign=\"top\" width=\"493\">");
document.write("<IMG SRC=\"images_template/wood_bar_crop.jpg\" WIDTH=493 HEIGHT=86 ALT=\"Wholesale hadware to anyone who makes sawdust\">");
document.write("</TD></TR></TABLE>");
}

function menuW(){
document.write("<a class=topcat href=\"http://www.cshardware.com/iwwiaa.pvx?;uid\">User Info</a>&nbsp;&nbsp;");
document.write("<a class=topcat href=\"http://www.cshardware.com/iwwica.pvx?;inv_inq_options\">View Invoices</a>&nbsp;&nbsp;");
document.write("<a class=topcat href=\"http://www.cshardware.com/iwwicb.pvx?;so_inq_options\">View Open SOs</a>&nbsp;&nbsp;");
document.write("<a class=topcat href=\"http://www.cshardware.com/iwwida.pvx?;products_no_tree\">Order Online</a>&nbsp;&nbsp;");
document.write("<a class=topcat href=\"https://www.cshardware.com/iwwiea.pvx?;submit_so\">View  Cart</a>&nbsp;&nbsp;");
document.write("<a class=topcat href=\"http://www.cshardware.com/iwwiaa.pvx?;help_toc\">Help</a>&nbsp;&nbsp;");
}

function menuR(){
document.write("<nobr><a class=mainmenu href=\"https://www.cshardware.com/IW_User.m4p.pvx?;PROFILE?company=CSH\">Account Information</a>");
document.write("<a class=mainmenu href=\"https://www.cshardware.com/IW_ShoppingCartStore.m4p.pvx?;SC_STEP1?company=CSH\">");
document.write("<img align=absmiddle alt=\"Check Out\" border=0 src=\"images/whitecart.gif\"></a>");
document.write("<a class=mainmenu href=\"http://www.cshardware.com/IW_Help.m4p.pvx?;HELP?HTML_FILE=Help_SC_Main.htm\">Help</a>");
}
