var IE = document.all?true:false
//if (!IE) document.captureEvents(Event.MOUSEMOVE)
var arrPos;
var imgPath = "/systemImages/"

var linkOn = 0;
var linkOver = "";
var linkNav = "";
var objOpen = new Array;
var objDrops = new Array;
var imgClick = "";


function opacity(id, opacStart, opacEnd, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

function changeOpac(opacity, id) {
	var object = document.getElementById(id).style;
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	changeOpac(0, imageid);
	document.getElementById(imageid).src = imagefile;
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	var currentOpac = 100;
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}
	opacity(id, currentOpac, opacEnd, millisec)
}

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

function windowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [myWidth, myHeight];
}

objNav = new Array;
objNav[0] = new Array;
objNav[0][0] = new Array;
objNav[0][0]["display"] = "Air Conditioners";
objNav[0][1] = new Array;
objNav[0][1]["display"] = "5,000 - 12,000 BTU";
objNav[0][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%41%49%52&MINOR=%41%49%52%3a%41%35%30%30%30%7c%41%49%52%3a%41%36%30%30%30%7c%41%49%52%3a%41%38%30%30%30%7c%41%49%52%3a%41%31%30%30%30%30";
objNav[0][1]["image"] = "AIR1.GIF";
objNav[0][2] = new Array;
objNav[0][2]["display"] = "Greater Than 12,000 BTU";
objNav[0][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%41%49%52&MINOR=%41%49%52%3a%41%31%32%30%30%30%7c%41%49%52%3a%41%31%35%30%30%30%7c%41%49%52%3a%41%33%30%30%30%30";
objNav[0][2]["image"] = "AIR2.GIF";
objNav[0][3] = new Array;
objNav[0][3]["display"] = "Wallfit and Specialty";
objNav[0][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%41%49%52&MINOR=%41%49%52%3a%41%43%53%50%43%4c%7c%41%49%52%3a%41%43%57%41%4c%4c%7c%41%49%52%3a%41%43%53%50%43%4c";
objNav[0][3]["image"] = "AIR3.GIF";

objNav[1] = new Array;
objNav[1][0] = new Array;
objNav[1][0]["display"] = "BBQ";
objNav[1][1] = new Array;
objNav[1][1]["display"] = "Gas Fired";
objNav[1][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%42%42%51&MINOR=%42%42%51%3a%42%42%51%4c%50%7c%42%42%51%3a%42%42%51%4e%47";
objNav[1][1]["image"] = "BBQ1.GIF";
objNav[1][2] = new Array;
objNav[1][2]["display"] = "Professional";
objNav[1][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%42%42%51&MINOR=%42%42%51%3a%42%42%51%50%52%4f";
objNav[1][2]["image"] = "BBQ2.GIF";
objNav[1][3] = new Array;
objNav[1][3]["display"] = "Charcoal/Specialty";
objNav[1][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%42%42%51&MINOR=%42%42%51%3a%41%43%43%45%53%53%7c%42%42%51%3a%42%42%51%45%4c%7c%42%42%51%3a%42%42%51%43%48";
objNav[1][3]["image"] = "BBQ3.GIF";

objNav[2] = new Array;
objNav[2][0] = new Array;
objNav[2][0]["display"] = "Dishwashers";
objNav[2][1] = new Array;
objNav[2][1]["display"] = "Built In Dishwashers";
objNav[2][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%44%49%53%48&MINOR=%44%49%53%48%3a%44%57%42%49";
objNav[2][1]["image"] = "DISH1.GIF";
objNav[2][2] = new Array;
objNav[2][2]["display"] = "Portable Dishwashers";
objNav[2][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%44%49%53%48&MINOR=%44%49%53%48%3a%44%57%50%4f";
objNav[2][2]["image"] = "DISH2.GIF";

objNav[3] = new Array;
objNav[3][0] = new Array;
objNav[3][0]["display"] = "Electrionics";
objNav[3][1] = new Array;
objNav[3][1]["display"] = "Traditional Television";
objNav[3][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%54%56%3a%31%30%43%54%56%4d%7c%54%56%3a%31%33%43%54%56%4d%7c%54%56%3a%31%39%43%54%56%4d%7c%54%56%3a%33%32%43%54%56%4d%7c%54%56%3a%33%36%43%54%56%4d%7c%54%56%3a%43%4f%4e%53%54%56";
objNav[3][1]["image"] = "TV1.GIF";
objNav[3][2] = new Array;
objNav[3][2]["display"] = "Combo Television (TV + DVD or VCR in one)";
objNav[3][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%54%56%3a%31%33%43%4f%4d%42%7c%54%56%3a%32%30%43%4f%4d%42%7c%54%56%3a%32%31%43%4f%4d%42";
objNav[3][2]["image"] = "TV2.GIF";
objNav[3][3] = new Array;
objNav[3][3]["display"] = "Projection Television";
objNav[3][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%54%56%3a%50%52%4f%4a%44%7c%54%56%3a%50%52%4f%4a%4c%7c%54%56%3a%50%52%4f%4a%54";
objNav[3][3]["image"] = "TV3.GIF";
objNav[3][4] = new Array;
objNav[3][4]["display"] = "LCD Television";
objNav[3][4]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%54%56%3a%4c%43%44%54%56";
objNav[3][4]["image"] = "TV4.GIF";
objNav[3][5] = new Array;
objNav[3][5]["display"] = "Plasma Television";
objNav[3][5]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%54%56%3a%50%4c%41%53%4d%41";
objNav[3][5]["image"] = "TV5.GIF";
objNav[3][6] = new Array;
objNav[3][6]["display"] = "Projectors";
objNav[3][6]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%54%56%3a%50%52%4f%4a";
objNav[3][6]["image"] = "TV6.GIF";
objNav[3][7] = new Array;
objNav[3][7]["display"] = "VCR";
objNav[3][7]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%56%43%52%3a%56%43%52";
objNav[3][7]["image"] = "TV7.GIF";
objNav[3][8] = new Array;
objNav[3][8]["display"] = "DVD and DVD Recorders";
objNav[3][8]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%44%56%44%3a%44%56%44%7c%44%56%44%3a%44%56%44%43%7c%44%56%44%3a%44%56%44%52";
objNav[3][8]["image"] = "TV8.GIF";
objNav[3][9] = new Array;
objNav[3][9]["display"] = "Home and Car Audio";
objNav[3][9]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%54%56%7c%56%43%52%7c%44%56%44%7c%41%55%44%49%4f&MINOR=%41%55%44%49%4f%3a%42%4f%4f%4d%45%52%7c%41%55%44%49%4f%3a%43%4c%4b%52%41%44%7c%41%55%44%49%4f%3a%43%4f%4d%50%4f%4e%7c%41%55%44%49%4f%3a%43%4f%4d%53%54%45%7c%41%55%44%49%4f%3a%43%50%44%49%53%43%7c%41%55%44%49%4f%3a%52%41%44%49%4f%7c%41%55%44%49%4f%3a%54%48%45%41%54%52%7c%41%55%44%49%4f%3a%57%41%4c%4b%7c%41%55%44%49%4f%3a%41%43%43%45%53%53%7c%41%55%44%49%4f%3a%48%45%41%44%7c%41%55%44%49%4f%3a%43%41%52%7c%41%55%44%49%4f%3a%4d%50%33%7c%41%55%44%49%4f%3a%41%4d%50%7c%41%55%44%49%4f%3a%53%50%45%41%4b";
objNav[3][9]["image"] = "TV9.GIF";

objNav[4] = new Array;
objNav[4][0] = new Array;
objNav[4][0]["display"] = "Freezers";
objNav[4][1] = new Array;
objNav[4][1]["display"] = "Chest Freezer";
objNav[4][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%46%52&MINOR=%46%52%3a%43%48%46%52%5a%45";
objNav[4][1]["image"] = "FR1.GIF";
objNav[4][2] = new Array;
objNav[4][2]["display"] = "Upright Freezer";
objNav[4][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%46%52&MINOR=%46%52%3a%55%50%46%52%5a%45";
objNav[4][2]["image"] = "FR2.GIF";

objNav[5] = new Array;
objNav[5][0] = new Array;
objNav[5][0]["display"] = "Hoods";
objNav[5][1] = new Array;
objNav[5][1]["display"] = "Ductless";
objNav[5][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%48%4f%4f%44&MINOR=%48%4f%4f%44%3a%44%43%54%4c%45%53";
objNav[5][1]["image"] = "HOOD1.GIF";
objNav[5][2] = new Array;
objNav[5][2]["display"] = "Ducted";
objNav[5][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%48%4f%4f%44&MINOR=%48%4f%4f%44%3a%44%55%43%54%45%44";
objNav[5][2]["image"] = "HOOD2.GIF";
objNav[5][3] = new Array;
objNav[5][3]["display"] = "Convertable"
objNav[5][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%48%4f%4f%44&MINOR=%48%4f%4f%44%3a%43%4f%4e%56%48%44";
objNav[5][3]["image"] = "HOOD3.GIF";

objNav[6] = new Array;
objNav[6][0] = new Array;
objNav[6][0]["display"] = "Laundry";
objNav[6][1] = new Array;
objNav[6][1]["display"] = "Top Load Washers";
objNav[6][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4c%41%55%4e%44&MINOR=%4c%41%55%4e%44%3a%57%41%53%48%53%7c%4c%41%55%4e%44%3a%57%41%53%48%58";
objNav[6][1]["image"] = "LAUND1.GIF";
objNav[6][2] = new Array;
objNav[6][2]["display"] = "Front Load Washers";
objNav[6][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4c%41%55%4e%44&MINOR=%4c%41%55%4e%44%3a%57%41%53%48%46";
objNav[6][2]["image"] = "LAUND2.GIF";
objNav[6][3] = new Array;
objNav[6][3]["display"] = "Electric Dryers";
objNav[6][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4c%41%55%4e%44&MINOR=%4c%41%55%4e%44%3a%44%52%59%45%7c%4c%41%55%4e%44%3a%44%52%59%45%46";
objNav[6][3]["image"] = "LAUND4.GIF";
objNav[6][4] = new Array;
objNav[6][4]["display"] = "Gas Dryers";
objNav[6][4]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4c%41%55%4e%44&MINOR=%4c%41%55%4e%44%3a%44%52%59%47%7c%4c%41%55%4e%44%3a%44%52%59%47%46";
objNav[6][4]["image"] = "LAUND5.GIF";
objNav[6][5] = new Array;
objNav[6][5]["display"] = "Specialty Washers";
objNav[6][5]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4c%41%55%4e%44&MINOR=%4c%41%55%4e%44%3a%57%41%53%48%50%7c%4c%41%55%4e%44%3a%43%4f%4d%4d%43%4c";
objNav[6][5]["image"] = "LAUND3.GIF";

objNav[7] = new Array;
objNav[7][0] = new Array;
objNav[7][0]["display"] = "Microwaves";
objNav[7][1] = new Array;
objNav[7][1]["display"] = "Countertop";
objNav[7][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4d%49%43&MINOR=%4d%49%43%3a%4d%49%43%43%4f";
objNav[7][1]["image"] = "MIC1.GIF";
objNav[7][2] = new Array;
objNav[7][2]["display"] = "Over the Range or Built In";
objNav[7][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%4d%49%43&MINOR=%4d%49%43%3a%4d%49%43%4f%52";
objNav[7][2]["image"] = "MIC2.GIF";

objNav[8] = new Array;
objNav[8][0] = new Array;
objNav[8][0]["display"] = "Refrigerators";
objNav[8][1] = new Array;
objNav[8][1]["display"] = "Top Freezer";
objNav[8][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%52%45%46&MINOR=%52%45%46%3a%52%54%31%30%7c%52%45%46%3a%52%54%31%33%7c%52%45%46%3a%52%54%31%35%47%7c%52%45%46%3a%52%54%31%35%57%7c%52%45%46%3a%52%54%31%37%47%7c%52%45%46%3a%52%54%31%37%57%7c%52%45%46%3a%52%54%31%39%47%7c%52%45%46%3a%52%54%31%39%57%7c%52%45%46%3a%52%54%32%31%47%7c%52%45%46%3a%52%54%32%31%57%7c%52%45%46%3a%52%54%32%32%47%7c%52%45%46%3a%52%54%32%32%57";
objNav[8][1]["image"] = "REF2.GIF";
objNav[8][2] = new Array;
objNav[8][2]["display"] = "Bottom Freezer";
objNav[8][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%52%45%46&MINOR=%52%45%46%3a%52%42%31%39%7c%52%45%46%3a%52%42%32%30";
objNav[8][2]["image"] = "REF3.GIF";
objNav[8][3] = new Array;
objNav[8][3]["display"] = "Side by Side";
objNav[8][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%52%45%46&MINOR=%52%45%46%3a%52%53%32%30%7c%52%45%46%3a%52%53%32%32%7c%52%45%46%3a%52%53%32%34%7c%52%45%46%3a%52%53%32%35";
objNav[8][3]["image"] = "REF5.GIF";
objNav[8][4] = new Array;
objNav[8][4]["display"] = "Built In";
objNav[8][4]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%52%45%46&MINOR=%52%45%46%3a%52%55%42%7c%52%45%46%3a%52%55%53%7c%52%45%46%3a%52%55%54%7c";
objNav[8][4]["image"] = "REF4.GIF";
objNav[8][5] = new Array;
objNav[8][5]["display"] = "Mini";
objNav[8][5]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%52%45%46&MINOR=%52%45%46%3a%52%4d%31%30%7c%52%45%46%3a%52%4d%32%7c%52%45%46%3a%52%4d%35%7c%52%45%46%3a%52%4d%37";
objNav[8][5]["image"] = "REF1.GIF";
objNav[8][6] = new Array;
objNav[8][6]["display"] = "Specialty";
objNav[8][6]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%52%45%46&MINOR=%52%45%46%3a%52%45%46%41%4c%4c%7c%52%45%46%3a%52%43%41%4c%4c%7c%52%45%46%3a%52%53%50%43%4c%7c%52%45%46%3a%52%46%41%43%43%7c%52%45%46%3a%52%57%43";
objNav[8][6]["image"] = "REF6.GIF";

objNav[9] = new Array;
objNav[9][0] = new Array;
objNav[9][0]["display"] = "Cooking Products";
objNav[9][1] = new Array;
objNav[9][1]["display"] = "Electric Range";
objNav[9][1]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%45%52%3a%45%52%32%30%52%43%7c%45%52%3a%45%52%32%34%52%43%7c%45%52%3a%45%52%33%30%52%43%7c%45%52%3a%45%52%33%36%41%7c%45%52%3a%45%52%33%30%53%54";
objNav[9][1]["image"] = "ER1.GIF";
objNav[9][2] = new Array;
objNav[9][2]["display"] = "Gas Range";
objNav[9][2]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%47%52%3a%47%41%53%52%32%30%7c%47%52%3a%47%41%53%52%32%34%7c%47%52%3a%47%41%53%52%33%30%7c%47%52%3a%47%52%33%36%41";
objNav[9][2]["image"] = "GR1.GIF";
objNav[9][3] = new Array;
objNav[9][3]["display"] = "Electric Drop In";
objNav[9][3]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%45%52%3a%45%52%44%52%4f%50";
objNav[9][3]["image"] = "ER2.GIF";
objNav[9][4] = new Array;
objNav[9][4]["display"] = "Electric Slide In";
objNav[9][4]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%45%52%3a%45%52%53%4c%49%4e";
objNav[9][4]["image"] = "ER3.GIF";
objNav[9][5] = new Array;
objNav[9][5]["display"] = "Gas Slide In";
objNav[9][5]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%47%52%3a%47%52%53%4c%49%4e";
objNav[9][5]["image"] = "GR3.GIF";
objNav[9][6] = new Array;
objNav[9][6]["display"] = "Electric Cooktops";
objNav[9][6]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%45%52%3a%45%52%53%55%52%46";
objNav[9][6]["image"] = "ER4.GIF";
objNav[9][7] = new Array;
objNav[9][7]["display"] = "Gas Cooktops";
objNav[9][7]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%47%52%3a%47%52%53%55%52%46";
objNav[9][7]["image"] = "GR4.GIF";
objNav[9][8] = new Array;
objNav[9][8]["display"] = "Professional Ranges";
objNav[9][8]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%47%52%3a%47%41%53%50%52%4f";
objNav[9][8]["image"] = "GR2.GIF";
objNav[9][9] = new Array;
objNav[9][9]["display"] = "Single Wall Ovens";
objNav[9][9]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%45%52%3a%45%52%57%41%4c%31%7c%47%52%3a%47%52%57%41%4c%31";
objNav[9][9]["image"] = "OVEN1.GIF";
objNav[9][10] = new Array;
objNav[9][10]["display"] = "Double Wall Ovens";
objNav[9][10]["link"] = "/_CGI/SEARCH2.HTML?MAJOR=%45%52%7c%47%52&MINOR=%45%52%3a%45%52%57%41%4c%32";
objNav[9][10]["image"] = "OVEN2.GIF";



function findHeight(objNav){
	setHeight = 150;
	docHeight = windowSize();
	docHeight = docHeight[1];
	objNav.style.height  = "auto";
	intHeight = objNav.offsetHeight;
	intTop = objNav.offsetTop;
	intMaxHeight = docHeight - intTop-20;
	if(intMaxHeight > intHeight)setHeight = intHeight;
	if(intHeight > intMaxHeight){
		setHeight = intMaxHeight;
		if(IE)objNav.paddingRight = "15px";
	}
	objNav.style.height = setHeight + "px";
}


function checkMouseMove(e){
	if(linkOn){
		arrPos = getMouseXY(e);
		arrCheckLink = findPos(objOpen[0]);
		arrCheckBox = findPos(objOpen[1]);
		objImg = document.getElementById("divCursorInfo");
		arrCheckImg = findPos(document.getElementById("divCursorInfo"));


		if((arrPos[1] < arrCheckLink[1]) || (arrPos[0] < arrCheckLink[0]) || (arrPos[1] > objOpen[0].offsetHeight+arrCheckLink[1]) || (arrPos[0] > objOpen[0].offsetWidth+arrCheckLink[0])){
			if((arrPos[1] < arrCheckBox[1]) || (arrPos[0] < arrCheckBox[0]) || (arrPos[1] > objOpen[1].offsetHeight+arrCheckBox[1]) || (arrPos[0] > objOpen[1].offsetWidth+arrCheckBox[0])){
				if((arrPos[1] < arrCheckImg[1]) || (arrPos[0] < arrCheckImg[0]) || (arrPos[1] > objImg.offsetHeight+arrCheckImg[1]) || (arrPos[0] > objImg.offsetWidth+arrCheckImg[0])){
					objOpen[1].style.display = 'none';
					document.getElementById("divCursorInfo").style.display = "none";
					linkOn = 0;
				}
			}
		}
		//document.getElementById("display").innerHTML = "x = " + arrCheckImg[0] + " y = " + arrCheckImg[1] + " value = " + arrCheckImg;
	}
}

function expanClick(obj){
	var findInt = obj.id.split("_");
	var intOpen = findInt[1];
	var objParent = document.getElementById("divNav");
	var objOpen = document.getElementById("divNav_"+intOpen+"_"+intOpen);
	var objCheck = document.getElementById("divNavClick_"+intOpen);
	var strCheck = objCheck.innerHTML;
	if(strCheck == "+"){
		objOpen.style.display = "block";
		objCheck.innerHTML = "-";
		findHeight(objParent);
		objParent.scrollTop = obj.offsetTop;

	}else{
		objOpen.style.display = "none";
		objCheck.innerHTML = "+";
		findHeight(objParent);
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function getMouseXY(e) {
  var tempX =  tempY = 0
  if (IE) {
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {
    tempX = e.pageX
    tempY = e.pageY
  }


  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}

  return [tempX, tempY]
}

function imgOut(obj){
	opacity('imgDisplayMouseOver', 80, 0, 50);
	document.getElementById("divCursorInfo").style.display = "none";
}

function imgOver(obj){
	var imgItem = document.getElementById("divCursorInfo");
	imgItem.style.left = objOpen[1].offsetLeft + objOpen[1].offsetWidth;

	var intPosition = objOpen[1].offsetTop + obj.offsetTop - 10 - objOpen[1].scrollTop;
	if((intPosition + 112) > (objOpen[1].offsetHeight+objOpen[1].offsetTop))intPosition = objOpen[1].offsetHeight + objOpen[1].offsetTop - 112;
	imgItem.style.top = intPosition;

	var arr = obj.id.split("_");
	document.getElementById("imgDisplayMouseOver").src = imgPath+objNav[arr[1]][arr[2]]["image"];
	opacity('imgDisplayMouseOver', 0, 100, 800);
	imgItem.style.display = "block";
	imgClick = obj.id;
}

function linkClick(obj){
	var arr = (obj.id == "divCursorInfo")?imgClick.split("_"):obj.id.split("_");
	document.location = objNav[arr[1]][arr[2]]["link"];
}

function mouseOut(obj){
	obj.style.backgroundColor = bgColor;
	obj.style.color = fontColor;
}

function mouseOver(obj){
	obj.style.backgroundColor = bgColorHover;
	obj.style.color = fontColorHover;
}

function positionLinks(objOver, objNav){
	linkOn = 1;
	arrPos = findPos(objOver);
	objOpen[0] = objOver;
	objOpen[1] = objNav;
	objStyle = objOpen[1].style
	objStyle.left = arrPos[0];
	objStyle.top = arrPos[1]+objOver.offsetHeight;
	objStyle.display = "block";
	findHeight(objNav);
}

function showLink(objOver){
	var linkOver = objOver;
	var linkNav = document.getElementById("divNav");

	if(!linkOn){
		positionLinks(linkOver, linkNav);
	}else{
		if(objOver.id != objOpen[0].id){
			for(var key in objDrops)linkNav.style.display="none";
			positionLinks(objOver, linkNav);
		}
	}
}

function findScroll(obj){
	alert(document.getElementById("divNav").offsetHeight);

}

function buildMenu(){
	var newDiv = new Array;
	var navCount = new Array;
	var objStyle = "";

	objDrops["divNav"] = new Array();

	newDiv[0] = document.createElement("div");
	newDiv[0].id = "divNav";
	objStyle = newDiv[0].style;
		objStyle.fontFamily = "Arial, Helvetica, sans-serif";
		objStyle.fontWeight = "bold";
		objStyle.fontSize = "11px";
		objStyle.position = "absolute";
		objStyle.display = "none";
		objStyle.top = "100px";
		objStyle.left = "100px";
		objStyle.backgroundColor = "#ffffff";
		objStyle.border = "1px solid #000000";

		objStyle.overflow = "auto";
		objStyle.textDecoration = "none";
		objStyle.overflowX = "hidden";
		//objStyle.height = "150px";
		//if(IE)objStyle.paddingRight = "15px";

	navCount[0] = objNav.length;

	for(var i = 0;i<navCount[0]; i++){

		newDiv[1] = document.createElement("div");
		newDiv[1].id = "divNav_"+i;
		objStyle = newDiv[1].style;
			if(i != navCount[0]-1)objStyle.borderBottom = "1px solid #000000";
			objStyle.padding = "2px 5px 2px 5px";
		newDiv[0].appendChild(newDiv[1]);

		newDiv[2] = document.createElement("div");
		newDiv[2].id = "divNavExpand_"+i;
		newDiv[2].onmouseover = function (event) {mouseOver(this); imgOut(this);};
		newDiv[2].onmouseout = function (event) {mouseOut(this);};
		newDiv[2].onclick = function (event) {expanClick(this);};
		objStyle = newDiv[2].style;
			objStyle.padding = "1px 1px 0px 1px";
			objStyle.backgroundColor= bgColor;
		newDiv[1].appendChild(newDiv[2]);

		newDiv[3] = document.createElement("span");
		newDiv[3].id = "divNavClick_"+i;
		objStyle = newDiv[3].style;
			objStyle.cursor = "pointer";
			objStyle.paddingRight = "5px";
		newDiv[3].innerHTML = "+";
		newDiv[2].appendChild(newDiv[3]);

		newDiv[4] = document.createElement("span");
		objStyle = newDiv[4].style;
			objStyle.cursor = "pointer";
		newDiv[4].innerHTML = objNav[i][0]["display"];
		newDiv[2].appendChild(newDiv[4]);

		newDiv[5] = document.createElement("div");
		newDiv[5].id = "divNav_"+i +"_"+i;
		objStyle = newDiv[5].style;
			objStyle.paddingLeft = "20px";
			objStyle.display = "none";
		newDiv[1].appendChild(newDiv[5]);

		navCount[1] = objNav[i].length;

		for(var x = 1;x<navCount[1]; x++){
			newDiv[6] = document.createElement("div");
			newDiv[6].id = "divNavLink_"+i+"_"+x;
			newDiv[6].onmouseover = function (event) {mouseOver(this); imgOver(this);};
			newDiv[6].onmouseout = function (event) {mouseOut(this);};
			newDiv[6].onclick = function(event){linkClick(this);};
			objStyle = newDiv[6].style;
				objStyle.padding = "1px 0px 1px 5px";
				objStyle.cursor = "pointer";

			newDiv[6].innerHTML = objNav[i][x]["display"];
			newDiv[5].appendChild(newDiv[6]);
		}
	}
	document.body.appendChild(newDiv[0]);

	newDiv[0] = document.createElement("div");
	newDiv[0].id = "divCursorInfo";
	newDiv[0].onclick = function(event){linkClick(this);};
	objStyle = newDiv[0].style;
		objStyle.position = "absolute";
		objStyle.display = "none";
		objStyle.backgroundColor = "#ffffff";
		objStyle.border="1px solid #000000";
		objStyle.cursor = "pointer";

	newImg = document.createElement("img");
	newImg.id = "imgDisplayMouseOver";
	newImg.src = "images/_blank.gif";
	newImg.height = 110;
	newImg.width = 150;
	newDiv[0].appendChild(newImg);

	document.body.appendChild(newDiv[0]);
}

document.onmousemove = checkMouseMove;



function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {
    var iframeElement = document.getElementById(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 5 + 'px';
   // iframeElement.style.width = iframeWindow.document.width + 5 +  'px';
  }else if (document.all) {
    var iframeElement = document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat') 
    {
      iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
      //iframeElement.style.width = iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
    }
    else {
      iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
      //iframeElement.style.width = iframeWindow.document.body.scrollWidth + 5 + 'px';
    }
  }
}
     