if (typeof(BASE_JS) == 'undefined')
{
	var BASE_JS = true;
	var is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
	var is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
	if(is_gecko){(function(){var events=["mousedown","mouseover","mouseout","mousemove","mousedrag","click","dblclick"];for(var i=0;i<events.length;i++){window.addEventListener(events[i],function(e){window.event=e;},true);}}());};

	function showFlashObject(id, width, height, movie, flashvars, style)
	{
		var obj = '<object id="'+id+'" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" width="'+width+'" height="'+height+'" style="'+style+'"><param name="movie" value="'+movie+'"/><param name="menu" value="false"/><param name="quality" value="high"/><param name="allowScriptAccess" value="sameDomain"/><param name="play" value="true"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+flashvars+'"/><embed swLiveConnect="true" flashvars="'+flashvars+'" src="'+movie+'" quality="high" bgcolor="" wmode="transparent" width="'+width+'" height="'+height+'" name="'+id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>';
		document.write(obj);
	}

	function getCookie( name ) {
		var nameOfCookie = name + '=';
		var x = 0;
		while ( x <= document.cookie.length )
		{
			var y = (x+nameOfCookie.length);
			if ( document.cookie.substring( x, y ) == nameOfCookie )
			{
				if ( (endOfCookie=document.cookie.indexOf( ';', y )) == -1 )
				endOfCookie = document.cookie.length;
				return unescape( document.cookie.substring( y, endOfCookie ) );
			}
			x = document.cookie.indexOf( ' ', x ) + 1;
			if ( x == 0 )
			break;
		}
		return "";
	}
	function setCookie( name, value, expiredays )
	{
		var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'
	}

	function toClip(s)
	{
		if(s.createTextRange)
		{
			var r = s.createTextRange();
			if(r)
				r.execCommand('Copy');
		}
		else
		{
			var swf = 'toClipswf';
			if(!document.getElementById(swf))
			{
				var div = document.createElement('div');
				div.id = swf;
				document.body.appendChild(div);
			}
			document.getElementById(swf).innerHTML = '';
			var inner = '<embed src="/js/toclip.swf" FlashVars="clipboard='+encodeURIComponent(s.innerHTML)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
			document.getElementById(swf).innerHTML = inner;
		}
	}

}