function go(o) {
     forma = document.getElementById('findform');
     forma.action = o;
}
function FindOnPage()
{
	if(document.getElementById('search').value.length < 4) alert('Минимальное количество вводимых символов в запросе – 4');
   else { 
	   forma = document.getElementById('findform');
	   forma.submit();	
   };
}

function testpole()
{
	name = document.getElementById('name');
	about = document.getElementById('about');
	url = document.getElementById('url');
	if(name.value=='') alert('Заполните название фирмы/сайта');
	else if(about.value=='') alert('Заполните описание');
	else if(about.value.length > 300 ) alert('Описание не должно превышать 300 символов');
	else if((url.value=='') || (url.value=='http://')) alert('Введите Url сайта');
	else {
	   forma = document.getElementById('AddNewRes');
	   forma.submit();	
	}
}

function testVIPpole()
{
	name = document.getElementById('vname');
	about = document.getElementById('vabout');
	url = document.getElementById('vurl');
	if(name.value=='') alert('Заполните название фирмы/сайта');
	else if(about.value=='') alert('Заполните описание');
	else if(about.value.length > 1000 ) alert('Описание не должно превышать 1000 символов');
	else if((url.value=='') || (url.value=='http://')) alert('Введите Url сайта');
	else {
	   forma = document.getElementById('VipForm');
	   forma.submit();	
	}
}

function chengesumma()
{
	chislo = document.getElementById('srok').value;
	var summa = 10;
	if(chislo==1) summa=10; 
	else if(chislo==3) summa=20; 
	else if(chislo==6) summa=30; 
	else if(chislo==12) summa=50; 
	document.getElementById('summa').innerHTML = summa;	
}

function badlink(l) {
	t=screen.height/2-50;
	w=screen.width/2-50;
	wnd=window.open("","badlink"+l,"width=200,height=100,top="+t+",left="+w);
	wnd.document.write("<HTML><BODY style='font-family:Arial;font-size:12px;color:red;'><center><B>Вы уверены, что это ссылка не работает ?</B><br><br>");
	wnd.document.write("<a href=bad.php?bad="+l+">да</a> &nbsp;|&nbsp; <a href='javascript:window.close();'>нет</a></center></BODY></HTML>");
}