﻿//
//  Flash displayer...
//
//	Author 	: Bir Yonca (bY) 	
//	Website : http://www.biryonca.com	
//	Date 	: 2008-09-17 09:23 		

document.writeln('<script language="javascript">AC_FL_RunContent = 0;</script>');
document.writeln('<script src="scripts/AC_RunActiveContent.js" language="javascript"></script>');


function show_flash(swf, w, h, tr)
{
	if (AC_FL_RunContent == 0) 
	{
		alert("AC_RunActiveContent.js dosyası gerekli.");
	} else 
	{
        var fls = "<script type=\"text/javascript\">";
        fls = fls + "AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0',";
        fls = fls + "'width','"+w+"','height','"+h+"','src','"+swf+"','quality','high',";
        if (tr) fls = fls + "'wmode', 'transparent',"; else fls = fls + "'wmode', 'window',";
        fls = fls + "'pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash',";
        fls = fls + "'movie','"+swf+"');</script>";
        document.write(fls);
    }
}

function show_flash_1(swf, w, h, tr)
{
	if (AC_FL_RunContent == 0) 
	{
		alert("AC_RunActiveContent.js dosyası gerekli.");
	} else 
	{
        var fls = "<script type=\"text/javascript\">";
        fls = fls + "AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0',";
        fls = fls + "'width','"+w+"','height','"+h+"','src','"+swf+"','quality','high', 'loop', 'false',";
        if (tr) fls = fls + "'wmode', 'transparent',"; else fls = fls + "'wmode', 'window',";
        fls = fls + "'pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash',";
        fls = fls + "'movie','"+swf+"');</script>";
        document.write(fls);
    }
}

function flash () 
{
	
	this._swf = '';
	
	this._width = 0;
	
	this._height = 0;
	
	this._params = new Array();

}


flash.prototype.setSWF = function (_swf, _width, _height, _message) 
{
	
	this._swf = _swf;
	
	this._width = _width;
		
	this._height 	= _height;
	
	this._message 	= _message;

}


flash.prototype.setParam = function (paramName, paramValue) 
{
	
	this._params[this._params.length] = paramName+'|||'+paramValue;

}


flash.prototype.display = function () 
{
	
	var _txt = '';
	
	var params = '';
	
	_txt += '<object>\n';
	
	_txt += '<param width="'+this._width+'" height="'+this._height+'" name="movie" value="'+this._swf+'" />';
	
	_txt += '<param name="quality" value="high" />';
	
	for ( i=0;i<this._params.length;i++ ) 
	{

		_param = this._params[i].split ('|||');

		_txt += '\t<param name="'+_param[0]+'" value="'+_param[1]+'" />';

		params += _param[0]+'="'+_param[1]+'"';
	
	}

	
	_txt += '<embed width="'+this._width+'" height="'+this._height+'" src="'+this._swf+'" '+params+' quality="high" type="application/x-shockwave-flash"></embed>';
	
	_txt += '</object>';
	
	document.write (_txt);

}

