function color_menu()
{
var dl=document.location.href;
var r1=/http:\/\/pushel/;
dl=dl.replace(r1,"http://www.pushel");
var r2=/pushel.ru\/$/;
dl=dl.replace(r2,"pushel.ru/index.php");
var attrib=0;

if(dl.search("polyslovar")!=-1)
	{
	a_36.className="act";
	}
else for(i=0;i<document.links.length;i++)
{
if(dl==document.links[i])
	{
	var a=document.links[i].name;
	activ=a.replace("li_","");
    eval('a_'+activ+'.className="act"');
    attrib=1;
    break;
	}
// а если attrib все еще 0 надо удалить имя файла и сравнивать заново
}
}

function cell_over(cel,title)
{
myColor=cel.style.backgroundColor;
cel.style.backgroundColor='#eeeeee';
window.status=title;
}

function cell_out(cel)
{
cel.style.backgroundColor=myColor;
window.status="";
}

function check_gb(theForm)
{
if (theForm.text_gb.value=="")
	{
	alert ('Необходимо заполнить поле "Текст"');
	document.theForm.text_gb.focus();
	return(false);
	}
if (theForm.name_gb.value=="")
	{
	alert ('Необходимо указать имя');
	document.theForm.name_gb.focus();
	return(false);
	}
if (theForm.email_gb.value!="")
	{
	if (isEmail(theForm.email_gb.value) == false)
		{ 
	 	alert ('Вы ввели неправильный e-mail.\n Если вы не хотите вводить реальный e-mail - оставьте поле пустым');
	  	document.theForm.email_gb.focus();
	  	return(false);
	  	}
	}
else
	{
	return (true);
	}
}

function isEmail(string)
{
if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
    return true;
else
    return false;
}

function mywinshow(myfile,mywidth,myheight)
{
mywidth=mywidth+12;
myheight=myheight+31;

mystr='left=30,top=30,menubar=no,scrollbars=no,status=no,resizable=yes,width='+mywidth+', height='+myheight;
msgWindow1=window.open(myfile,'displayWindow',mystr);
msgWindow1.resizeTo(mywidth,myheight);

msgWindow1.focus();
msgWindow1.document.body.style.margin="0 0 0 0";
msgWindow1.document.body.style.padding="0 0 0 0";

msgWindow1.document.title="Просмотр изображения";
}
