_ZINDEX = 2000;

function floatingBanner()
{
	// writed by CM Bilisim
	this.x_index = 820;
	this.min_client_width = 900;
	this.top_margin = 2;
	
	this.banner_CSS = "display: none; visibility: visible; width: 156px; position: absolute; top: 2px; z-index: " + _ZINDEX + ";";
	
	this.banner_Code = '';
	
	this._show = _show;
	this._hidden = _hidden;
	this._paint = _paint;
	this._draw = _draw;
	this.swapStatus = swapStatus;
	
	this.show_status = false;
	
	_ZINDEX += 1;
	
	function _show()
	{
		CM_Float_banner_div.style.visibility = 'visible';
		CM_Float_banner_div.style.display = 'block';
		this.show_status = true;
		this._paint();
	}

	function _hidden()
	{
		CM_Float_banner_div.style.visibility = 'hidden';
		this.show_status = false;
	}
	
	function swapStatus()
	{
		if(this.show_status)
			this._hidden()
		else
			this._show();
	}
	function _paint()
	{
		with(document.body)
		{
			if(clientWidth > this.min_client_width)
			{
				if (this.show_status)
				{
					CM_Float_banner_div.style.left = this.x_index;
					
					CM_Float_banner_div.style.top = scrollTop + this.top_margin;
					
					CM_Float_banner_div.style.display = "block";
				}
			}
			else
			{
				CM_Float_banner_div.style.display = "none";
			}
		}
	}
	function _draw()
	{
		document.write ('<div id="CM_Float_banner_div" style="' + this.banner_CSS + '">' + this.banner_Code + '</div>');
	}
	
}
function CM_Floating_changeStatus()
{
	elm.swapStatus()
}
function CM_Floating_Event()
{
	elm._paint();
}

function getNormalSWF(_WIDTH, _HEIGHT, _SRC)
{
	document.write('<div style="width: ' + _WIDTH + 'px; height: ' + _HEIGHT + 'px; z-index: ' + _ZINDEX + ';">');
	document.write('<object width="' + _WIDTH + '" height="' + _HEIGHT + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">');
	document.write('<param name="movie" value="' + _SRC + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<param name="scale" value="1">');
	document.write('<embed style="z-index: ' + _ZINDEX + ';" src="' + _SRC + '" width="' + _WIDTH + '" height="' + _HEIGHT + '" scale="exactfit" quality="high" wmode="transparent" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
	document.write('</object>');
	document.write('</div>');
	_ZINDEX += 1;
}

function getRolloverSWF(_WIDTH, _HEIGHT, _ROLL_WIDTH, _ROLL_HEIGHT, _SRC, _ROLL_DIR)
{
	_LEFT = '0px';
	_TOP = '0px';
	switch(_ROLL_DIR)
	{
		case '1':
			_TOP = '-' + (_ROLL_HEIGHT - _HEIGHT) + 'px';
			_LEFT = '0px';
			break;
		case '4':
			_TOP = '0px';
			_LEFT = '-' + (_ROLL_WIDTH - _WIDTH) + 'px';
			break;
	}
	
	document.write('<div style="width: ' + _WIDTH + 'px; height: ' + _HEIGHT + 'px; position: relative; z-index: ' + _ZINDEX + '; top: ' + _TOP + '; left: ' + _LEFT + '">');
	document.write('<object width="' + _ROLL_WIDTH + 'px" height="' + _ROLL_HEIGHT + 'px" style="position: absolute; left: 0px; top: 0px;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">');
	document.write('<param name="movie" value="' + _SRC + '">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="scale" value="1">');
	document.write('<embed style="z-index: ' + _ZINDEX + ';" src="' + _SRC + '" width="' + _ROLL_WIDTH + '" height="' + _ROLL_HEIGHT + '" scale="exactfit" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
	document.write('</object>');
	document.write('</div>');
	
	_ZINDEX += 1;
}