function gdGateway(){
}
gdGateway.prototype = {
	setSwf : function(swfFile,swfName,swfWidth,swfHeight,swfVersion,backGround){
		this.swfRequireVer = swfVersion;
		this.swfFile = swfFile;
		this.swfName = swfName;
		this.swfWidth = swfWidth;
		this.swfHeight = swfHeight;
		this.swfBackGround = backGround;
		so = new SWFObject(this.swfFile, this.swfName, this.swfWidth, this.swfHeight, this.swfRequireVer, this.swfBackGround);
		so.useExpressInstall('./top.swf');
	},
	setSWFObject : function(pelement){
		this.flashElement = pelement;
		
		so.write(this.flashElement);
		
		if(so.installedVer.major >= 7){//useExpressInstall [6,0,65 or later]
			document.getElementById('noflash').style.display = "none";
			document.getElementById('flash').className = "flash";
		}else{
			document.getElementById('noflash').style.display = "block";
			document.getElementById('noflash').className = "noflash";
			document.getElementById('flash').style.display = "none";
		}
		
	},
	addSWFObjectParam : function(param, value){
		so.addParam(param, value);
	},
	addSWFObjectVariable : function(param, value){
		so.addVariable(param, value);
	},
	setSWFfocus : function(){
		var lgd = this;
		window.onload = function(){
			document.getElementById(lgd.swfName).focus();
		};
	}
};

function createDelegate(pIns, phandler){
	var del = function(){ return phandler.apply(pIns, arguments); };
	del.phandler = phandler;
	del.pIns = pIns;
	return del; 

}



