
var base= "img/menu_"
var nrm = new Array();
var omo = new Array();
var stuff = new Array('about','company', 'service','work','client','info');
var loaded = (!(navigator.userAgent.indexOf('Netscape6')+1));

if (document.images)
{
for (i=0;i<stuff.length;i++)
{
nrm[i] = new Image;
nrm[i].src = base + stuff[i] + "_sPic.gif";
omo[i] = new Image;
omo[i].src = base + stuff[i] + "_act_sPic.gif";
}
}


function over(no)
{
if (document.images && loaded)
{
document.images[stuff[no]].src = omo[no].src
}
}
function out(no)
{
if (document.images && loaded)
{
document.images[stuff[no]].src = nrm[no].src
}
}


function setSelectedValue(srcListName, value) {
	//var srcList = document.all[srcListName];
	var srcList = document.getElementById(srcListName);
	var srcLen = srcList.length;

	for (var i=0; i<srcLen; i++) {
		srcList.options[i].selected = false;
		if (srcList.options[i].value == value) {
			srcList.options[i].selected = true;
		}
	}
	srcList.value=value;
}

function OnPhotoClick3(photo, width, height) {
PhotoBig = null;
	//width=(photo.width<document.body.clientWidth?photo.width:600);
	//height=(photo.height<document.body.clientHeight?photo.height:500);
	//photo.name = photo.name + '_big';
	new_src=photo.src.replace(/([^\/\.]+)\.([^.]+)$/i,"$1_big.$2");
	//alert(new_src);
//	new_src=photo.replace('/s/','/');	
	
	if (PhotoBig) PhotoBig.close();
	PhotoBig=fMakePopUpWindow(PhotoBig,'about:blank','Photo',width,height,0,0,0,0,0,0,1);
	PhotoBig.document.write("<body topmargin='0' bottommargin='0' leftmargin='0' rightmargin='0' marginheight='0' marginwidth='0' bgcolor=#ffffff><img src="+new_src+" onclick='window.close()' style='cursor:hand'><br></body>");
	PhotoBig.document.close();
}

function fMakePopUpWindow(handler,url,windowName,width,height,toolbar,location,directories,status,menubar,scrollbars,resizable,top,left) {
	if (!handler) var handler=null;
	if (!windowName) title='no_windowName';
	if (!width) width=200;
	if (!height) height=200;

  var x=(typeof(left)=='undefined')?(screen.availWidth - width)/2   : left;
  var y=(typeof(top) =='undefined')?(screen.availHeight - height)/2 : top;

	var windowFeatures = "width=" +width+ ",height=" +height+ ",screenX=" +x+ ",screenY=" +y+ ",top=" +y+ ",left=" +x+ ",toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable;
	//alert(windowFeatures);
	handler=window.open(url,windowName,windowFeatures);
	if (handler) {
		handler.focus();
		if (handler.opener == null) handler.opener = window;
	}
	
	return handler;
}

function fnShowProps(obj, objName){
    var result = "";
    for (var i in obj) // обращение к свойствам объекта по индексу
        result += objName + "." + i + " = " + obj[i] + "<br />\n";
    document.write(result);
}