﻿try { document.execCommand("BackgroundImageCache", false, true); } catch (e) { }; // IE 버그패치 - 플리커버그,
window.onbeforeunload = function() {window.__flash__removeCallback=function(i,n){try{if(i)i[n]=null}catch(e){}}}; // Flash IE unload bug fix


/*  Ntreev Global Script [ Common + Utility / 2009-06-25 ]
*   Copyright (c) 2009 Ns, ALL right reserved.
*   Script by Su-hyung, park
*/

var ua = navigator.userAgent;
var Ns = window.Ntreevsoft =
{
	// agent name
	Agent :
	{
		msie : /msie/i.test(ua),
		firefox : /firefox/i.test(ua),
		chrome : /chrome/i.test(ua),
		opera : /opera/i.test(ua),
		khtml : /khtml/i.test(ua),
		safari : /safari/i.test(ua) && !/chrome/i.test(ua)
	},

	// 이미지로딩 완료 여부에 상관없이 문서가 준비되는데로 실행할 함수를 예약
	ready : function(fn)
	{
		var doc = document;
		if (!doc.readyFns) {
			doc.readyFns = [];

			// trigger function closure
			var ready = function() {
				setTimeout(function() {
					for (var i = 0, f; f = doc.readyFns.shift(); f());
					doc.done = true;
				},0);
			};

			if (doc.attachEvent) {
				doc.attachEvent( "onreadystatechange", function() {
					if ( doc.readyState === "complete" )
						ready();
				});
			} else {
				doc.addEventListener( "DOMContentLoaded", ready, false );
			}

			// insurance :)
			Ns.Event.add(window, 'load', ready);
		}

		if (doc.done) fn();
		else doc.readyFns.push(fn);
	},

	// method extender
	extend : function(target, source)
	{
		for (var m in source) {
			target[m] = source[m];
		}
	},

	// 현재 접속중인 domain의 서비스코드
	rsn : function(url)
	{
		var d = url || document.domain;
		return /(?:^|\.)trickster\./i.test(d) ? 1	//	트릭스터
			: /(?:^|\.)blackshot\./i.test(d) ? 2	// 블랙샷
			: /(?:^|\.)gongbak\./i.test(d) ? 3	 // 공박
			: /(?:^|\.)dinomachia\./i.test(d) ? 4	 // 디노마키아
			: /(?:^|\.)sinmadae\./i.test(d) ? 5	// 신마법의대륙
			: /(?:^|\.)bm\./i.test(d) ? 6	// 프로야구매니져
			: /(?:^|\.)vvvic\./i.test(d) ? 7	// 비비빅
			: /(?:^|\.)alicia\./i.test(d) ? 8	// 앨리샤
			: /(?:^|\.)pangya\./i.test(d) ? 9	// 팡야
			: /(?:^|\.)samgukjionline\./i.test(d) ? 10	// 삼국지온라인
			: /(?:^|\.)sky\./i.test(d) ? 11	// 천자
			: /(?:^|\.)arche\./i.test(d) ? 12	// 아르케
			: /(?:^|\.)gametree\./i.test(d) ? 0	// 포털
			: -1;
	},

	// 현재 접속중인 domain의 secure protocol 여부
	isSecure : function(url)
	{
		return /^https/.test(url || location.href);
	},

	// 현재 접속중인 domain의 서비스 도메인 ( ui / qa / dev / local ) 추출
	getServiceDomain : function()
	{
		var service = /^(?:ui|qa|dev|local)/.exec(document.domain);
		return service ? service + '.' : '';
	},

	// 게임트리 포털 사이트 도메인 (서비스도메인 자동 적용)
	portalUrl : function()
	{
		return (Ns.isSecure() ? 'https://' : 'http://') + Ns.getServiceDomain() + 'www.gametree.co.kr';
	},

	// 게임트리 포털 보안 사이트 도메인 (서비스도메인 자동 적용)
	portalSecureUrl : function()
	{
		return (Ns.getServiceDomain() != 'local.' ? 'https://' : 'http://') + Ns.getServiceDomain() + 'www.gametree.co.kr';
	},

	// 현재 접속중인 url을 기반으로 정확한 returnUrl을 추출
	returnUrl : function()
	{
		var r_url = document.getElementById('r_url');
		return escape(r_url ? r_url.value : location.href);
	},

	// 공통 팝업오프너 사용으로 팝업 차단시 alert 메세지를 공통적으로 적용
	popup : function(url, name, width, height, x, y)
	{
		var vars = [
			'statusbar=no,toolbar=no,resizable=no,',
			width ? 'width='+width+',' : '',
			height ? 'height =' + height + ',' : '',
			x ? 'left='+x+',' : '',
			y ? 'top ='+y+',' : ''
		];

		var pop = window.open( url, (name||'_blank'), vars.join(',') );
		if ( !pop ) {
			alert('팝업이 차단되었습니다.');
		} else {
			pop.focus();
		}

		return pop;
	},

	// 브라우져 및 DTD별로 상이한 root document object를 찾아서 반환 ( scrollTop 등의 프로퍼티에 접근시... )
	root : function() {
		var cm = document.compatMode.toLowerCase();
		return (!cm || cm.indexOf('css') == -1 || Ns.Agent.khtml) ? document.body : document.documentElement;
	}
};

