var clicked=""
var gtype=".gif"
var selstate="_over"
var gnum=""

function wrts(bbb){

gnum=bbb
document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"graphics/bg_t1.gif\"><tr>");
document.write("<td><img src=\""+"graphics/bg_t1.gif\" alt=\"\" height=\"22\"></td>");
tr(false);
writeButton("","index.html","graphics/b612",74,22," О сайте ... ","1",0);
writeButton("","index2.html","graphics/b613",84,22," Коллекция ... ","2",0);
writeButton("","index4.html","graphics/b614",60,22," Я ищу ... ","3",0);
writeButton("","index1.html","graphics/b615",69,22," Ссылки ... ","4",0);
writeButton("","index3.html","graphics/b616",77,22," Проекты ... ","5",0);
writeButton("","indexe.htm","graphics/b617",99,22," English page ","6",0);
tr(true);
document.write("<td align=\"right\"><img src=\""+"graphics/bg_t1.gif\" alt=\"\"  height=\"22\"></td>");
document.write("</tr></table>")
}

function tr(b){}

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 reg(gname,name)
{
if (document.images)
	{
	document[name+"_off"] = new Image();
	document[name+"_off"].src = gname+gtype;
	document[name+"_over"] = new Image();
	document[name+"_over"].src = gname+"_over"+gtype;
	}
}

function evs(name){ return " onmouseover=\"turn_over('"+ name + "')\" onmouseout=\"turn_off('"+ name + "')\""}

function writeButton(urld, url, name, w, h, alt, target, hsp)
{
	if (target == gnum) name = name + "y";
	gname = name;
	while(typeof(document[name])!="undefined") name += "x";
	reg(gname, name);
	tr(true);
	document.write("<td>");
	if (alt != "") alt = " alt=\"" + alt + "\"";
	if (w > 0) w = " width=\""+w+"\""; else w = "";
	if (h > 0) h = " height=\""+h+"\""; else h = "";	
	if (url != "") url = " href=\"" + url + "\"";
	if (target == gnum) url = "";
	document.write("<a" + url  + evs(name) + ">");	
	document.write("<img src=\""+gname+gtype+"\" name=\"" + name + "\"" + w + h + alt + " border=\"0\" /></a></td>");
	tr(false);
}

