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

dt = new function() {
	this.obj = false;
	this.url = false;
	this.DownShow = function(url, flag) {
		if(url) {
			this.url = url;
		}
		/*if(!flag && yahoojpmatch.test(this.url)) {
			window.open('/trans.php?_M=jk&_U=' + this.url.replace(/\?/g, '&'));
			return;
			if(RegExp.$2 != '') {
				window.open('/auction/yahoojp/goods?url=' + this.url.replace(/\?/g, '&'));
			} else if(RegExp.$3 != '') {
				window.open('/auction/yahoojp/category?url=' + this.url.replace(/\?/g, '&'));
			} else {
				window.open('/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/DicoStarterX.cab#version=4.0.0.6\" width=\"0\" height=\"0\" id=\"dicoTrans\">");
		var prm = document.createElement('<param name="Owner" value="japandanawa" />');
		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() {
		window.alert("ActiveX 설치를 해 주세요.");
		return;
	}
}
document.dt = dt;
