function ovrpic(id,idmen) {
if (idmen == "top")
{document.images[id].src='/img/gray_fish_on.gif'}
if (idmen == "rest")
{document.images[id].src='/img/gray_fish_on_rest.gif'}
if (idmen == "cheat")
{document.images[id].src='/img/gray_fish_on_cheat.gif'}
if (idmen == "pub")
{document.images[id].src='/img/gray_fish_on_pub.gif'}
if (idmen == "strip")
{document.images[id].src='/img/gray_fish_on_strip.gif'}
if (idmen == "mid")
{document.images[id].src='/img/red_fish_on.gif'}
if (idmen == "box")
{document.images[id].src='/img/box_on.gif'}
if (idmen == "box_e")
{document.images[id].src='/img/box_on_e.gif'}
if (idmen == "typem")
{document.images[id].src='/img/kont_on.gif'}
if (idmen == "typem_e")
{document.images[id].src='/img/kont_on_e.gif'}
if (idmen == "photo")
{document.images[id].src='/img/red_fish_wy_on.gif'}
if (idmen == "sitemap")
{document.images[id].src='/img/map1.gif'}
if (idmen == "sitemap_e")
{document.images[id].src='/img/map1_e.gif'}
if (idmen == "vacancy_top")
{document.images[id].src='/img/red_fish_vac.gif'}
if (idmen == "vacancy_pub")
{document.images[id].src='/img/red_fish_vac_pub_on.gif'}
if (idmen == "vacancy_strip")
{document.images[id].src='/img/red_fish_vac_strip_on.gif'}
if (idmen == "vacancy_cheat")
{document.images[id].src='/img/red_fish_vac_cheat_on.gif'}
if (idmen == "vacancy_rest")
{document.images[id].src='/img/red_fish_vac_rest_on.gif'}
                                                   }

function outpic(id,idmen) {
if (idmen == "top")
{document.images[id].src='/img/gray_fish_off.gif'}
if (idmen == "rest")
{document.images[id].src='/img/gray_fish_off_rest.gif'}
if (idmen == "cheat")
{document.images[id].src='/img/gray_fish_off_cheat.gif'}
if (idmen == "pub")
{document.images[id].src='/img/gray_fish_off_pub.gif'}
if (idmen == "strip")
{document.images[id].src='/img/gray_fish_off_strip.gif'}
if (idmen == "mid")       
{document.images[id].src='/img/red_fish_off.gif'}
if (idmen == "box")
{document.images[id].src='/img/box_off.gif'}
if (idmen == "box_e")
{document.images[id].src='/img/box_off.gif'}
if (idmen == "typem")
{document.images[id].src='/img/kont_off.gif'}
if (idmen == "typem_e")
{document.images[id].src='/img/kont_off_e.gif'}
if (idmen == "photo")
{document.images[id].src='/img/red_fish_wy_off.gif'}
if (idmen == "sitemap")    
{document.images[id].src='/img/map.gif'}
if (idmen == "sitemap_e")
{document.images[id].src='/img/map_e.gif'}
if (idmen == "vacancy_top")
{document.images[id].src='/img/red_fish_vac_off.gif'}
if (idmen == "vacancy_pub")
{document.images[id].src='/img/red_fish_vac_pub.gif'}
if (idmen == "vacancy_strip")
{document.images[id].src='/img/red_fish_vac_strip.gif'}
if (idmen == "vacancy_cheat")
{document.images[id].src='/img/red_fish_vac_cheat.gif'}
if (idmen == "vacancy_rest")
{document.images[id].src='/img/red_fish_vac_rest.gif'}
                                                        }

