
/* Check for DHTML */

var DHTML = (document.getElementById || document.all || document.layers);



function getObj(name)
{
  if (document.getElementById)
  {
    this.obj = document.getElementById(name);
    this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
    this.obj = document.all[name];
    this.style = document.all[name].style;
  }
  else if (document.layers)
  {
    this.obj = document.layers[name];
    this.style = document.layers[name];
  }
}



function writeEmailAddress(username)
{
    document.write("<a href=mail" + "to:" + username + "@" + "zurb.com>" + username + "@" + "zurb.com</a>");
}
function writeEmailAddress2(username)
{
    document.write("<a href=mail" + "to:" + username + "@" + "mavencom.com>" + username + "@" + "mavencom.com</a>");
}


function openPopup(windowURL) {
   windowName = "Popup";
   windowFeatures = "top=0,left=0,width=500,height=400,toolbar=yes,location=no,directories=no,status=yes,menuBar=yes,scrollBars=yes,resizable=yes";

   PopupWindow = window.open(windowURL, windowName, windowFeatures);
        }

function openPopup2(windowURL) {
   windowName = "Popup";
   windowFeatures = "top=0,left=0,width=630,height=530,toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=no,resizable=no";

   PopupWindow = window.open(windowURL, windowName, windowFeatures);
        }

function MM_openBrWindow(theURL,winName,features) { //v1.2
  window.open(theURL,winName,features);
}
// random images front:
function random_imgfront(){
var zimages=new Array()
zimages[1]="images/front/3DMGX1.jpg"
zimages[3]="images/front/MicroStrain's-Wireless-Sensing-Systems-1.00.jpg"
zimages[5]="images/front/g-link_banner-1.00.jpg"
zimages[7]="images/front/front4b.jpg"
zimages[9]="images/front/tc-link_banner.jpg"
zimages[11]="images/front/Inertia-Link.jpg"
zimages[13]="images/front/wireless.jpg"
zimages[15]="images/front/oem-sg-link-Web-Banner-no-mirror_award_1.4.jpg"
zimages[17]="images/front/3DM-GX2-Web-Banner_working_1.02.jpg"
zimages[19]="images/front/ruggedized_solar_node_Web-Banner_1.01.jpg"
zimages[2]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[4]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[6]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[8]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[10]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[12]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[14]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[16]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[18]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[20]="images/front/3DM-GX3-25-Web-Banner-animated-v-1.10.gif"
zimages[21]="images/front/V-Link-Web-Banner_working_1.02.jpg"

var imagelinks=new Array()
imagelinks[1]="3dm-gx1.aspx"
imagelinks[3]="wireless-sensing-system.aspx"
imagelinks[5]="g-link.aspx"
imagelinks[7]="mgdvrt.aspx"
imagelinks[9]="tc-link.aspx"
imagelinks[11]="inertia-link.aspx"
imagelinks[13]="wireless-sensors.aspx"
imagelinks[15]="oem-sg-link.aspx"
imagelinks[17]="3dm-gx2.aspx"
imagelinks[19]="field-ruggedized.aspx"
imagelinks[2]="3dm-gx3-25.aspx"
imagelinks[4]="3dm-gx3-25.aspx"
imagelinks[6]="3dm-gx3-25.aspx"
imagelinks[8]="3dm-gx3-25.aspx"
imagelinks[10]="3dm-gx3-25.aspx"
imagelinks[12]="3dm-gx3-25.aspx"
imagelinks[14]="3dm-gx3-25.aspx"
imagelinks[16]="3dm-gx3-25.aspx"
imagelinks[18]="3dm-gx3-25.aspx"
imagelinks[20]="3dm-gx3-25.aspx"
imagelinks[21]="v-link.aspx"

var zsize=new Array()
zsize[1]="172"
zsize[2]="172"
zsize[3]="172"
zsize[4]="172"
zsize[5]="172"
zsize[6]="172"
zsize[7]="172"
zsize[8]="172"
zsize[9]="172"
zsize[10]="172"
zsize[11]="172"
zsize[12]="172"
zsize[13]="172"
zsize[14]="172"
zsize[15]="172"
zsize[16]="172"
zsize[17]="172"
zsize[18]="172"
zsize[19]="172"
zsize[20]="172"
zsize[21]="172"

var ry=Math.floor(Math.random()*zimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+zimages[ry]+'" width=531 height='+zsize[ry]+' border=0></a>')
}


