function my_win_two()
{
window.open('rect_shop_two.htm','mywindow','width=800,height=700,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function End1Option() {
	if (document.form.End1Conn.value == "DuctMate-35") {
		document.form.Gasket.disabled = false;}
	else if (document.form.End1Conn.value == "DuctMate-45") {
		document.form.Gasket.disabled = false;}
	else {
		document.form.Gasket.disabled = true;
	}
	
}

function TableOut(){
	clearTimeout(TimerID);
    TimerID = setTimeout("ShowLayers('None')", TimeLayerOut);
}

function TableOver(ActiveLayer){
	clearTimeout(TimerID);
	if(ActiveLayer == LinkLayer){
		clearTimeout(TimerIDLink);
		WaitLink = 0;
	}
	ShowLayers(ActiveLayer);
}

function ResetWaitLink(ActiveLayer){
	WaitLink = 0;
	clearTimeout(TimerIDLink);
	ShowLayers(ActiveLayer);
}

function LinkOut(ActiveLayer){
	IsLink = "NO";
	WaitLink = 1;
    TimerIDLink = setTimeout("ResetWaitLink('" + ActiveLayer + "')", TimeLinkOut);
	TableOut();
}

function LinkOver(ActiveLayer){
	clearTimeout(TimerID);
	clearTimeout(TimerIDLink);
	WaitLink = 0;
	LinkLayer = ActiveLayer;
	IsLink = ActiveLayer;
	ShowLayers(ActiveLayer);
}

function ShowLayers(ActiveLayer){
	
	if (IsLink != "NO") ActiveLayer = IsLink;

	if (ActiveLayer == "None"){
		var imgCount = 1;
		do {
			imageId = ("I" + imgCount);
			imageOff = (imageId + "_off");
			imgCount++;	 
			changeImages(imageId, imageOff);
		} while (imgCount <= numOfImages); 
	}

	if (PrevLayer != ActiveLayer && WaitLink == 0){
	
		for(i=0; i<layerCount;i++){
			if (is_nav4) {
				document.layers[layersList[i]].visibility='hide';
			} else if (is_ie4) {
				document.all[layersList[i]].style.visibility='hidden';
			} else if (is_domcom) {
				document.getElementById(layersList[i]).style.visibility='hidden';
			}

			if (ActiveLayer.search(layersList[i]) > -1){
				if (is_nav4) {
					document.layers[layersList[i]].visibility='show';
				} else if (is_ie4) {
					document.all[layersList[i]].style.visibility='visible';
				} else if (is_domcom) {
					document.getElementById(layersList[i]).style.visibility='visible';
				}
			}
		}
		PrevLayer = ActiveLayer;
	}
}

function showMenu(ActiveLayer, image){
	var imgCount = 1

	do {
		var imageId = ("I" + imgCount);
		var imageOn = (imageId + "_on");
		var imageOff = (imageId + "_off");
		imgCount++;	 
		if (image == imageId) {
			changeImages(image, imageOn);
		} else {
			changeImages(imageId, imageOff);
		}
	} while (imgCount <= numOfImages); 

	LinkOver(ActiveLayer);
}

function hideMenu(){
	LinkOut('');
}



function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function GetNewWindow(newpage, ht, wd) {
	newwin = window.open(newpage, "new", "width=" + ht + ", height=" + wd + ", resizable=no, titlebar=no, status=no, scrollbars=no");
	newwin.creator = self;
}

function GetNewWindowSizable(newpage, ht, wd) {
	newwin = window.open(newpage, "new", "width=" + ht + ", height=" + wd + ", resizable=yes, titlebar=yes, status=no, scrollbars=yes, toolbars=yes");
	newwin.creator = self;
}
