function toggle(_s,_h)
	{
		if (document.all)
			{
				eval("document.all."+_s+".style.visibility='visible';");
				eval("document.all."+_h+".style.visibility='hidden';");
			}
		else
			{
				if(navigator.userAgent.indexOf("Gecko")!=-1)
					{// is NS6 ?
						document.getElementById(_s).style.visibility='visible';
						document.getElementById(_h).style.visibility='hidden';
					}
				else
					{
						eval("document.layers['"+_s+"'].visibility='show';");
						eval("document.layers['"+_h+"'].visibility='hide';");
					}
			}
}

var EmptySearchField = 0;
function fnEmptySearchField (elm){
	if (EmptySearchField == 0) {elm.value = ""};
	EmptySearchField = 1;
}

	function myopen(url)
		{
			var w = 800, h = 600;

			if (document.all) {
			   /* the following is only available after onLoad */
			   w = document.body.clientWidth;
			   h = document.body.clientHeight;
			}
			else if (document.layers) {
			   w = window.innerWidth;
			   h = window.innerHeight;
			}

			var popW = 500, popH = 250;

			var leftPos = (w-popW)/2, topPos = (h-popH)/2;
			window.open(url, 'windowName', 'width=' + popW + ', height='+popH+', top='+topPos+', left='+leftPos +', status=1');
		}

function popitup(url)
{
	if (!newwindow.closed && newwindow.location)
	{
		newwindow.location.href = url;
	}
	else
	{
		newwindow=window.open(url,'name', 'height=400, width=350');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

	var win=null;
	function NewWindow(mypage,myname,w,h,scroll,pos)
		{
			if(pos=="random")
				{
					LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
					TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
				}
			if(pos=="center")
				{
					LeftPosition=(screen.width)?(screen.width-w)/2:100;
					TopPosition=(screen.height)?(screen.height-h)/2:100;
				}
			else if((pos!="center" && pos!="random") || pos==null)
				{
					LeftPosition=100;
					TopPosition=50;
				}
			settings='width='+w+', height='+h+', top='+TopPosition+', left='+LeftPosition+', scrollbars='+scroll+', location=0, directories=0, status=0, menubar=0, toolbar=0, resizable=0';
			win=window.open(mypage,myname,settings);
		}

//Переключатнель режимов - поиск навигашка
//---------------------------Image Replacement Code Begins---------------------------------

//Fix Netscape resize bug for mouseDown and mouseUp events.
function forceReload() {
      location.reload()
}
function fixNetscape4(){
   NS4 = document.layers
   NSVer = parseFloat(navigator.appVersion)
   if (NSVer >= 5.0 || NSVer < 4.1) NS4 = false

   if (NS4) onresize = forceReload
}
function flip(imgName, imgSrc)
	{
		if (document.images)
			{
				document[imgName].src = imgSrc
			}
	}
//---------------------------Image Replacement Code Ends-----------------------------------

fixNetscape4()
toggleState = 'On'   //a required global variable to keep track of if the lights are On or Off.

function toggle(imgName, state)
	{ 
		flip(imgName, '/img/' + toggleState + state + '.gif')
	}

function switchLights()
	{
		if (toggleState == 'On')
			{
			      toggleState = 'Off'
			     // flip('studio', 'images/basic1Aover.jpg')      
			}   
		else
			{
				toggleState = 'On'
				//flip('studio', 'images/basic1Bover.jpg')
			}
	}
function Display(which)
	{
		//ma=document.getElementById("mail");
		em = document.getElementById("makepage");
		ph = document.getElementById("updatedata");
			if (em.style.display == "none" && ph.style.display == "block")
				{
					em.style.display = "block";
					ph.style.display = "none";
				}
			else
				{
					em.style.display = "none";
					ph.style.display = "block";
				}
	}

var EmptySearchField = 0;
function fnEmptySearchField (elm){if (EmptySearchField == 0) {elm.value = ""};EmptySearchField = 1;}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
<!--
function obj_find(what, where)
{var x,p;
if(!where) where=document;
if(!(x=where[what]) && where.all) x=where.all[what];
for (i=0;!x&&i<where.forms.length;i++) x=where.forms[i][what];
for(i=0;!x&&where.layers&&i<where.layers.length;i++) x=obj_find(what, where.layers[i].document);
return x;}

function sub_over(num)
	{
		var x,i;
			for (i=0; i<5; i++) if (num != i) sub_out(i);
				if ((x=obj_find("sub"+num)) != null)
					{
						v = 'show';
							if (x.style)
								{
									x = x.style; v='visible';
								}
						x.visibility=v;
					}
	}

function sub_out(num)
{if ((x=obj_find("sub"+num)) != null) {
  v = 'hide';
  if (x.style) {x = x.style; v='hidden';}
  x.visibility=v;}
}
//-->
