if (navigator.appName == "Microsoft Internet Explorer") {
	var dropDownStyle = "position: relative; top: 15px;";
} else {
	var dropDownStyle = "position: relative; top: 15px;";
}

var productDropDown = '<table border="0" align="right" cellpadding="0" cellspacing="0" style="' + dropDownStyle + '"><tr><td><form name="form1" method="post" action=""><label><b>Go to product: &nbsp;</b><select name="productSelect" id="productSelect" onChange="if ((form1.productSelect.options[form1.productSelect.selectedIndex].value) != ' + "'NULL'" + ') {location.href = form1.productSelect.options[form1.productSelect.selectedIndex].value}"><option value="NULL" selected>(Select a Product)</option><option value="rodless_actuators.html">Rodless Actuators:</option><option value="speedline.html">&nbsp;&nbsp;&nbsp;SPEEDLine</option><option value="powerline.html">&nbsp;&nbsp;&nbsp;POWERLine</option><option value="powerline_belt.html">&nbsp;&nbsp;&nbsp;POWERLine Belt</option><option value="dynaline.html">&nbsp;&nbsp;&nbsp;DYNALine</option><option value="rod-style_actuators.html">Rod-Style Actuators:</option><option value="varioline.html">&nbsp;&nbsp;&nbsp;VARIOLine</option><option value="versaram.html">&nbsp;&nbsp;&nbsp;VersaRAM</option><option value="cubic_screw_jacks.html">Cubic Screw Jacks:</option><option value="translating_trapezoidal.html">&nbsp;&nbsp;&nbsp;Translating Trapezoidal</option><option value="translating_ballscrew.html">&nbsp;&nbsp;&nbsp;Translating Ball Screw</option><option value="rotating_trapezoidal.html">&nbsp;&nbsp;&nbsp;Rotating Trapezoidal</option><option value="rotating_ballscrew.html">&nbsp;&nbsp;&nbsp;Rotating Ball Screw</option><option value="linear_tables.html">Linear Tables</option><option value="standard.html">&nbsp;&nbsp;&nbsp;Standard</option><option value="covered.html">&nbsp;&nbsp;&nbsp;Covered</option><option value="glc.html">&nbsp;&nbsp;&nbsp;GLC</option><option value="custom_actuators.html">Modified Actuators</option><option value="precision_screw_drives.html">Precision Screw Drives:</option><option value="ball_screws.html">&nbsp;&nbsp;&nbsp;Ball Screws</option><option value="trapezoidal.html">&nbsp;&nbsp;&nbsp;Trapezoidal</option></select></label></form></td></tr></table>';

function selectCorrectProduct() {

var currentURL = "";
var currentListURL = "";

	var i = 0;
	var stopVariable = 0;
	do {
		form1.productSelect.selectedIndex = i;
		currentURL = location.href.substring(location.href.lastIndexOf("/")+1,location.href.length);
		currentListURL = form1.productSelect.options[form1.productSelect.selectedIndex].value;
		if (currentURL == currentListURL) {
			stopVariable = 1;
		}
		i++;
		
	} while (stopVariable == 0);
	
	
	//The following tests whether correct filenames are stored in variables:
	//alert('"' + currentURL + '"' + '<br>"' + currentListURL +'"');
}

function doProductMenu() {
	document.write(productDropDown);
	selectCorrectProduct();	
}


function SetCookie(sName, sValue)
{
  date = new Date();
  document.cookie = sName + "=" + escape(sValue) + "; expires=Monday, 04-Apr-2010 05:00:00 GMT";
}

// Retrieve the value of the cookie with the specified name.
function GetCookie(sName)
{
  // cookies are separated by semicolons
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
 // a name/value pair (a crumb) is separated by an equal sign
 var aCrumb = aCookie[i].split("=");
 if (sName == aCrumb[0]) 
  return unescape(aCrumb[1]);
  }

  // a cookie with the requested name does not exist
  return null;
}

//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
