/**
 * @author: Erkan GUNES
 * @copyright: 2007 January
 *
 * @description: SWF Object Control Copyright
 *
 */


function SwfObject() {
	this.param = new Array();
	this.attribute = new Array();
	
		
	this.SwfObject = function(strName, strId, strWidth, strHeight, strVersion, strColor, strQuality) {
		this.attribute = new Array("demo.swf","myid","200","200","9","#FFFFFF","high");
		if(strName) { 
			this.attribute[0] = this.isControl(strName);
		}
		if(strId) {
			this.attribute[1] = strId;
		}
		if(strWidth) {
			this.attribute[2] = strWidth;
		}
		if(strHeight) { 
			this.attribute[3] = strHeight;
		}
		if(strVersion) { 
			this.attribute[4] = strVersion;
		} 
		if(strColor) { 
			this.attribute[5] = strColor;
		}
		if(strQuality) { 
			this.attribute[6] = strQuality;
		}
		
		this.setParam("movie", this.attribute[0]);
		this.setParam("bgcolor", this.attribute[5]);
		this.setParam("quality", this.attribute[6]);
	}
	
	
	this.destroy = function() {
		this.SWFObject = new Object();
		this.param = new Array();
		this.attribute = new Array();
	}
	
	
	this.setParam = function(strName, strValue) {
		this.param += '<param name="' + strName + '" value="' + strValue +'">';
	}
	
	
	this.isControl = function(strVar) {	
		if (strVar.search(/(swf)/) != 0) /* if (erkVar[strNo].search(/^(swf)$/) != 0) */
		{
			return strVar;
		} 
		else 
		{
			alert("hata swf isim hatasi...");
			return 'demo.swf';
		}
	}
	
	
	this.isFlash = function() { 
		var erkFlash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + this.attribute[4] + ',0,0,0" width="' + this.attribute[2] + '" height="' + this.attribute[3] + '" id="' + this.attribute[1] + '">' +
		'<param name="allowScriptAccess" value="sameDomain" />' + this.param +
		'<embed src="' + this.attribute[0] + '" quality="' + this.attribute[6] + '" ' + this.isWmodeParam(this.param) + this.isMenuParam(this.param) + '  width="' + this.attribute[2] + '" height="' + this.attribute[3] + '" name="start" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
		'</object>';
		
		document.write(erkFlash);
		
		this.destroy(); 
		
		return false;
	} 
	
	
	this.isWmodeParam = function(strArr) {
		if(strArr.toString().indexOf('wmode') == -1) {
			return 'bgcolor="' + this.attribute[5] + '" ';
		} else if (strArr.toString().indexOf('opaque') == -1) {
			return 'wmode="transparent"';
		} else {
			return 'bgcolor="' + this.attribute[5] + '" ' + 'wmode="opaque" ';
		}
		return 'wmode="transparent"';
	}
	
	
	this.isMenuParam = function(strArr) {
		if(strArr.toString().indexOf('menu') == -1) {
			return false;
		} 
		return 'menu="false" ';
	}
	
}









































































































































































































































































































































































function aniFunc() { 
	this.swt;
	
	this.init = function(swith) 
	{
		if(!swith) 
		{
			return false;
		} 
		this.swt = swith;
	}
	
	this.adLogoStart = function() {
		this.swt.SwfObject("ojivlenie/kardelen.swf", "logo", "840", "195", "9", "#FFFFFF", "high");
		this.swt.setParam('wmode','transparent');
		this.swt.isFlash();
		return false;
	}

	this.adButonTR = function() {
		this.swt.SwfObject("ojivlenie/butonmenu.swf", "btntr", "800", "245", "9", "#FFFFFF", "high");
		this.swt.setParam('wmode','transparent');
		this.swt.isFlash();
		return false;
	}

}

var ska = new aniFunc();
ska.init(new SwfObject());


function show_live(strID, strBool) 
 { 
 <!--
	var idnode = document.getElementById("popUp");
	
	if(idnode.style.visibility == 'visible') strBool = true;
	
	if (strBool) 
	{
 		idnode.style.left = '-9999px';
		idnode.style.visibility = 'hidden';
	}
	else
	{ 
		idnode.style.left = 'auto';
		idnode.style.visibility = 'visible';
		idnode.style.marginTop = '-120px';
		idnode.style.marginLeft = '450px';
	}
//-->
}




