function uniqloLswObj() {
	this.base_url = "www.uniqlo.com/";
	this.middle_url = "fr60/switch/";
	this.protocol = "http://";
	this.common_swf = "swf/coupons.swf";
	this.bp_swf = "swf/blogparts.swf";
	this.bpmini_swf = "swf/blogpartsMini.swf";
	this.bplarge_swf = "swf/blogpartsLarge.swf";
	this.bm_swf = "swf/session.swf";
	this.win_swf = "swf/congratulations.swf";
	this.uncompatible_swf = "swf/unmatched.swf";
	this.black_png = "swf/black.swf";
	this.close_png = "swf/close.gif";
};

function BrowserCheck(){
		var b = navigator.appName;
		if (b == "Netscape") this.b = "NN";
		else if (b == "Microsoft Internet Explorer") this.b = "IE";
		else this.b = b;
		this.version = navigator.appVersion;
		this.vSub = navigator.vendorSub;
		this.userAgent = navigator.userAgent;
		this.appVersion = navigator.appVersion;
		this.v = parseInt(this.version);
		this.vs = parseFloat(this.vSub);
		
		this.NN = (this.b == "NN");
		this.NN3 = (this.b == "NN" && this.v == 3);
		this.NN4 = (this.b == "NN" && this.v == 4);
		this.NN6x = (this.b == "NN" && this.v == 5 && this.vs >= 6.01);
		this.NN6 = (this.b == "NN" && this.v == 5);
		this.NN7 = (this.b == "NN" && this.v == 5 && this.vs >= 7);
		
		this.IE = (this.b == "IE");
		this.IE3 = (this.userAgent.indexOf('MSIE 3')>0);
		this.IE45 = (this.userAgent.indexOf('MSIE 4.5')>0);
		this.IE401 = (this.userAgent.indexOf('MSIE 4.01')>0);
		this.IE4 = (this.userAgent.indexOf('MSIE 4')>0);
		this.IE51 = (this.userAgent.indexOf('MSIE 5.1')>0);
		this.IE512 = (this.userAgent.indexOf('MSIE 5.12')>0);
		this.IE514 = (this.userAgent.indexOf('MSIE 5.14')>0);
		this.IE52 = (this.userAgent.indexOf('MSIE 5.2')>0);
		this.IE5 = (this.userAgent.indexOf('MSIE 5')>0);
		this.IE6 = (this.userAgent.indexOf('MSIE 6')>0);
		this.IE7 = (this.userAgent.indexOf('MSIE 7')>0);
		this.IE8 = (this.userAgent.indexOf('MSIE 8')>0);
		
		this.GEK = (this.userAgent.indexOf("Gecko") != -1);
		this.SAF = (this.userAgent.indexOf("Safari",0) != -1);
		this.FF = (this.userAgent.indexOf("Firefox") != -1);
		this.GC = (this.userAgent.indexOf("Chrome") != -1);
		this.CAB = (this.userAgent.indexOf("iCab",0) != -1);
		this.OPE = (this.userAgent.indexOf("Opera",0) != -1);
		
		this.Win = (this.userAgent.indexOf('Win',0) != -1);
		this.Mac = (this.userAgent.indexOf('Mac',0) != -1);
		this.MacOSX = (this.userAgent.indexOf('Mac OS X',0) != -1);
		if(this.IE512 || this.IE52){
			this.MacOSX=true;
		}
		else if(this.IE514){
			if (navigator.plugins) {
				for (i=0; i < navigator.plugins.length; i++ ) {
					if (navigator.plugins[i].name.indexOf('QuickTime') >= 0 && navigator.plugins[i].filename.indexOf('.plugin')!=-1){
						this.MacOSX=true;
					}
				}
			}
		}
		this.Unix = (this.appVersion.indexOf('X11',0) != -1);
}

var checkB = new BrowserCheck();

var flash_version = 9;
var FlashInstalled = false;
var pv = 6;