function MM_preloadImages() { //v3.0
  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 PrintVersion(){
	if (document.print_form){
		PR=window.open("","wndPrint","width=500,height=600,left=0,top=0,menubar=yes,toolbar=yes,resizable=no,status=no,scrollbars=yes");
		document.print_form.submit();
	}else{
		alert("No print version for this page!");
	}
}

function popdn(url,name,w,h,scrolly)
{
        if (scrolly != 'yes'){scrolly = 'no'}
	popupische = window.open(url,name,"alwaysRaised=yes,top=0,left=0,width="+w+",height="+h+",menubar=no,toolbar=no,resizable=no,status=no,scrollbars="+scrolly+"");
	selfname = "mainwin";
	popupische.focus();
}
	function ocl(URL){
		window.opener.location.href = URL;
		window.close();
		window.opener.focus();
	}

function mxl(){
var maxleng = 180;
	txt = document.Data.msg.value;
    txtleng = txt.length;
	if (txtleng <= maxleng) {document.Data.msg.focus();}
	else {
	txtwo = txt.substring(0,maxleng);
	document.Data.msg.value = txtwo;
	document.Data.msg.focus();
			}
}

function checkform(){
if (document.Data.msg.value.length > 0 && document.Data.name.value.length > 0){
	document.Data.submit();
												}
else alert('Заполните, пожалуйста, все поля!');
}

function checkformEng(){
if (document.Data.msg.value.length > 0 && document.Data.name.value.length > 0){
	document.Data.submit();
												}
else alert('Fill all fields, please!');
}

///-----Sliding-text-----------------------------------------------------
/* EXAMPLE
 fullInfo(ID, BLOCK HEIGHT, SPEED, SPEEDUP);
*/

var bHeight = new Array();
var i = new Array();
var condition = new Array;
var blocked = new Array();
var sVal;

function move(id,opHeight,speed,speedup){

 bHeight[id] = 1;
if(!i[id])
 i[id] = bHeight[id];

if(speed <= 0)
 speed = 1;

 blocked[id] = 1;
 if(!condition[id]){
 if(i[id] < opHeight){

 if(speedup > 0){
 i[id] += speed * speedup * ((opHeight-i[id])/opHeight)
 i[id] = Math.round(i[id] * 40) / 40;
 if(i[id] > (opHeight-1))
 i[id] = opHeight;
 }else{
 i[id] = i[id] + speed
 }

 if(i[id] > opHeight)
 i[id] = opHeight;

 //document.getElementById('trace').innerHTML += i[id] + "<br>";

 document.getElementById(id).style.height = i[id]+'px';
 setTimeout("move('"+id+"',"+opHeight+","+speed+","+speedup+")",50);
 }else{

 condition[id] = condition[id]?0:1;
 blocked[id] = 0;
 }

 }else{
 if(i[id] > bHeight[id]){

 if(speedup > 0){
 i[id] -= speed * speedup * (i[id]/opHeight)
 i[id] = Math.round(i[id] * 40) / 40;
 if(i[id] < (bHeight[id]+1))
 i[id] = bHeight[id];
 }else{
 i[id] = i[id] - speed;
 }
 //document.getElementById('trace2').innerHTML += i[id] + "<br>";

 if(i[id] < bHeight[id])
 i[id] = bHeight[id];
 document.getElementById(id).style.height = i[id]+'px';
 setTimeout("move('"+id+"',"+opHeight+","+speed+","+speedup+")",50);
 }else{
 condition[id] = condition[id]?0:1;
 blocked[id] = 0;
 }
 }
}

function fullInfo(id,opHeight,speed,speedup){
if(condition[id] !=1){
 condition[id] = 0;
 i[id] = bHeight[id];
}

if(!blocked[id])
 move(id,opHeight,speed,speedup);
}
///----------------------------------------------------------------------
function display_div (index)
{
	if (eval (document.getElementById(index)).style.visibility=="visible")
	{
		eval (document.getElementById(index)).style.visibility="hidden";
		eval (document.getElementById(index)).style.display="none";	
	}
	else
	{
		eval (document.getElementById(index)).style.visibility="visible";
		eval (document.getElementById(index)).style.display="block";		
	}
}

///------------------------------------------------------------------------
function display_div1 (index,hght)
{
	if (eval (document.getElementById(index)).style.visibility=="visible")
	{
		eval (document.getElementById(index)).style.visibility="hidden";
		eval (document.getElementById(index)).style.display="none";	
		eval (document.getElementById(index)).style.height="1px";	
	}
	else
	{
		eval (document.getElementById(index)).style.visibility="visible";
		eval (document.getElementById(index)).style.display="block";
		eval (document.getElementById(index)).style.height=hght;
	}
}