<!--
function view()
{
   document.getElementById('res').style.display = 'block';
   document.getElementById('res').style.left = (window.screen.availWidth / 2)-70;
   document.getElementById('res').style.top = (window.screen.availHeight / 2)-100;
   setTimeout("hide()",2000);
}
function hide()
{
   document.getElementById('res').style.display = 'none';
   clearTimeout("hide()",2000);
}

function escramble(){
 var a,b,c,d
 a='<a class=\"plainlink\" href=\"mai'
 b='admin'
 c='\">'
 a+='lto:'
 b+='@'
 d='</a>'
 b+='rohmc.ru'

 document.write(a+b+c+b+d)
}

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+''
	win = window.open(mypage,myname,settings)
	if(win.window.focus){win.window.focus();}
}


var ns6=document.getElementById&&!document.all?1:0

var head="display:''"
var folder=''

function expandit(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none")
folder.display=""
else
folder.display="none"
}


 function showerror() { 
 alert("Введён несуществующий e-mail адрес."); 
 } 
 
 function checkmail() 
 { 
 txt=document.sub.submail.value;
 
 if ((txt == "") || (txt == "Введите ваш e-mail...")) { 
 alert("Введите e-mail адрес!"); 
 return(false) 
 } 
 
 if (txt.indexOf(".") == -1) { 
 alert("Неверный формат e-mail адреса."); 
 return(false) 
 } 
 
 dog = txt.indexOf("@"); 
 if (dog == -1) { 
 alert("Неверный формат e-mail адреса."); 
 return(false) 
 } 
 
 if ((dog < 1) || (dog > txt.length - 5)) { 
 showerror(); 
 return(false) 
 } 
 
 if ((txt.charAt(dog - 1) == '.') || (txt.charAt(dog + 1) == '.')) { 
 showerror(); 
 return(false) 
 } 
 }

 function checkq() 
 { 
 search=document.search.q.value;
 if ((search == "") || (search == " ")) { 
 alert("Введите слово или фразу для поиска!"); 
 return(false) 
 } 
}






function valprayform()
{
   if(document.getElementById('prayname').value.length >= 2 && document.getElementById('praycity').value.length >= 2 && document.getElementById('praytext').value.length >= 10)
   {
	document.getElementById('subm').innerHTML = '<a onfocus="this.blur();" class="plainLink" onclick="document.getElementById(\'formap\').submit();">добавить</a>';
   }
   else if(document.getElementById('prayname').value.length < 2 || document.getElementById('praycity').value.length < 2 || document.getElementById('praytext').value.length < 10)
   {
	document.getElementById('subm').innerHTML = 'добавить';document.getElementById('subm').style.color = 'silver';
   }
}
function praytextcnt()
{
var pname = 40;
var pcity = 30;
var ptext = 2000;
document.getElementById('pncnt').innerHTML = (pname - document.getElementById('prayname').value.length);
document.getElementById('pccnt').innerHTML = (pcity - document.getElementById('praycity').value.length);
document.getElementById('ptcnt').innerHTML = (ptext - document.getElementById('praytext').value.length);

	if(document.getElementById('prayname').value.length > pname)
	{
		document.getElementById('prayname').value = document.getElementById('prayname').value.substring(0, pname);
		document.getElementById('pncnt').innerHTML = '0';
	}
	if(document.getElementById('praycity').value.length > ptext)
	{
		document.getElementById('praycity').value = document.getElementById('praycity').value.substring(0, pcity);
		document.getElementById('pccnt').innerHTML = '0';
	}
	if(document.getElementById('praytext').value.length > ptext)
	{
		document.getElementById('praytext').value = document.getElementById('praytext').value.substring(0, ptext);
		document.getElementById('ptcnt').innerHTML = '0';
	}
}






function valartform()
{
   if(document.getElementById('artcomname').value.length >= 2 && document.getElementById('artcomtext').value.length >= 10 && document.getElementById('artcomcode').value.length >= 6)
   {
	document.getElementById('subart').innerHTML = '<a onfocus="this.blur();" class="plainLink" onclick="document.getElementById(\'formaart\').submit();">добавить</a>';
   }
   else if(document.getElementById('artcomname').value.length < 2 || document.getElementById('artcomtext').value.length < 10 || document.getElementById('artcomcode').value.length < 6)
   {
	document.getElementById('subart').innerHTML = 'добавить';document.getElementById('subart').style.color = 'silver';
   }
}
function arttextcnt()
{
var aname = 40;
var atext = 2000;
document.getElementById('ancnt').innerHTML = (aname - document.getElementById('artcomname').value.length);
document.getElementById('atcnt').innerHTML = (atext - document.getElementById('artcomtext').value.length);

	if(document.getElementById('artcomname').value.length > aname)
	{
		document.getElementById('artcomname').value = document.getElementById('artcomname').value.substring(0, aname);
		document.getElementById('ancnt').innerHTML = '0';
	}
	if(document.getElementById('artcomtext').value.length > atext)
	{
		document.getElementById('artcomtext').value = document.getElementById('artcomtext').value.substring(0, atext);
		document.getElementById('atcnt').innerHTML = '0';
	}
}
 //--> 