function showgood(id)
{
	var path='/showgood/'+id+'/';
	descWin=open(path,"","height=500px,width=550px,top=20,left=10,resizable=1,scrollbars=1,menubar=0,status=0");
}

function showaddgood(id)
{
	var path='/showaddgood/'+id+'/';
	descWin=open(path,"","height=500px,width=550px,top=20,left=10,resizable=1,scrollbars=1,menubar=0,status=0");
}

function search_focus()
{
	if (document.searchform.search.value == "Поиск")
	{
		document.searchform.search.value = "";
		document.searchform.search.style.color = "#000000";
	}
}

function search_blur()
{
	if (document.searchform.search.value == "" || document.searchform.search.value == "Поиск")
	{
		document.searchform.search.value = "Поиск";
		document.searchform.search.style.color = "#CCCCCC";
	}
}

function showkonkurs(id)
{ 
	var path='/portal/ya_budu_mamoy/'+id+'/';
	open(path,"","height=740px,width=870px,top=10px,left=10px,resizable=1,scrollbars=1,menubar=0,status=0,toolbar=0");
}

function showkonkurs_new(id)
{ 
	var path='/portal/konkurs_new/'+id+'/';
	open(path,"","height=740px,width=870px,top=10px,left=10px,resizable=1,scrollbars=1,menubar=0,status=0,toolbar=0");
}

function displaydiv(id, img)
{
	var display = document.getElementById(id).style.display;
	
	if (display == "none")
	{
		document.getElementById(id).style.display = "";
		img.src = minus.src;
	}
	else
	{
		document.getElementById(id).style.display = "none";
		img.src = plus.src;
	}
		
	return false;
}

function PreLoad(imgName, imgObjName)
{
	if (document.images)
		document.images[imgName].src = eval(imgObjName + ".src");
}

function GetDay(intDay)
{
	var DayArray = new Array("воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота");
	return DayArray[intDay];
}

function GetMonth(intMonth)
{
	var MonthArray = new Array("января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря");
	return MonthArray[intMonth];
}

function GetSubDay(intSubDay)
{
	if (intSubDay >= 0 && intSubDay < 6)
		return "Доброй ночи";
	else if (intSubDay >= 6 && intSubDay < 11)
		return "Доброе утро";
	else if (intSubDay >= 11 && intSubDay < 19)
		return "Добрый день";
	else if (intSubDay >= 19)
		return "Добрый вечер";
}

function getDateStr()
{
	var today = new Date();
	var todayStr = GetDay(today.getDay()) + ", ";
	todayStr += today.getDate() + " " + GetMonth(today.getMonth());
	return todayStr;
}

function getDayStr()
{
	var today = new Date();
	return GetSubDay(today.getHours());
}

