count = 4;
menu_on=new Array();
menu_off=new Array();
circle=new Array();
circle[0]= new Image();
circle[1]= new Image();
circle[0].src = "/i/menu_circle.gif";
circle[1].src = "/i/menu_circle_.gif";
current =0;//текущая страница

for (i=1;i<=count;i++){
	menu_on[i] = new Image();
	menu_off[i] = new Image();
	menu_on[i].src = "/i/menu_"+i+"_.jpg";
	menu_off[i].src = "/i/menu_"+i+".gif";
}

function turn(ID,type) {
	var name='img'+ID;
	var circleName='c'+ID;
	var img=document.getElementById(name);
	var circleImg=document.getElementById(circleName);
	if(type){
		//показать
		img.src=menu_on[ID].src;
		circleImg.src=circle[1].src;
	}else{
		if(ID!=current){
			//скрыть
			img.src=menu_off[ID].src;
			circleImg.src=circle[0].src;
		}
	}
}

function win_open(src,formfactor)
{
	if(formfactor){
		w=424;
		h=579;
	}else{
		w=594;
		h=409;
	}
	params='width='+w+', height='+h+', location=no, resizable=no, scrollbars=yes, menubar=no, toolbar=no, directories=no,,top=10,left=10';
	window.open(src,"",params);
}

// проверка полей контактов
function checkFieldsContacts(){
	if (document.contacts.name.value=="" || document.contacts.email.value==""  || 				document.contacts.message.value==""){
		alert("Извините, но поля: Ваше имя, E-mail, Текст сообщения - \n должны быть заполнены.");
		return false;
	}else{
		return true;
	}
}