var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

function jumpto(sel){
  var i;
  i = sel.selectedIndex;

    if (sel.options[i].value != "") {
     window.location = sel.options[i].value;
    }

}

function which_Browser()
    {var a,b;
    a  = navigator.appVersion;
    b = a.charAt(0);
    if (b > 2)
    	{nav_refresh();
    	}
	}

function nav_refresh() {
	document.navform.reset();
}

var browserOK = false;
              var pics;
              var NameString;
              var objCount = 0;
              NameString = navigator.appname + navigator.appCodeName + navigator.appVersion;
              if (NameString.indexOf("Explorer") == -1)
                {if (NameString.indexOf("2.0") == -1)
                  {browserOK = true;
                          pics = new Array();
                  }
                }

              function preload(name, first, second) {
                        if (browserOK) {
                          var args = (arguments.length);
                          pics[objCount] = new Array(args);
                          pics[objCount][0] = name;
                          for(var i=1; i < args; i++) {
                                  pics[objCount][i] = new Image();
                                  pics[objCount][i].src = arguments[i];
                          }
                  objCount++;
                  }
              }

              function on(name) {
                var imgIndex = 2;
                if (browserOK) {
                  if (arguments.length > 1) {
                    imgIndex = parseInt(arguments[1]);
                  }
                  for (i = 0; i < objCount; i++) {
                    if (document.images[pics[i][0]] != null) {
                      if (name != pics[i][0])
                        { document.images[pics[i][0]].src = pics[i][1].src; }
                      else {
                        if (imgIndex < pics[i].length) { document.images[pics[i][0]].src =
			pics[i][imgIndex].src;
                        } else { document.images[pics[i][0]].src = pics[i][1].src; }
                      }
                    }
                  }
                }
              }

              function extra(name) {
                var i=0;
                var imgIndex = 2;
                if (browserOK) {
                  if (document.images[name] == null) { return 0; }
                  if (arguments.length > 1) {
                    imgIndex = parseInt(arguments[1]);
                  }
                  for(i=0;i<objCount;i++) {
                    if (pics[i][0] == name) { break; }
                  }
                  if (pics[i][0] != null && imgIndex < pics[i].length)
                  { document.images[name].src = pics[i][imgIndex].src; }
                  else { document.images[name].src = pics[i][1].src; }
                  return 1;
                }
                return 0;
              }

              function off() {
                if (browserOK) {
                  for (i = 0; i < objCount; i++) {
                    if (document.images[pics[i][0]] != null) {
                    document.images[pics[i][0]].src = pics[i][1].src;
                    }
                  }
                }
	      }
			
function goToMailForm (formURL, recipient)
{
	document.mailRecipientForm.recipient.value = recipient;
	document.mailRecipientForm.action = formURL;
	document.mailRecipientForm.submit ();
}

function writeMailRecipientBlock ()
{
	document.write ("<form name='mailRecipientForm' action='http://www.dow.com/' method='POST'>");
	document.write ("<input name='recipient' type='hidden' value='' />");
	document.write ("</form>");
}

function litOrder(title, formnum, business)
 {
    changecookie("doctitle", title);
    changecookie("formnum", formnum);
    var oldvar = "http://www.dow.com/webapps/lit/litorder.asp?OPTION="+formnum+"&Business="+business+"&DocTitle="+title;
    var newvar = oldvar;
    while(oldvar.indexOf(" ") != -1)
     {
        newvar = oldvar.substring(0,oldvar.indexOf(" "))+"%20"+oldvar.substring(oldvar.indexOf(" ")+1,oldvar.length);
        oldvar = newvar;
     }
    window.location = oldvar;
  }