if (checkB.OPE) {
	var sp = navigator.plugins["Shockwave Flash"].description.indexOf("Flash");
	var ep = navigator.plugins["Shockwave Flash"].description.lastIndexOf(" ");
	var aver = parseFloat(navigator.plugins["Shockwave Flash"].description.substring(sp+pv,ep));
	if(aver >= flash_version){
		FlashInstalled = true;
	}
} else if(checkB.Win && checkB.IE){
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('contentVersion = 8 \n');
	document.write('FlashInstalled = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion))) \n');
	document.write('</SCR' + 'IPT\> \n');
	if(checkB.IE4){
		FlashInstalled = false;
	}
}else if(checkB.Mac && checkB.IE){
	if(!checkB.IE4 && navigator.plugins["Shockwave Flash"]){
		var sp = navigator.plugins["Shockwave Flash"].description.indexOf("Flash");
		var ep = navigator.plugins["Shockwave Flash"].description.lastIndexOf(" ");
		var aver = parseFloat(navigator.plugins["Shockwave Flash"].description.substring(sp+pv,ep));
		if(aver >= flash_version){
			FlashInstalled = true;
		}
	}
}else if(checkB.NN && navigator.plugins["Shockwave Flash"]){
	if(checkB.NN7 || checkB.NN6 || checkB.NN6x || checkB.NN4){
		var sp = navigator.plugins["Shockwave Flash"].description.indexOf("Flash");
		var ep = navigator.plugins["Shockwave Flash"].description.lastIndexOf(" ");
		var aver = parseFloat(navigator.plugins["Shockwave Flash"].description.substring(sp+pv,ep));
		if(aver >= flash_version){
			FlashInstalled = true;
		}
	}
}




uniqloLswObj.prototype.getSecretSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.common_swf;
	return swf;
}

uniqloLswObj.prototype.getBlogPartsSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.bp_swf;
	return swf;
}

uniqloLswObj.prototype.getBlogPartsMiniSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.bpmini_swf;
	return swf;
}

uniqloLswObj.prototype.getBlogPartsLargeSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.bplarge_swf;
	return swf;
}

uniqloLswObj.prototype.getBookMarkSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.bm_swf;
	return swf;
}

uniqloLswObj.prototype.getWinnerSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.win_swf;
	return swf;
}

uniqloLswObj.prototype.getBlackPNG = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.black_png;
	return swf;
}

uniqloLswObj.prototype.getClosePNG = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.close_png;
	return swf;
}

uniqloLswObj.prototype.getUncompatibleSWF = function() {
	var swf = this.protocol + this.base_url + this.middle_url +this.uncompatible_swf;
	return swf;
}

uniqloLswObj.prototype.getBlogPartsWidth = function() {
	return 171;
}

uniqloLswObj.prototype.getBlogPartsHeight = function() {
	return  225;
}

uniqloLswObj.prototype.getBlogPartsMiniWidth = function() {
	return 120;
}

uniqloLswObj.prototype.getBlogPartsMiniHeight = function() {
	return 162;
}

uniqloLswObj.prototype.getBlogPartsLargeWidth = function() {
	return 424;
}

uniqloLswObj.prototype.getBlogPartsLargeHeight = function() {
	return 525;
}

uniqloLswObj.prototype.getBookMarkWidth = function() {
	return 1;
}

uniqloLswObj.prototype.getBookMarkHeight = function() {
	return  1;
}

uniqloLswObj.prototype.getIsolatedWidth = function() {
	return 300;
}

uniqloLswObj.prototype.getIsolatedHeight = function() {
	return  300;
}

var UniqloLsw = new uniqloLswObj();

function lswCheckBrowser() {
	var currentOS;
	if(checkB.Win==true){
		currentOS = "WIN";
	}else if(checkB.MacOSX==true){
		currentOS = "MAC";
	}else{
		currentOS = "OTH";
	}

	//alert(checkB.IE7);
	var currentBrowser;
	if(checkB.IE8==true||checkB.IE7==true||checkB.IE6==true){
		currentBrowser = "IE";
	}else if(checkB.FF==true){
		currentBrowser = "FF";
	}else if(checkB.GC==true){
		currentBrowser = "GC";
	}else if(checkB.SAF==true){
		currentBrowser = "SF";
	}else{
		currentBrowser = "OT"
	}

	var currentSystem = currentOS+currentBrowser;
	
	return currentSystem;
}


function doInsert_blogparts() {
		uniqloLswType = 0;
		document.write('<div id="uniqloLswBox"></div>');
		document.write('<script type="text/javascript" charset="utf-8" src="' + UniqloLsw.protocol + UniqloLsw.base_url + UniqloLsw.middle_url + 'js/ecl.js"></script>');
		document.write('<script type="text/javascript" charset="utf-8" src="' + UniqloLsw.protocol + UniqloLsw.base_url + UniqloLsw.middle_url + 'js/lswXYcoordinate.js"></script>');
		document.write('<script type="text/javascript" charset="utf-8" src="' + UniqloLsw.protocol + UniqloLsw.base_url + UniqloLsw.middle_url + 'js/addEvent.js"></script>');
		document.write('<script type="text/javascript" charset="utf-8" src="' + UniqloLsw.protocol + UniqloLsw.base_url + UniqloLsw.middle_url + 'js/setUniqloCoupon.js"></script>');
}

var uniqloLswType;

doInsert_blogparts();