// Login handler
Ns.Login =
{
    // 로그인 프로세스 Url
    url: Ns.getServiceDomain() + 'login.gametree.co.kr/LoginProcess.aspx',

    // 현재 로그인여부 판단
    is: function() {
        return !!Ns.Cookie.get('NMLI');
    },

    enter: function(e) {
        if (Ns.Event.isEnterKey(e)) {
            this.get();
            return false
        }
    },

    // Ajax 로그인 시도
    get: function() {
        // 로그인폼 유효성 검사
        var method = document.getElementById('login_method');
        var id = document.getElementById('login_id');
        var pass = document.getElementById('password');
        var secure = document.getElementById('login_secure');
        var save = document.getElementById('save_id');
        var url = (secure.checked && Ns.getServiceDomain() != 'local.' ? 'https://' : 'http://') + this.url;

        //if (!id.value) { alert('아이디를 입력해주세요.'); return !!id.focus(); }
        //if (!pass.value) { alert('비밀번호를 입력해주세요.'); return !!pass.focus(); }

        // 로그인방식 분기 ( Ajax or Submit )
        if (!method || method.value != 'ajax') {
            document.forms[0].action = url;
            document.forms[0].submit();
            return;
        }

        // 프로세스에 전송할 파라메타값 정의
        var param = [
			'login_method=' + method.value,
			'login_id=' + id.value,
			'password=' + pass.value,
			'save_id=' + (save.checked ? 'on' : 'off'),
			'r_url=' + escape(Ns.returnUrl()),
			'rsn=' + Ns.rsn()
		].join('&');

        // Ajax로 로그인 데이타 전송
        Ns.Ajax.request(url, { param: param, onSuccess: this.process });

        return false;
    },

    // Ajax 로그인 시도에 대한 콜백함수
    process: function(res) {
        // res.ResultCode : [ 0 성공, -1 실패 ]
        if (res.Message) alert(res.Message);
        if (res.CallbackScript) eval(res.CallbackScript);

        //성공인 경우 refresh
        if (res.ResultCode=='0' && res.RedirectUrl) {
            top.location.href = res.RedirectUrl;
        }

        document.getElementById('password').select();

    },

    // 로그아웃
    out: function(returnUrl) {
        if (!returnUrl) returnUrl = '';
        top.location.href = 'http://' + Ns.getServiceDomain() + 'login.gametree.co.kr/LogoutProcess.aspx?rsn=' + Ns.rsn() + '&r_url=' + returnUrl;
    },


    // 로그인페이지로 이동
    go: function() {
        top.location.href = Ns.portalUrl() + '/Secure/Login/Login.aspx?r_url=' + Ns.returnUrl();
    },

    // 로그인팝업 호출
    pop: function() {
        Ns.popup(Ns.portalUrl() + '/Secure/Login/LoginPopup.aspx?r_url=' + Ns.returnUrl(), 'LoginPopup', 300, 400);
    }
};

