var ie = 0;
var ytm = false;
var ldt=false;
var act=0;
var stop=0;

function popupWindow(goLocation,wname,wdth,hght)
{
 var v=parseInt(navigator.appVersion);
 isNetscape=navigator.appName.indexOf('Netscape')>=0;
 isExplorer=navigator.appName.indexOf('Explorer')>=0;

 var ww = wdth;
 var wh = hght;

 positionCode='';
 if(v>=4)
 {
  if(isExplorer) positionCode='left='+(screen.width/2-ww/2)+',top='+(screen.height/2-wh/2)+',';
  if(isNetscape) positionCode='screenX='+(screen.width/2-ww/2)+',screenY='+(screen.height/2-wh/2)+',';
 }

 newWindow=window.open(goLocation,wname,
 'width='+ww+',height='+wh+','+
 positionCode+
 'location=0'+
 'toolbar=0,'+
 'scrollbars=1,'+
 'status=0,'+
 'resizable=1');
  if(v>=3) newWindow.focus();
  return newWindow;
}

function goTo(where) {
	 document.location.reload(where);
	 return false;
}

function gotow(purl,w,h)
{
	popupWindow(purl,'pwnd',w,h);
	return false;
}

function gotoc(frm,amount)
{
	frm.elements['amount'].value=frm.elements['mcount'].options[frm.elements['mcount'].selectedIndex].value*amount;
	frm.submit();
}

function gotoe(purl,w,h)
{
	popupWindow(purl,'pwnd',w,h);
	return false;
}

function iniDoc()
{
	this.ver=navigator.appVersion;
	ie = (document.all && document.getElementById)? true : false; // ver 5
	ldt=true;
}

function mnu(n)
{
if (document.getElementsByTagName)
{
	var allCells = document.getElementsByTagName('td');
	for (var i = 0; i < allCells.length; i++)
	{
		var currClass = allCells.item(i).className;
		if (allCells.item(i).className == 'mnu'+n)
		{
			eval('allCells.item(i).onmouseover = function() { this.className = \'' + currClass + '_on\'; }');
			eval('allCells.item(i).onmouseout = function() { this.className = \'' + currClass + '\';  }');
		}
	}
}
writeTime();
}

function getTime()
{
 var now = new Date()
 var nowHours = now.getHours()
 var nowMinutes = now.getMinutes()
 var nowSeconds = now.getSeconds()
 var runClock = setTimeout("getTime()", 100);
 return nowHours+':'+nowMinutes+':'+nowSeconds;
}

function popupWindow2(goLocation,wname,wdth,hght)
{
 var v=parseInt(navigator.appVersion);
 isNetscape=navigator.appName.indexOf('Netscape')>=0;
 isExplorer=navigator.appName.indexOf('Explorer')>=0;

 var ww = wdth;
 var wh = hght;

 positionCode='';
 if(v>=4)
 {
  if(isExplorer) positionCode='left='+(screen.width+10)+',top='+(screen.height+10)+',';
  if(isNetscape) positionCode='screenX='+(screen.width+10)+',screenY='+(screen.height+10)+',';
 }
 newWindow=window.open(goLocation,wname,
 'width='+ww+',height='+wh+','+
 positionCode+
 'location=0'+
 'toolbar=0,'+
 'scrollbars=0,'+
 'status=0,'+
 'resizable=0');
  if(v>=3) newWindow.focus();
  return newWindow;
}

function strt(lang)
{
iniDoc();
}

function writeTime()
{
	var now = new Date();

	h1=''; s1=''; m1='';

	if(now.getUTCHours()<10) h1='0';
	if(now.getUTCSeconds()<10) s1='0'; if(now.getUTCMinutes()<10) m1='0';
	s=now.getUTCSeconds();
	m=now.getUTCMinutes();

	document.all['gmt'].innerHTML=h1+(now.getUTCHours())+':'+now.getUTCMinutes()+':'+now.getUTCSeconds();

	// Moscow
	now = new Date();
	t=Date.UTC(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate(),now.getUTCHours()+3,now.getUTCMinutes(),now.getUTCSeconds());
	now.setTime(t);
	h1=''; if(now.getUTCHours()<10) h1='0';
	document.all['moscow'].innerHTML=h1+now.getUTCHours()+':'+m1+m+':'+s1+s;

	// New Yourk
	now = new Date();
	t=Date.UTC(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate(),now.getUTCHours()-5,m,s);
	now.setTime(t);
	h1=''; if(now.getUTCHours()<10) h1='0';
	document.all['newyourk'].innerHTML=h1+now.getUTCHours()+':'+m1+m+':'+s1+s;

	// Tokyo
	now = new Date();
	t=Date.UTC(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate(),now.getUTCHours()+9,m,s);
	now.setTime(t);
	h1=''; if(now.getUTCHours()<10) h1='0';
	document.all['tokyo'].innerHTML=h1+now.getUTCHours()+':'+m1+m+':'+s1+s;

	// Riga
	now = new Date();
	t=Date.UTC(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate(),now.getUTCHours()+2,m,s);
	now.setTime(t);
	h1=''; if(now.getUTCHours()<10) h1='0';
	document.all['riga'].innerHTML=h1+now.getUTCHours()+':'+m1+m+':'+s1+s;

	var runClock = setTimeout("writeTime()", 100);
}
