// Copyright (c) 2004 bixel.ru

if (self.parent.frames.length != 0)
	self.parent.location.replace(document.location.href);

function add_bookmark()
{
	if (document.all)
		window.external.AddFavorite(location.href, document.title);
}

//____________________________________________
var last_over = null;
function over(id)
{
	last_over = id;
	id.bgColor = "#FFFEB3";
}
function out()
{
	if (last_over != null)
	{
		last_over.bgColor = "";
		last_over = null;
	}
}

//____________________________________________
// Flash detecting
var plugin = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
{
	if (navigator.plugins && navigator.plugins["Shockwave Flash"])
		plugin = 1;
}
else
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0))
{
	document.write('<script language=vbscript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	document.write('if (plugin <= 0) then plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	document.write('if (plugin <= 0) then plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('</script\> \n');
}

//____________________________________________
function write_flash(flashName, flashWidth, flashHeight, flashBG, imageName)
{
	if (plugin)
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" ');
		document.write(' width='+flashWidth+' height='+flashHeight+'>');
		document.write('<param name=movie value="'+flashName+'"><param name=quality value=high>');
		if (flashBG.length) document.write('<param name=bgcolor value='+flashBG+'>');
		document.write('<param name=wmode value=transparent><param name=menu value=false><param name=scale value=exactfit>');
		document.write('<embed src="'+flashName+'" menu=false quality=high scale=exactfit swLiveConnect=FALSE');
		if (flashBG.length) document.write(' bgcolor='+flashBG);
		document.write(' width='+flashWidth+' height='+flashHeight);
		document.write(' type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
		document.write('</embed>');
		document.write('<noembed><img src="'+imageName+'" width="'+flashWidth+'" height="'+flashHeight+'"></noembed>');
		document.write('</object>');
	}
	else
		document.write('<img src="'+imageName+'" width="'+flashWidth+'" height="'+flashHeight+'">');
}

//____________________________________________
function size(s)
{
	name = "fontpoint";
	value = s;

	var dateNow = new Date();
	var base = new Date(0);
	var skew = base.getTime();
	if (skew>0)
		dateNow.setTime(dateNow.getTime() - skew);
	dateNow.setTime(dateNow.getTime() + 31536000000);
	document.cookie = name+"="+value+ "; path=/; expires="+dateNow.toGMTString();
	return true;
}
