function ValidateForm(theForm){
	if(theForm.nickname.value=="")	{		alert("Заполните Ваше имя");		theForm.nickname.focus();		return (false);	}

	if(theForm.email.value=="")	{		alert("Укажите E-mail адрес");		theForm.email.focus();		return (false);	}        else        {                var invalid = true;                var Str = theForm.email.value;                for (i = 0;  i < Str.length;  i++)                {                                   ch = Str.charAt(i);                   if(ch == '@')                   {                       invalid = false;                       break;                    }                }                if(invalid)                {                    alert("Неверно указан E-Mail адрес");                   theForm.email.focus();                   return (false);                }        }
	if(theForm.tema.value=="")	{		alert("Заполните Тему работы");		theForm.tema.focus();		return (false);	}


	if(theForm.obem.value=="")	{		alert("Заполните требуемый объем работы");		theForm.obem.focus();		return (false);	}

	if (theForm.secCode.value=="")
	{
		alert("Заполните символы на картинке");
		theForm.secCode.focus();
		return (false);	
	}


	return true;}


function TopLine (strPage)
{
document.writeln('  <tr>');

if (strPage == 'main')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'about')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'price')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'guarantees')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'order')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'contacts')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'faq')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'resources')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'forum')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');

if (strPage == 'article')
	document.writeln('<td class="menuts"></td>');
else
	document.writeln('<td class="menutl"></td>');


document.writeln('<td class="menutl2"></td>');

document.writeln('  </tr>');

}


function Footer (strPage)
{
document.writeln('<table align="center" cellpadding="0" cellspacing="0" class="niz">');
document.writeln('  <tr>');
document.writeln('    <td class="nizleft">');
document.writeln('<div class="copyright">');
if (strPage == 'main')
	document.writeln('Главная');
else 
	document.writeln('<a href="http://www.pishemdiplom.ru" class="nizco" Title = "Заказать диплом, курсовую">Главная</a>');

document.writeln(' | ');

if (strPage == 'about')
	document.writeln('О компании');
else 
	document.writeln('<a href="about.php" class="nizco" Title = "О компании">О компании</a>');

document.writeln(' | ');

if (strPage == 'price')
	document.writeln('Наши цены');
else 
	document.writeln('<a href="price.php" class="nizco" Title = "Наши цены">Наши цены</a>');


document.writeln(' | ');

if (strPage == 'guarantees')
	document.writeln('Наши гарантии');
else 
	document.writeln('<a href="guarantees.php" class="nizco" Title = "Наши гарантии">Наши гарантии</a>');


document.writeln(' | ');

if (strPage == 'order')
	document.writeln('Заказать работу');
else 
	document.writeln('<a href="order.php" class="nizco" Title = "Заказать диплом, курсовую, реферат">Заказать работу</a>');


document.writeln(' | ');


if (strPage == 'contacts')
	document.writeln('Контакты');
else 
	document.writeln('<a href="contacts.php" class="nizco" Title = "Контакты">Контакты</a>');


document.writeln(' | ');

if (strPage == 'faq')
	document.writeln('FAQ');
else 
	document.writeln('<a href="faq.php" class="nizco" Title = "Вопросы и ответы">FAQ</a>');

document.writeln(' | ');

if (strPage == 'article')
	document.writeln('Статьи');
else 
	document.writeln('<a href="articles.php" class="nizco" Title = "Наши статьи">Наши статьи</a>');



/*
document.writeln(' | ');

if (strPage == 'resources')
	document.writeln('Ресурсы сети');
else 
	document.writeln('<a href="resources.php" class="nizco" Title = "Ресурсы сети">Ресурсы сети</a>');


document.writeln(' | ');

if (strPage == 'forum')
	document.writeln('Форум');
else 
	document.writeln('<a href="forum.php" class="nizco" Title = "Форум">Форум</a>');
*/


document.writeln('<br>');

document.writeln('<a href = "http://www.pishemdiplom.ru" class="theme" Title = "дипломные работы на заказ ">Магистр - пишем диплом</a> &copy; 2006-2012 &nbsp;&nbsp;&nbsp;&nbsp;<b>Заказать диплом, дипломы на заказ</b> <br> ');


document.writeln('</div></td>');
document.writeln('    <td class="nizright">&nbsp;</td>');
document.writeln('  </tr>');

document.writeln('</table>');
}