// Treecahe handler
Ns.TreeCash =
{
    // 트리캐쉬 충전 팝업 호출
    recharge: function(method) {
        if (!Ns.Login.is()) { alert('로그인이 필요합니다.'); return; }
        Ns.popup(Ns.portalUrl() + '/Payment/AgreementState.aspx?Method=' + method, 'Recharge', 460, 550);
    }
};

// Gametree Content navigator
Ns.Content =
{
    // 공통 컨텐츠 페이지 이동용 단축함수
    // 현재 서비스코드가 0번(포털)일경우 자창 이동, 그 외에는 새창으로...
    move: function(url, dir) {
        if (dir || Ns.rsn() == 0) top.location.href = url; else window.open(url);
    },

    company: function() {
        window.open('http://www.ntreev.com/');
    },

    home: function() {
		top.location.href = 'http://' + Ns.getServiceDomain() + 'www.gametree.co.kr';
    },

    join: function() {        
        this.move('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/SignUp/Join.aspx?rsn=' + Ns.rsn(), true);
    },

    info: function() {
        this.move(Ns.portalSecureUrl() + '/Secure/MyPage/Default.aspx', true);
    },

    cashinfo: function() {
        this.move(Ns.portalSecureUrl() + '/Secure/MyPage/Account/Cash.aspx', true);
    },

    find: function() {
        //Ns.popup(Ns.portalUrl() + '/Secure/MyPage/Member/FindId.aspx', 'FindIdPopup', 460, 254, 20, 20);
        window.open(Ns.portalSecureUrl() + '/Secure/MyPage/Member/FindId.aspx', 'FindIdPopup', 'width=460, height=260, left=20, top=20, statusbar=no, toolbar=no, resizable=no, scrollbars=yes')
    },

    policy: function() {
        this.move('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/policy/service.aspx', true);
    },

    privacy: function() {
        this.move('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/policy/privacy.aspx', true);
    },

    youth: function() {
        this.move('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/policy/YouthPolicy.aspx', true);
    },

    refusal: function() {
        window.open('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/policy/email.aspx', 'EmailMsg', 'width=400, height=242')
    },

    operation: function() {
        this.move('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/');
    },

    sitemap: function() {
        this.move('http://' + document.domain + '/sitemap.aspx');
    },

    pcbang: function() {
        window.open('http://pcbang.gametree.co.kr/');
    },

    refund: function() {
        this.move('http://' + Ns.getServiceDomain() + 'www.gametree.co.kr/policy/cashservice.aspx');
    },
    contact: function() {
        if (confirm('제휴문의를 위해 담당자에게 이메일을 보내시겠습니까?')) {
            location.href = "mailto:Portal@ntreev.com";
        }
    }
};


/* ==================================================
	Flash control
================================================== */

Ns.Flash =
{
	count : 1,
    get: function(name) {
        return document[name] || document.getElementById(name);
    },

    // document.write 를 이용하여 flash html을 삽입
    write: function(file, name, width, height, vars, wmode) {
        document.write(this.create(file, name, width, height, vars, wmode));
    },

    // targetId 의 내부에 flash html을 삽입
    append: function(targetId, file, name, width, height, vars, wmode) {
        document.getElementById(targetId).innerHTML = this.create(file, name, width, height, vars, wmode);
    },

    // 주어진 정보를 기반으로 flash html을 생성
    create: function(file, name, width, height, vars, wmode) {
		this.count++;
		name = name || '__swfObject__'+this.count;
		return [
			'<object width="' + width + '" height="' + height + '" id="' + name + '" name="' + name + '" ',
			(document.all
				? 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0"><param name="movie" value="' + file + '" />'
				: 'type="application/x-shockwave-flash" data="' + file + '">'
			),
			'<param name="allowScriptAccess" value="always" />',
			'<param name="allowFullScreen" value="true" />',
			'<param name="quality" value="high" />',
			'<param name="showMenu" value="false">',
			'<param name="Menu" value="false">',
			'<param name="wmode" value="' + (wmode || 'transparent') + '">',
			'<param name="flashVars" value="' + vars + '">',
			'</object>'
		].join('');
    }
};