// random images1:
function random_imglink(){
var zimages=new Array()
//zimages[1]="images/block/blocka1.jpg"
//zimages[1]="images/block/blocka2.jpg"
//zimages[1]="images/block/blocka3.jpg"
//zimages[1]="images/block/blocka4.jpg"
//zimages[1]="images/block/blocka5.jpg"
//zimages[1]="images/block/blocka6.jpg"
//zimages[1]="images/front/3DM-GX3-25_front.jpg"
zimages[1]="images/front/wsda_thumb.jpg"


var imagelinks=new Array()
//imagelinks[1]="embed_sense.htm"
//imagelinks[1]="agile-link.aspx"
//imagelinks[1]="wireless-sensors.aspx"
//imagelinks[1]="tc-link.aspx"
//imagelinks[1]="g-link.aspx"
//imagelinks[1]="oem-sg-link.aspx"
//imagelinks[1]="3dm-gx3-25.aspx"
imagelinks[1]="wsda.aspx"

var imagecopy=new Array()
//imagecopy[1]="EmbedSense<Sup>tm</sup> Wireless Sensor EmbedSense is a tiny wireless sensor and data acquisition system."
//imagecopy[1]="Agile-Link&#153; USB base stations collect high-speed data simultaneously from multi-channel Agile-Link&#153; wireless sensor nodes."
//imagecopy[1]="MicroStrain's new IEEE 802.15.4 compliant wireless sensing nodes are compatible worldwide."
//imagecopy[1]="TC-Link&reg; is a complete wireless thermocouple node designed for integration with wireless sensor networks."
//imagecopy[1]="G-Link&reg; wireless nodes feature a sampling rate of up to 4KHz with one active accelerometer channel."
//imagecopy[1]="The SG-Link&reg; OEM wireless module is designed to provide sensor manufacturers with a low cost method of adding wireless capability to their product line."
//imagecopy[1]="3DM-GX3&reg; -25 AHRS - smallest, fastest, lightest, lowest power consumption in its class!"
imagecopy[1]="WSDA&reg; Wireless Sensor Data Aggregator"

var ry=Math.floor(Math.random()*zimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+zimages[ry]+'" width=171 height=71 border=0><br><ul>'+imagecopy[ry]+'</ul></a>')
}

// random images2:
function random_imglink2(){
var zimages=new Array()

// zimages[1]="images/block/blockb5.gif"
// zimages[2]="images/block/blockb6.gif"
// zimages[3]="images/block/blockb12.jpg"
// zimages[4]="images/block/blockb7.gif"
// zimages[5]="images/block/blockb9.gif"
// zimages[6]="images/block/jBot_thumb.jpg"
// zimages[7]="images/block/fa-22_thumb.jpg"
// zimages[8]="images/block/quadrotor.jpg"
// zimages[3]="images/Graphic-EH.jpg"
// zimages[2]="images/Pitch-Link-EH.jpg"
// zimages[1]="images/Helo-EH.jpg"
// zimages[4]="images/Graphic-EH.jpg"
// zimages[5]="images/Pitch-Link-EH.jpg"
// zimages[6]="images/Helo-EH.jpg"
zimages[1]="images/front/EH-Link_thumb.jpg"


var imagelinks=new Array()

// imagelinks[1]="white-nBot.aspx"
// imagelinks[2]="white-eKnee.aspx"
// imagelinks[3]="http://microstrain.com/white-autonomous_hovering.aspx"
// imagelinks[4]="http://microstrain.com/white-power_management.aspx"
// imagelinks[5]="white-testing-system.aspx"
// imagelinks[6]="jBot.aspx"
// imagelinks[7]="wireless_strain.aspx"
// imagelinks[8]="white-quadrotor.aspx"
// imagelinks[3]="energy-harvesting.aspx"
// imagelinks[2]="energy-harvesting.aspx"
// imagelinks[1]="energy-harvesting.aspx"
// imagelinks[4]="energy-harvesting.aspx"
// imagelinks[5]="energy-harvesting.aspx"
// imagelinks[6]="energy-harvesting.aspx"
imagelinks[1]="eh-link.aspx"


var imagecopy=new Array()

// imagecopy[1]="nBot Balancing Robot"
// imagecopy[2]="e-Knee: Evolution of the Electronic Knee Prothesis"
// imagecopy[3]="Autonomous Hovering of a Fixed-Wing Micro Air Vehicle"
// imagecopy[4]="Power Management for Energy Harvesting Wireless Sensors"
// imagecopy[5]="Scaleable, Wireless Structural Testing System"
// imagecopy[6]=" jBot is a fully autonomous, self-guided, mobile robot"
// imagecopy[7]="Wireless strain-measurement systems for aircraft test applications"
// imagecopy[8]="The Stanford Testbed of Autonomous Rotorcraft for Multi-Agent Control (STARMAC)"
// imagecopy[3]="Award Winning Sensor Uses Vibration to Capture Energy"
// imagecopy[2]="Wireless Sensor Systems Using Electrodynamic Generators to Harness Energy"
// imagecopy[1]="New Synchronized Wireless Sensor Systems for Structural Health Monitoring"
// imagecopy[4]="Award Winning Sensor Uses Vibration to Capture Energy"
// imagecopy[5]="Wireless Sensor Systems Using Electrodynamic Generators to Harness Energy"
// imagecopy[6]="New Synchronized Wireless Sensor Systems for Structural Health Monitoring"
imagecopy[1]="EH-Link&trade; Wireless Multi-source Energy Harvesting Sensor"



var ry=Math.floor(Math.random()*zimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+zimages[ry]+'" width=171 height=71 border=0><ul>'+imagecopy[ry]+'</ul></a>')
}

