function swf(src, w, h)
{
	document.writeln("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + w + "\" height=\"" + h + "\">");
	document.writeln("<param name=\"movie\" value=\"" + src + "\">");
	document.writeln("<param name=\"quality\" value=\"high\" />");
	document.writeln("<param name=\"wmode\" value=\"transparent\">");
	document.writeln("<embed src=\"" + src + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\"  height=\"" + h + "\">");
	document.writeln("</object>");
}

yahoojpmatch = /^http:\/\/((page\d*\.auctions\.yahoo\.co\.jp)|(list\d*\.auctions\.yahoo\.co\.jp)|(search\d*\.auctions\.yahoo\.co\.jp))\//;

dt = new function() {
	this.obj = false;
	this.url = false;
	this.DownShow = function(url, flag) {
		if(url) {
			this.url = url;
		}
		if (this.url.indexOf("auction/yahoojp/category")>0){
			document.location.href = this.url;
		}
		if(!flag && yahoojpmatch.test(this.url)) {
		
			if(RegExp.$2 != '') {
				document.location.href = '/auction/yahoojp/goods?url=' + this.url.replace(/\?/g, '&');
			} else if(RegExp.$3 != '') {
				document.location.href = '/auction/yahoojp/category?url=' + this.url.replace(/\?/g, '&');
			} else {
				document.location.href = '/auction/yahoojp/search?search_form=' + this.url.replace(/\?/g, '&');
			}
			return;
		}

		if(!document.all) {
			alert("죄송합니다. ActiveX 가 가능해야 합니다.");
			return;
		}
		var e;
		if(!this.obj) {
			this.AttachObject();
			return;
		}

		try {
			this.SetObject();
		} catch(e) {
			this.AttachObject();
		}
		return;
	}

	this.AttachObject = function() {
		this.obj = document.createElement("<object classid=\"clsid:1C3DB737-3814-495E-87D5-62968A2A1761\" codebase=\"http://activex.off.co.kr/toolbar/JoyStarterX.cab#version=4,0,0,12\" width=\"0\" height=\"0\" id=\"JoyTrans\">");
		var prm = document.createElement('<param name="Owner" value="joyauction" />');
		this.obj.appendChild(prm);
		prm = document.createElement('<param name="TransType" value="jk" />');
		this.obj.appendChild(prm);
		prm = document.createElement('<param name="Data" value="' + _cookie['PHPSESSID'] + '" />');
		this.obj.appendChild(prm);
		prm = document.createElement('<param name="URL" value="' + this.url + '" />');
		this.obj.appendChild(prm);
		document.appendChild(this.obj);
		return;
	}

	this.SetObject = function() {
		var e;
		try {
			this.obj.DownShow(this.url);
			this.url = false;
		} catch(e) {
			this.InstallObject();
		}
		return;
	}

	this.InstallObject = function() {
		var obj = document.getElementById("popup_activex");
		obj.style.display = "block";
		return;
	}
}
document.dt = dt;

