
	var g_bNETS  = (document.layers) ? true:false;
	var g_bIE = (document.all) ? true:false;

function OnChangeLocation(sDate)
{
	if (g_bIE) comboFind=document.all.ComboFind.location;
	else
	if (g_bNETS) comboFind=document.ComboFind.location;

	location.href = 'Weather.asp?location='+comboFind.options[comboFind.selectedIndex].text+
			'&find=&date='+sDate;

	return false;

}

function OnShowChoices(sDate)
{
	if (g_bIE) comboFind=document.all.ComboFind.town;
	else
	if (g_bNETS) comboFind=document.ComboFind.town;

	var arTowns = new Array();
	var j = 0;
	for(i = 0; i < comboFind.options.length; i++)
		if(comboFind.options[i].selected) arTowns[j++]=comboFind.options[i].text;
	if(j>0) OpenTownWeather(arTowns[0], sDate);
	if(j>1) OpenTownsWeatherInWindows(arTowns, sDate);
	return false;
}

function OpenTownWeather(sTown, sDate)
{
	if (g_bIE) weatherFrame=document.all.WeatherFrame;
	else
	if (g_bNETS) weatherFrame=document.WeatherFrame;
	while((i = sTown.indexOf(" ")) != -1) sTown = sTown.substring(0,i)+"%20"+sTown.substring(i+1,sTown.length);
	weatherFrame.src="town.asp?town="+sTown+"&date="+sDate;
	return true;
}

function OpenTownsWeatherInWindows(arTowns, sDate)
{
	sWindowFeatures = "scrollbars=yes, resizable=yes, location=no, status=no, dependent=no, toolbar=";
	if(typeof(print) != 'undefined') sWindowFeatures += "no"; else sWindowFeatures += "yes";
	var sTowns = "";
	for(town in arTowns) 
	{
		var sTown = arTowns[town];
		while((i = sTown.indexOf(" ")) != -1) sTown = sTown.substring(0,i)+"%20"+sTown.substring(i+1,sTown.length);
		sTowns += "town="+sTown+"&";
	}
	window.open("town.asp?"+sTowns+"date="+sDate, "WeatherResults", sWindowFeatures);
	return false;
}

function SetDefault()
{
	location.href = "/news/weathertodefault.reg";
	return false;
}

function SetFavorite()
{
	if (g_bIE) window.external.AddFavorite('http://63.104.234.175/Weather/', 'Weather from the Russian Web portal, designed to help Russian emigrants and Russophiles communicate and do business across the globe.')
	return false;
}


function NETSDrawSearchForm(nTop, nLeft)
{
	document.write("<LAYER id='SearchForm' TOP="+nTop+" LEFT="+nLeft+" Z-INDEX=1>"+g_sForm+"</LAYER>");
}

function IEDrawSearchForm(nTop, nLeft)
{
	document.write("<DIV id='SearchForm' STYLE=\"POSITION: absolute; TOP: "+
			nTop+"px; LEFT: "+nLeft+"px; z-Index: 1\"></div>");
}
 
function ShowSearchForm()
{
	var evalText='document.all.SearchForm.innerHTML="'+g_sForm+'"';
	eval(evalText);
}        

function OnClock()
{
	newyorkInterOnLineClock.Redraw();
	moskowInterOnLineClock.Redraw();
	telavivInterOnLineClock.Redraw();
	setTimeout('OnClock()', 999);
	return;
}