// random images3:
function random_imglink3(){
var zimages=new Array()
// zimages[1]="images/front/small_is_huge_front.jpg"
// zimages[2]="images/front/pm100_front.gif"
// zimages[3]="images/front/dw_front.jpg"
// zimages[4]="images/front/bfp_world_front.jpg"
// zimages[5]="images/front/Observer_front.jpg"
// zimages[6]="images/front/pdd_front.jpg"
//zimages[1]="images/front/e-harvester_front.jpg"
//zimages[2]="images/front/fs_front.jpg"
// zimages[3]="images/front/steve1.jpg"
//zimages[3]="images/front/buffet_front.jpg"
//zimages[4]="images/front/SensorsAwards2009.gif"
//zimages[5]="images/front/Leahy_Arms_Contract_thumb.jpg"
//zimages[6]="images/front/Arms_UVM_thumb.jpg"
zimages[1]="images/front/patriot_award_thumb.jpg"
zimages[2]="images/front/EHJ_thumb.jpg"
zimages[3]="images/front/espn_170x71.jpg"
zimages[4]="images/front/Helo_thumb.jpg"
zimages[5]="images/front/jake_thumb.jpg"
zimages[6]="images/front/Marketwire_thumb.gif"
zimages[7]="images/front/navy_wsda_ships_170x71.jpg"



var imagelinks=new Array()
// imagelinks[1]="news/Small_is_Huge.aspx"
// imagelinks[2]="news/PM100.aspx"
// imagelinks[3]="news/Deadliest_Warrior.aspx"
// imagelinks[4]="news/Microstrain_Vermont_Innovation_Marketplace.aspx"
// imagelinks[5]="news/Microstrain_Uses_State_Assistance_to_Expand.aspx"
// imagelinks[6]="http://www.pddnet.com/scripts/ShowPR.asp?RID=26664&CommonCount=0"
//imagelinks[1]="news/Vibro_Mechanical_Energy_Harvester.aspx"
//imagelinks[2]="news/Frost & Sullivan Award 2009 Press Release final.pdf"
// imagelinks[3]="news/Wireless_Vitae.aspx"
//imagelinks[3]="news/Buffet_Load_Phase_I_Press_Release_web_version.pdf"
//imagelinks[4]="news/SensorsExpo2009.aspx"
//imagelinks[5]="news/Leahy_Arms_Contract.aspx"
//imagelinks[6]="news/Arms_UVM.aspx"
imagelinks[1]="news/patriot_award.aspx"
imagelinks[2]="news/energy_harvesting_journal.aspx"
imagelinks[3]="http://www.microstrain.com/news.aspx"
imagelinks[4]="http://www.microstrain.com/news.aspx"
imagelinks[5]="http://www.microstrain.com/news.aspx"
imagelinks[6]="http://www.microstrain.com/news.aspx"
imagelinks[7]="http://www.microstrain.com/news.aspx"


var imagecopy=new Array()
// imagecopy[1]="At Williston's MicroStrain, Small is Huge"
// imagecopy[2]="MicroStrain Winner of Managing Automation 2009 Progressive Manufacturing 100 Awards"
// imagecopy[3]="MicroStrain's Inertial Measurement Products Used on Deadliest Warrior to Determine Which Weapons Most Lethal"
// imagecopy[4]="Brian Dubie, Vermont's Lieutenant Governor, discusses Vermont Innovation Marketplace"
// imagecopy[5]="Microstrain Uses State Assistance to Expand"
// imagecopy[6]="Phase II SBIR Contract Awarded for Wireless Sensors"
//imagecopy[1]="US Navy awards MicroStrain, Inc. a $917,000 Phase II SBIR Contract for the Development of a Miniature, Vibro-Mechanical Energy Harvester for Powering Wireless Sensors"
//imagecopy[2]="MicroStrain Receives Third Frost & Sullivan Award"
// imagecopy[3]="Steve Arms, MicroStrain President to Deliver Presentation at Wireless Vitae in Denmark May 18"
//imagecopy[3]="US Navy Awards MicroStrain Phase 1 SBIR to Measure Buffet Loads on Aircraft"
//imagecopy[4]="MicroStrain&reg; wins GOLD and SILVER at Sensors Expo!"
//imagecopy[5]="Senator Leahy, secures a further $2.4 million Department of Defense contract for MicroStrain to continue its work developing energy harvesting wireless sensors to determine wear and tear on Navy helicopters"
//imagecopy[6]="Measuring Motion on a Micro Scale"
imagecopy[1]="MicroStrain Receives Patriot Award for Support of the Guard and Reserve"
imagecopy[2]="Piezoelectric Energy Harvesting"
imagecopy[3]="Sport Science: IndyCar vs. Fighter Jet"
imagecopy[4]="Fast Company: How Everyday Behaviors Can Produce Clean Energy"
imagecopy[5]="Best Application for Energy Harvesting"
imagecopy[6]="New Technologies, New Solutions, and New Opportunities at the 2010 Sensors Expo & Conference"
imagecopy[7]="MicroStrain Wins US Navy Contract to Develop a Distributed Sensor Network for Structural Health Monitoring of Ships"



var ry=Math.floor(Math.random()*zimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+zimages[ry]+'" width=171 height=71 border=0><br><ul>'+imagecopy[ry]+'</ul></a>')
}


