// Cookies functions
function getCookieVal (offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) {endstr = document.cookie.length;}
	return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name)
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)
	{
	  var j = i + alen;
	  if (document.cookie.substring(i, j) == arg) return getCookieVal (j);
	  i = document.cookie.indexOf(" ", i) + 1;
	  if (i == 0) break;
	}
	return null;
}
function SetCookie (name, value, expires, path, domain, secure)
{
	document.cookie = name + "=" + escape(value) +
  ((expires) ? "; expires=" + expires : "") +
  ((path) ? "; path=" + path : "") +
  ((domain) ? "; domain=" + domain : "") +
  ((secure) ? "; secure" : "");
}

function wop(url,width,height)
{
	w = window.open(url,'','width='+width+',height='+height+',status=no,menubar=no,resizable=no,scrollbars=yes,left='+String((screen.width-width)/2)+',top='+String((screen.height-height)/2));
	w.focus();
	return w;
}

function PlaySWF()
{
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="190" height="143">')
  document.write('<param name="movie" value="/images/BA_IRC_RUSSIE.wmv">')
  document.write('<param name="quality" value="high">')
  document.write('<embed src="/images/BA_IRC_RUSSIE.wmv" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="190" height="143"></embed>')
  document.write('</object>')
}
          