// Event handler
Ns.Event =
{
	get : function(e)
	{
		return e || window.event;
	},

	// 해당 obj에 일회성 이벤트 삽입
	one : function(obj, handler, fn)
	{
		this.add(obj, handler, function(e) {
			Ns.Event.remove(obj, handler, arguments.callee);	// 1회 실행 후 arguments.callee를 이용하여 제거
			fn(e);
		});
	},

	// 해당 obj 에 지속성 이벤트 삽입
	add : function(obj, handler, fn)
	{
		if (obj.attachEvent) {
			obj.attachEvent("on"+handler, fn);
		} else {
			obj.addEventListener(handler, fn, false);
		}
	},

	// 해당 obj에 지정된 지속성 이벤트 제거
	remove : function(obj, handler, fn)
	{
		if (obj.detachEvent) {
			obj.detachEvent("on"+handler, fn);
		} else {
			obj.removeEventListener(handler, fn, false);
		}
	},

	keyCode : function(e)
	{
		var evt = this.get(e);
		try {
			return evt.keyCode || evt.which;
		} catch(e) {};
	},

	element : function(e)
	{
		var evt = this.get(e);
		return evt.target || evt.srcElement;
	},

	pointerX : function(e)
	{
		var evt = this.get(e);
		return evt.clientX + Ns.root().scrollLeft;
	},

	pointerY : function(e)
	{
		var evt = this.get(e);
		return evt.clientY + Ns.root().scrollTop;
	},

	// 현재 입력된 키보드가 숫자키에 해당하는지 판별
	isNumberKey : function(e)
	{
		var code = this.keyCode(e);
		return code > 47 && code < 58 ? true
			: code > 95 && code < 106  ? true
			: false;
	},

	// 현재 입력된 키보드가 컨트롤을 위한 키 (alt, shift 등.. )인지 반환
	isControlKey : function(e)
	{
		return this.keyCode(e) < 47 ? true : false;
	},

	// 엔터키 여부 반환
	isEnterKey : function(e)
	{
		return this.keyCode(e) == 13;
	},

	// 발생한 이벤트 취소
	cancle : function(e)
	{
		try {
			e.preventDefault(); // for Standard browser
		} catch(e) {
			window.event.returnValue = false; // for MSIE
		}
	},

	// 더이상 버블링이 일어나지 않도록 발생한 이벤트 정지
	stop : function(e)
	{
		try {
			e.stopPropagation(); // for Standard browser
		} catch(e) {
			window.event.cancelBubble = true;	// for MSIE
		}
	}
};

// Cookie handler
Ns.Cookie =
{
	get : function(cn)
	{
		return (RegExp('(?:^|;| )'+cn+'=([^;]+)').exec(document.cookie) || [0, null])[1];
	},

	set : function(cn, val, expires)
	{
		var today = new Date();
		var value = escape(val||'');
		today.setDate(today.getDate()+(expires||0));

		// expires 미지정시 단발성(브라우져 생존시에만 지속)쿠키로 제어
		document.cookie = cn+'='+value+'; path=/; ' + (expires ? 'expires=' + today.toGMTString()+';' : '');
	},

	remove : function(cn)
	{
		this.set(cn, null, -1);
	}
};