window.onError=null;
//browser sensing:
go=0
rollOver=0;
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) rollOver = 1;
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) rollOver = 1;

if (rollOver==1) {

// preload off images:
<!-------------------main rollovers----------------------->
var products_off = new Image(); products_off.src="http://www.microstrain.com/images/nav_products1.gif";
var new_off = new Image(); new_off.src="http://www.microstrain.com/images/nav_new_ideas1.gif";
var company_off = new Image(); company_off.src="http://www.microstrain.com/images/nav_company1.gif";
var contact_off = new Image(); contact_off.src="http://www.microstrain.com/images/nav1_contact1.gif";
var view_cart_off = new Image(); view_cart_off.src="http://www.microstrain.com/images/nav_view_cart1.gif";


// preload on images
<!-------------------main rollovers----------------------->
var products_on = new Image(); products_on.src="http://www.microstrain.com/images/nav_products2.gif";
var new_on = new Image(); new_on.src="http://www.microstrain.com/images/nav_new_ideas2.gif";
var company_on = new Image(); company_on.src="http://www.microstrain.com/images/nav_company2.gif";
var contact_on = new Image(); contact_on.src="http://www.microstrain.com/images/nav1_contact2.gif";
var view_cart_on = new Image(); view_cart_on.src="http://www.microstrain.com/images/nav_view_cart2.gif";


function imgOn(imgName) {
        if (document.images) {
        document[imgName].src = eval(imgName + "_on.src");
        }
}
function imgOff(imgName) {
       if (document.images) {
           document[imgName].src = eval(imgName + "_off.src");
       }
}
}
<!-------------------contact------------------------------->
function verifyForm() {
    var errors = false;
    var errorList = "Please fill in these required fields:\n"
    if (document.submitForm.first_name.value == "") {
        errors = true;
        errorList = errorList + "First Name\n";
    }
    if (document.submitForm.last_name.value == "") {
        errors = true;
        errorList = errorList + "Last Name\n";
    }
    if (document.submitForm.email_address.value == "") {
        errors = true;
        errorList = errorList + "Email Address\n";
    }
    else {
        var atLoc = document.submitForm.email_address.value.lastIndexOf("@");
        var lastDot = document.submitForm.email_address.value.lastIndexOf(".");
        if (atLoc == -1 || lastDot < atLoc) {
            errors = true;
            errorList = errorList + "Invalid Email Format\n";
        }
    }
    if (document.submitForm.your_interest.value == "") {
        errors = true;
        errorList = errorList + "What is your interest?\n";
    }
    if (document.submitForm.how_hear.selectedIndex == 0) {
        errors = true;
        errorList = errorList + "How did you hear about us?\n";
    }
    if (errors == true) {
        alert(errorList);
        return false;
    }
    return true;
}
