<!--
var clicked;
clicked="http://www.diabloiron.com/images/MENU_1";

if(document.title == "Custom Gate Design Gallery - Entry Gates, Driveway Gates, Estate Gates, Pool, Electronic, Automatic, Metal, Steel and Iron by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_2";
else if(document.title == "Custom Designed Gates - Entry Gates, Driveway Gates, Estate Gates, Pool, Electronic, Automatic, Metal, Steel and Iron by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_2";
else if(document.title == "Custom Designed Gates - Garden Gates, Yard Gates, Patio Gates, Pool Gates, Ornamental, Metal, Steel and Iron by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_3";
else if(document.title == "Custom Gate Design Gallery - Garden Gates, Yard Gates, Patio Gates, Pool Gates, Ornamental, Metal, Steel and Iron by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_3";
else if(document.title == "Custom Designed Fencing - Estate Fencing, Iron Fence, Metal Fence, Steel Fence, Ornamental Fence and Fence Gates by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_4";
else if(document.title == "Custom Fence Design Gallery - Estate Fencing, Iron Fence, Metal Fence, Steel Fence, Ornamental Fence and Fence Gates by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_4";
else if(document.title == "Custom Designed Fencing - Pool Fencing, Iron Fence, Metal Fence, Steel Fence, Ornamental Fence and Fence Gates by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_5";
else if(document.title == "Custom Fence Design Gallery - Pool Fencing, Iron Fence, Metal Fence, Steel Fence, Ornamental Fence and Fence Gates by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_5";
else if(document.title == "Custom Designed Railing - Hand Railing, Iron Railing, Metal Railing, Steel Railing, Ornamental Railing and Fence Railing by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_6";
else if(document.title == "Custom Railing Design Gallery - Hand Railing, Iron Railing, Metal Railing, Steel Railing, Ornamental Railing and Fence Railing by Diablo Iron, Inc.")
	clicked="http://www.diabloiron.com/images/MENU_6";

var gtype=".jpg";
var selstate="_over";
if (typeof(loc)=="undefined" || loc==""){
	var loc=""
	if (document.body){
		var tt = document.body.innerHTML.toLowerCase();
		var last = tt.indexOf("button.js\"");
		if (last>0){
			var first = tt.lastIndexOf("\"", last);
			if (first>0 && first<last) loc = document.body.innerHTML.substr(first+1,last-first-1);
		}
	}
}

writeButton("","http://www.diabloiron.com/","http://www.diabloiron.com/images/MENU_1",102,32,"About Us","");
writeButton("","http://www.diabloiron.com/entry_gates/","http://www.diabloiron.com/images/MENU_2",129,32,"Entry Gates","");
writeButton("","http://www.diabloiron.com/garden_gates/","http://www.diabloiron.com/images/MENU_3",129,32,"Garden Gates","");
writeButton("","http://www.diabloiron.com/estate_fencing/","http://www.diabloiron.com/images/MENU_4",129,32,"Estate Fencing","");
writeButton("","http://www.diabloiron.com/pool_fencing/","http://www.diabloiron.com/images/MENU_5",129,32,"Pool Fencing","");
writeButton("","http://www.diabloiron.com/iron_railings/","http://www.diabloiron.com/images/MENU_6",102,32,"Iron Railings","");
loc="";

function turn_over(name) {
	if (document.images != null && clicked != name) {
		document[name].src = document[name+"_over"].src;
	}
}

function turn_off(name) {
	if (document.images != null && clicked != name) {
		document[name].src = document[name+"_off"].src;
	}
}

function set_click(name) {
	if (document.images != null && clicked != name) {
                document[clicked].src = document[clicked+"_off"].src;
		clicked = name;
		document[clicked].src = document[clicked+"_over"].src;
	}
}	

function reg(gname,name)
{
	if (document.images)
	{
	document[name+"_off"] = new Image();
	document[name+"_off"].src = loc+gname+gtype;
	document[name+"_over"] = new Image();
	document[name+"_over"].src = loc+gname+"_over"+gtype;
	}
}

function evs(name){ return " onmouseover=\"turn_over('"+ name + "')\" onmouseout=\"turn_off('"+ name + "')\" onclick=\"set_click('"+ name + "')\""}

function writeButton(urld, url, name, w, h, alt, target)
{
	gname = name;
	while(typeof(document[name])!="undefined") name += "x";
	reg(gname, name);

	if (alt != "") alt = " title=\"" + alt + "\"";
	if (target != "") target = " target=\"" + target + "\"";
	if (w > 0) w = " width="+w; else w = "";
	if (h > 0) h = " height="+h; else h = "";	
	if (url != "") url = " href=\"" + urld + url + "\"";

	document.write("<td>");
	document.write("<a " + url + evs(name) + target + ">");
	document.write("<img src=\""+ loc + name + gtype + "\" name=\"" + name + "\"" + w + h + alt + " border=0></a><br/>");
	document.write("</td>");

	if (name == clicked) document[name].src = document[name+"_over"].src;
}
// -->