// Ajax handler
Ns.Ajax =
{
    createXHR: function() {
        try {
            return new XMLHttpRequest();
        } catch (e) {
            return new ActiveXObject("Msxml2.XMLHTTP") || new ActiveXObject("Microsoft.XMLHTTP");
        }
    },

    // Ajax request
    request: function(url, option) {
        // 기본적으로 필요한 option property 를 생성
        var opt = option || {};
        var prop = {
            sync: opt.sync ? false : true,
            param: this.toSerialize(opt.param || ''),
            method: (opt.method || 'POST').toUpperCase(),
            type: opt.responseType || '',
            success: opt.onSuccess || Function(),
            failed: opt.onFailed || function(code, txt) { alert('Ajax request message :  "' + code + '"\n' + txt) },
            ready: opt.onReady || Function(),
            complete: opt.onComplete || Function()
        };

        // 요청한 url의 domain이 현재 domain과 다를경우 FlashUtility를 이용한 CrossAjax를 시도
        var inside = !/^http/.test(url) || RegExp('://' + document.domain + '/', 'i').test(url);
        this[inside ? 'byXHR' : 'bySWF'](url, prop);
    },

    // FlashUtility를 이용하여 CrossDomain으로 Ajax 실행
    crossCount: 0,
    bySWF: function(url, prop) {
        var file = (Ns.isSecure() ? 'https://' : 'http://') + Ns.getServiceDomain() + 'public.gametree.co.kr/Global/flash/Nfu_ajax.swf?ver=' + Math.random();
        var n = this.crossCount++;
        var doc = document;

        this['f' + n] = prop.failed;
        this['r' + n] = prop.ready;
        this['c' + n] = prop.complete;
        this['s' + n] = function(res) {
            prop.success(Ns.Ajax.getResponseData(prop.type, {
                responseText: res,
                responseXML: Ns.Convert.toXML(res)
            }));
        };

        var div = doc.createElement('div');
        with (div.style) { position = 'absolute'; top = '0'; left = '0'; zIndex = '9999'; }
        div.innerHTML = Ns.Flash.create(file, '', 1, 1, [
			'url=' + escape(url),
			'param=' + escape(prop.param),
			'method=' + prop.method,
			'sn=Ns.Ajax.s' + n, 'fn=Ns.Ajax.f' + n, 'rn=Ns.Ajax.r' + n, 'en=Ns.Ajax.e' + n
		].join('&'), 'window');

        if (doc.body) {
            doc.body.insertBefore(div, doc.body.firstChild);
        } else {
            Ns.ready(function() {
                doc.body.insertBefore(div, doc.body.firstChild);
            });
        }
    },

    // 일반적인 방법의 XHR방식으로 Ajax 실행
    byXHR: function(url, prop) {
        var xhr = this.createXHR();
        var callback = function() {
            if (xhr.readyState != 4) return
            if (xhr.status == 200 || xhr.status == 304) {
                prop.success(Ns.Ajax.getResponseData(prop.type, xhr));
            } else {
                prop.failed(xhr);
            }
            prop.complete(xhr);
            delete xhr;
        }

        prop.ready();
        xhr.onreadystatechange = callback;
        xhr.open(prop.method, url, prop.sync);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
        xhr.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
        xhr.setRequestHeader("Pragma", "no-cache");

        // Send : gecko 방식의 브라우져에서는 GET 요청시 null값을 보내지 않으면 오류발생
        xhr.send(prop.method == 'GET' ? null : prop.param);

        // 동기요청일경우 firefox에서는 onreadystatechange 이벤트가 발생하지 않음으로 별도로 실행을 해준다
        if (!prop.sync && Ns.Agent.firefox) callback();
    },

    // 외부 파일을 동기 get 방식으로
    load: function(url) {
        var resText;
        this.request(url, {
            sync: true,
            method: 'GET',
            responseType: 'text',
            onSuccess: function(res) {
                resText = res;
            }
        });
        return resText;
    },

    // Object 형식의 객체를 param값으로 주어졌을경우 string serialize 처리
    toSerialize: function(obj) {
        if (obj.constructor == Object) {
            var txt = [];
            for (var n in obj) {
                txt.push(n + '=' + escape(obj[m]));
            }

            return txt.join('&');
        }
        return obj;
    },

    // 응답받은 데이타를 지정된 형식의 객체로 변환
    // 변환가능한 객체형식 ( TEXT, XML, JSON )
    getResponseData: function(type, res) {
        
        var type = type.toUpperCase();
        var xml = res.responseXML;
        var txt = res.responseText;

        // selected binding
        if (!txt && !xml) return null;
        if (type == 'TEXT') return txt;
        
        // 정규식을 통하여 XML 여부 판단처리 추가
        if (type == "XML" || /^\</.test(txt)) {
            return xml;
        }

        // 정규식을 통하여 JSON 여부 판단처리
        if (type == "JSON" || /\s*\[*\{/.test(txt)) {
            return Ns.Convert.toJSON(txt);
        }
        
        // auto binding
        return xml && xml.documentElement && xml.documentElement.childNodes.length ? xml : Ns.Convert.toJSON(txt) || txt;
    }
};

// UI handler
Ns.Effect =
{
	 // 기본적인 Tab 액션 생성
	tab : function(handle, heads, contents)
	{
		var el, img;
		for (var i=0; heads[i]; i++) {
			heads[i]['on'+handle] = function() {
				for (var n=0; heads[n]; n++) {
					el = heads[n], img = el.src ? el : el.firstChild && el.firstChild.src ? el.firstChild : false;
					if (el == this) {
						el.className = el.className.replace('-off', '-on');
						if (img.src) (function(_img) { setTimeout(function() { _img.src = _img.src.replace('_off.', '_on.'); }, 0) })(img);
						if (contents) contents[n].style.display = 'block';
					} else {
						el.className = el.className.replace('-on', '-off');
						if (img.src) (function(_img) { setTimeout(function() { _img.src = _img.src.replace('_on.', '_off.'); }, 0) })(img);
						if (contents) contents[n].style.display = 'none';
					}
				}
			}
			if (handle == 'click') {
				heads[i].onfocus = heads[i]['on'+handle];
			}
		}
	},

	// 스크롤 추적 레이어 생성 ( target ID, 최대 높이 값, 최소 높이 값 )
	Scrolling : function(_id, _max, _min)
	{
		if ( !(this.obj = document.getElementById(_id)) ) return;
		this.root = Ns.root();
		this.count = 0;
		this.min = _min;
		this.max = _max;
		this.scroll = function() {
			var top = Math.max( this.root.scrollTop, this.max - this.min );
			var obj = this.obj;
			if ( !obj.style.top ) obj.style.top = this.max + 'px';
			var now = parseInt(obj.style.top);
			var move = (top - (now - this.min)) / 8;
			obj.style.top = ( now + move ) + 'px';

			var st = parseInt(obj.style.top);
			if (this.record && this.record == st) {
				this.count++;
			} else {
				this.count = 0;
			};
			if ( this.count == 10 ) clearInterval(this.timer);
			this.record = st;
		};

		var obj = this, fn = function() {
			clearInterval(obj.timer);
			obj.timer = setInterval(function() {
				obj.scroll();
			}, 15);
		};

		Ns.Event.add(window, 'scroll', fn);
		fn();
	}

};

// Object Converter
Ns.Convert =
{
	// XMLString to XML
	toXML : function(str)
	{
		try {
			if (window.ActiveXObject) {
				var xml = new ActiveXObject('Microsoft.XMLDOM');
				xml.async = false;
				xml.loadXML(str);
				return xml;
			}
			if (window.DOMParser) {
				var xml = new DOMParser();
				return xml.parseFromString(str, 'text/xml');
			}
		} catch(e) {};
	},

	// JSONString to JSON
	toJSON : function(str)
	{
		try {
			eval('var json = ' + str.replace(/^\t+|^\s|\n|\r|\s$/mg, '').replace(/,(?=\})/mg, '').replace(/,(?=\])/mg, ''));
			return json;
		} catch(e) {
			return null;
		}
	}
};

// String 객체 확장
Ns.extend(String.prototype,
{
	// 문자열의 앞, 뒤 공백을 제거
	trim : function()
	{
		return this.replace(/^[\s\t ]+|[\s\t ]+$/, '');
	},

	// 현재 텍스트의 byte 크기 반환
	getSize : function()
	{
		for (var i=0,bytes = 0; this.charCodeAt(i); i++) {
			bytes += (this.charCodeAt(i) > 128) ? 2 : 1;
		}
		return bytes;
	}
});

// 심플 셀렉터
Ns.byId = function(id) {
	return document.getElementById(id);
};

Ns.byTag = function(tag, context) {
	return (context||document).getElementsByTagName(tag||'*');
};

Ns.byClass = function(cn, tag) {
	var targets = Ns.byTag(tag), exp = RegExp('(?:^| )'+cn+'(?: |$)'), res = [], i = 0, el, tn;
	while (el = targets[i++]) {
		if ((tn = el.className) && exp.test(tn)) {
			res.push(el);
		}
	};
	return res;
};




/* png24 이미지 필터에 대한 독립 함수 */

function setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter ="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='';
	return '';
}

