// Sub Nav Script

var currentSubMenu = "";
var currentMenuItem = "";
var menuItemNormal = "";

function setCurrentMenuItem(item, normal) {
  if(currentMenuItem != MM_findObj(item)) {
    currentMenuItem.src = menuItemNormal;
    currentMenuItem = MM_findObj(item);
    menuItemNormal = normal;
  }
}

function toggleList(id) {
  list = document.getElementById(id);
  if (list.style.display == "inline") {
    list.style.display = "none";
  } else {
    if(currentSubMenu != "") {
      prev = document.getElementById(currentSubMenu);
      prev.style.display = "none";
    }
    list.style.display = "inline";
  }
  currentSubMenu = id;
}

function writeDiv(id) {
  if (id == currentMenuItem) {
    document.write("<div id=\"" + id + "\" style=\"display:inline\">");
  } else {
    document.write("<div id=\"" + id + "\" style=\"display:none\">");
  }
}


// Swap Textbox Form Element Contact

function setBgImageContact(element,imageFile) {
  element.style.backgroundImage="url("+imageFile+")";
  element.style.color="#000000";
}

function setBgImageOverContact(element,imageFile) {
  element.style.backgroundImage="url("+imageFile+")";
  element.style.color="#FFFFFF";
}


// Image Rollover & Preload
if (document.images) {

gsxgasdetectoroff = new Image();
gsxgasdetectoroff.src = "/images/btn_gsxgasdetectoroff.gif";
gsxgasdetectoron =  new Image();
gsxgasdetectoron.src = "/images/btn_gsxgasdetectoron.gif";

gs600gasdetectoroff = new Image();
gs600gasdetectoroff.src = "/images/btn_gs600gasdetectoroff.gif";
gs600gasdetectoron =  new Image();
gs600gasdetectoron.src = "/images/btn_gs600gasdetectoron.gif";

gs400gasdetectoroff = new Image();
gs400gasdetectoroff.src = "/images/btn_gs400gasdetectoroff.gif";
gs400gasdetectoron =  new Image();
gs400gasdetectoron.src = "/images/btn_gs400gasdetectoron.gif";

qpgasdetectoroff = new Image();
qpgasdetectoroff.src = "/images/btn_qpgasdetectoroff.gif";
qpgasdetectoron =  new Image();
qpgasdetectoron.src = "/images/btn_qpgasdetectoron.gif";

tstempsensoroff = new Image();
tstempsensoroff.src = "/images/btn_tstempsensoroff.gif";
tstempsensoron =  new Image();
tstempsensoron.src = "/images/btn_tstempsensoron.gif";

id500irdetectoroff = new Image();
id500irdetectoroff.src = "/images/btn_id500irdetectoroff.gif";
id500irdetectoron =  new Image();
id500irdetectoron.src = "/images/btn_id500irdetectoron.gif";

ap100controlleroff = new Image();
ap100controlleroff.src = "/images/btn_ap100controlleroff.gif";
ap100controlleron =  new Image();
ap100controlleron.src = "/images/btn_ap100controlleron.gif";

mz500controlleroff = new Image();
mz500controlleroff.src = "/images/btn_mz500controlleroff.gif";
mz500controlleron =  new Image();
mz500controlleron.src = "/images/btn_mz500controlleron.gif";

cpu700processoroff = new Image();
cpu700processoroff.src = "/images/btn_cpu700processoroff.gif";
cpu700processoron =  new Image();
cpu700processoron.src = "/images/btn_cpu700processoron.gif";

bm4000nestedsystemoff = new Image();
bm4000nestedsystemoff.src = "/images/btn_bm4000nestedsystemoff.gif";
bm4000nestedsystemon =  new Image();
bm4000nestedsystemon.src = "/images/btn_bm4000nestedsystemon.gif";

ai500cardoff = new Image();
ai500cardoff.src = "/images/btn_ai500cardoff.gif";
ai500cardon =  new Image();
ai500cardon.src = "/images/btn_ai500cardon.gif";

ao500cardoff = new Image();
ao500cardoff.src = "/images/btn_ao500cardoff.gif";
ao500cardon =  new Image();
ao500cardon.src = "/images/btn_ao500cardon.gif";

di500cardoff = new Image();
di500cardoff.src = "/images/btn_di500cardoff.gif";
di500cardon =  new Image();
di500cardon.src = "/images/btn_di500cardon.gif";

di400cardoff = new Image();
di400cardoff.src = "/images/btn_di400cardoff.gif";
di400cardon =  new Image();
di400cardon.src = "/images/btn_di400cardon.gif";

do500cardoff = new Image();
do500cardoff.src = "/images/btn_do500cardoff.gif";
do500cardon =  new Image();
do500cardon.src = "/images/btn_do500cardon.gif";

fcigcicardsoff = new Image();
fcigcicardsoff.src = "/images/btn_fcigcicardsoff.gif";
fcigcicardson =  new Image();
fcigcicardson.src = "/images/btn_fcigcicardson.gif";

hoacardoff = new Image();
hoacardoff.src = "/images/btn_hoacardoff.gif";
hoacardon =  new Image();
hoacardon.src = "/images/btn_hoacardon.gif";

bm1500off = new Image();
bm1500off.src = "/images/btn_bm1500off.gif";
bm1500on =  new Image();
bm1500on.src = "/images/btn_bm1500on.gif";

bm1200off = new Image();
bm1200off.src = "/images/btn_bm1200off.gif";
bm1200on =  new Image();
bm1200on.src = "/images/btn_bm1200on.gif";

commandoff = new Image();
commandoff.src = "/images/btn_commandoff.gif";
commandon =  new Image();
commandon.src = "/images/btn_commandon.gif";

ccpoff = new Image();
ccpoff.src = "/images/btn_ccpoff.gif";
ccpon =  new Image();
ccpon.src = "/images/btn_ccpon.gif";

trendoff = new Image();
trendoff.src = "/images/btn_trendoff.gif";
trendon =  new Image();
trendon.src = "/images/btn_trendon.gif";

newsupdatesoff = new Image();
newsupdatesoff.src = "/images/btn_newsupdatesoff.gif";
newsupdateson =  new Image();
newsupdateson.src = "/images/btn_newsupdateson.gif";

extranetoff = new Image();
extranetoff.src = "/images/btn_extranetoff.gif";
extraneton =  new Image();
extraneton.src = "/images/btn_extraneton.gif";

sitemapoff = new Image();
sitemapoff.src = "/images/btn_sitemapoff.gif";
sitemapon =  new Image();
sitemapon.src = "/images/btn_sitemapon.gif";

aboutoff = new Image();
aboutoff.src = "/images/btnft_aboutusoff.gif";
abouton =  new Image();
abouton.src = "/images/btnft_aboutuson.gif";

productsoff = new Image();
productsoff.src = "/images/btnft_productsoff.gif";
productson =  new Image();
productson.src = "/images/btnft_productson.gif";

servicesoff = new Image();
servicesoff.src = "/images/btnft_servicesoff.gif";
serviceson =  new Image();
serviceson.src = "/images/btnft_serviceson.gif";

contactoff = new Image();
contactoff.src = "/images/btnft_contactoff.gif";
contacton =  new Image();
contacton.src = "/images/btnft_contacton.gif";

newsoff = new Image();
newsoff.src = "/images/btnft_newsoff.gif";
newson =  new Image();
newson.src = "/images/btnft_newson.gif";

sitemap2off = new Image();
sitemap2off.src = "/images/btnft_sitemapoff.gif";
sitemap2on =  new Image();
sitemap2on.src = "/images/btnft_sitemapon.gif";

productlineoff = new Image();
productlineoff.src = "/images/btn_productlineoff.gif";
productlineon =  new Image();
productlineon.src = "/images/btn_productlineon.gif";

logosoff = new Image();
logosoff.src = "/images/btn_logosoff.gif";
logoson =  new Image();
logoson.src = "/images/btn_logoson.gif";

wallpaperoff = new Image();
wallpaperoff.src = "/images/btn_wallpaperoff.gif";
wallpaperon =  new Image();
wallpaperon.src = "/images/btn_wallpaperon.gif";

screensaveroff = new Image();
screensaveroff.src = "/images/btn_screensaveroff.gif";
screensaveron =  new Image();
screensaveron.src = "/images/btn_screensaveron.gif";
}

function imageon(imgName)
{
	if (document.images)
		document[imgName].src = eval(imgName + 'on.src');
}

function imageoff(imgName)
{
	if (document.images)
		document[imgName].src = eval(imgName + 'off.src');

}

function navBG(id, which)
{
	if (which == "off")
		document.getElementById(id).style.backgroundImage = "url(/images/navsub_bg_off.gif)";
	else
		document.getElementById(id).style.backgroundImage = "url(/images/navsub_bg_on.gif)";
}


//Open Browser Window

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}