function TabChange() {
	this.version = "0.1";
	this.name = "TabChange";
	this.item = new Array();
	this.itemcount = 0;
  
  this.add = function() {
		this.itemcount=this.add.arguments.length;
		for(i=0;i<this.itemcount;i++){
			this.item[i] = this.add.arguments[i];
		}
	}; 
	this.LayerChange = function(layerID){
		for(j=0;j<this.itemcount;j++){
			if(this.item[j] == layerID) document.getElementById( this.item[j]).style.display = "";
			else document.getElementById( this.item[j]).style.display = "none";
		}
	};
}

function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function setCookie(name,value,expires){
		document.cookie=name + "=" + escape(value) + ((expires == null)? "" : (" ; expires=" + expires.toGMTString()));
}

function getCookie(name){
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while(i< clen) {
		var j = i + alen;
		if(document.cookie.substring(i,j)==arg){
			var end = document.cookie.indexOf(";",j);
			if(end == -1) end = document.cookie.length;
				return unescape(document.cookie.substring(j,end));
		}
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	}
	return null;
}

function HkiScroll()
{
	this._hkGAP=0;
	this._hkINIT=0;
	this._hkBTTM=0;
	this._hkADHT=0;
	this._hkMaxSCHT=0;

	this._hkRefreshVal=120;
	this._hkScrollSpeed=2;
	this._hkTimer;

	this._FLayer;
	this._SLayer;
	this.name="HkiScroll";

	this.AddLayer=function(FLayer,SLayer){
		this._FLayer=document.getElementById(FLayer);
		this._SLayer=document.getElementById(SLayer);
	};
	
	this.RefreshScrollPhoto=function(){
		var _hkStartPoint,_hkEndPoint,_hkRefreshTime,_hkScrollAmount;

		this._hkINIT=this._FLayer.offsetTop+this._hkGAP;
		this._hkMaxSCHT=document.body.scrollHeight;

		_hkStartPoint=parseInt(this._SLayer.style.top,10);

		if(typeof(window.pageYOffset)=="number"){
			_hkEndPoint=window.pageYOffset+this._hkGAP;
		}else if(typeof(document.documentElement.scrollTop)=="number"){
			_hkEndPoint=document.documentElement.scrollTop+this._hkGAP;
		}else{_hkEndPoint=0;}
			
		if(_hkEndPoint<this._hkINIT)_hkEndPoint=this._hkINIT;
		if(_hkEndPoint>(this._hkMaxSCHT-this._hkADHT-this._hkBTTM))_hkEndPoint=this._hkMaxSCHT-this._hkADHT-this._hkBTTM;
		_hkRefreshTime=this._hkRefreshVal;
		
		if(_hkStartPoint!=_hkEndPoint&&_hkEndPoint<=(this._hkMaxSCHT-this._hkADHT-this._hkBTTM)&&_hkEndPoint>=this._hkINIT){
			this._hkScrollAmount=Math.ceil(Math.abs(_hkEndPoint-_hkStartPoint)/15);
			this._SLayer.style.top=_hkStartPoint+((_hkEndPoint<_hkStartPoint)?-this._hkScrollAmount:this._hkScrollAmount)+"px";
			_hkRefreshTime=this._hkScrollSpeed;
		}
		this._SLayer.style.left=this._FLayer.offsetLeft+"px";
		this._hkTimer=setTimeout(this.name+".RefreshScrollPhoto()",_hkRefreshTime);
	};

	this.InitScrollPhoto=function(_hkADHT,_hkBTTM){
		this._hkADHT=_hkADHT;
		this._hkBTTM=_hkBTTM;
		this._hkINIT=this._FLayer.offsetTop+this._hkGAP;
		this._SLayer.style.top=this._hkINIT+"px";
		this._hkMaxSCHT=document.body.scrollHeight;
		this.RefreshScrollPhoto();
	};
}

function SetImageView(ImageName)
{
	var PhotoImg=new Image();
	PhotoImg.src=ImageName.src;
	var ImgUrl = new String(PhotoImg.src);
	var GetVal="left="+event.clientX+",top="+event.clientY+",width="+PhotoImg.width+",height="+PhotoImg.height;
	ImageView=window.open('','hki',GetVal);
	ImageView.document.write('<body leftmargin=0 topmargin=0 background='+ImgUrl+' onclick=self.close() oncontextmenu="return false" ondragstart="return false" onselectstart="return false" onsourcestart="return false">');
}

var SetSearch={
	search_bg:false,
	check_search:function(val){
		val.value='';
		document.isearch.kw.value='';
		this.search_bg=true;
	},
	SetKeyword:function(key,url){
		if(document.getElementById('id_directGoKeyword')) document.isearch.directGoKeyword.value=key;
		if(document.getElementById('id_directGoUrl')) document.isearch.directGoUrl.value=url;
		document.isearch.kw.value=key;
	},
	GoAction:function(){
		if(document.getElementById('id_directGoKeyword') && 
			document.isearch.kw.value == document.isearch.directGoKeyword.value && 
			document.isearch.kw.value!='') {
			location.href=document.isearch.directGoUrl.value;
			return false;
		}
		if(document.isearch.kw.value==''||document.isearch.kw.value=="°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä."){
			alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
			return false;
		}
		if(document.getElementById('id_directGoKeyword')) document.isearch.directGoKeyword.value="";
		if(document.getElementById('id_directGoUrl')) document.isearch.directGoUrl.value="";
		document.isearch.action="http://search.hankooki.com/search.php?so=1&st=0&sa=all&co";
		return true;
	}
}

function flash() 
{
 var object = new String;
 var params = new String;
 var embedParams = new String;
 
 this.init = function(objectID, flashURL, W, H) 
 {
  object = "<object id='" +objectID+ "' width='" +W+ "' height='" +H+ "' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'>"; 
  object += "<param name='movie' value='" +flashURL+ "'>";
  object += "<param name=\"allowScriptAccess\" value=\"always\">";
  embedParams = "src='" +flashURL+ "' ";
  embedParams = "width='" + W + "' height='" + H + "' ";
 }
 
 this.param = function(param, value)
 {
  params += "<param name='" +param+ "' value='" +value+ "'>";
  embedParams += param + "='" +value+ "' ";
 }
 
 this.load = function() 
 {
  var embedTag = "<embed " + embedParams + "allowScriptAccess=always pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' ></embed>";
  var objTag = object + params + embedTag + "</object>";
  document.write(objTag);
 }
 
 this.debug=function()
 {
  var objTag = object + params + embedTag + "</object>";
  alert(objTag);
 }
}

function HKIRolling(){
	this.name = "HKIRolling";
	this.spanp = new Object;
	this.spanc = new Object;
	this.items = new Array();
	this.iswrited = false;

	this.direction		= arguments[0]?arguments[0]:"left";		//¹æÇâ
	this.spanp.width	= arguments[1]?arguments[1]:"100%";		//ÀüÃ¼ ±Û¾²±â ¿µ¿ª(³ÐÀÌ)
	this.spanp.height	= arguments[2]?arguments[2]:"100%";		//ÀüÃ¼ ±Û¾²±â ¿µ¿ª(³ôÀÌ)
	this.spanc.width	= arguments[3]?arguments[3]:"100%";		//ÀüÃ¼ ·Ñ¸µ ¿µ¿ª(³ÐÀÌ)
	this.spanc.height	= arguments[4]?arguments[4]:"100%";		//ÀüÃ¼ ·Ñ¸µ ¿µ¿ª(³ôÀÌ)
	this.speed			= arguments[5]?arguments[5]:"20";				//·Ñ¸µ ½ºÇÇµå
	this.amount			= arguments[6]?arguments[6]:"1";				//·Ñ¸µ ÀÌµ¿ ´ÜÀ§(ÇÈ¼¿)
	this.stoptime		= arguments[7]?arguments[7]:0;
	
	this.direction = this.direction.toString().toLowerCase().replace(/(^\s*)|(\s*$)/g,"");
	this.direction = this.direction.replace(/(1)/,"left");
	this.direction = this.direction.replace(/(2)/,"right");
	this.direction = this.direction.replace(/(3)/,"up");
	this.direction = this.direction.replace(/(4)/,"down");
	if(!this.direction.match(/(left|right|up|down)/)) this.direction = "left";

	this.additem = function(html){
		this.items[this.items.length] = html;
	}
	this.insert = function(){
		var html = "";
		html += "<span id='"+this.name+"Main'  style='width:"+this.spanp.width+";height:"+this.spanp.height+";position:absolute;clip:rect(0 "+this.spanp.width+" "+this.spanp.height+" 0);'>";
		html += "</span>";
		document.write(html);
	}
	this.write = function(){
		if(this.iswrited) return;

		var tmpobj = document.getElementById(this.name+'Main').parentNode;
		if(!this.spanp.width)								this.spanp.width	= tmpobj.clientWidth;
		if(!this.spanp.height)								this.spanp.height	= tmpobj.clientHeight;
		if(!this.spanc.width)								this.spanc.width	= tmpobj.clientWidth;
		if(!this.spanc.height)								this.spanc.height	= tmpobj.clientHeight;
		if(this.spanp.width.toString().indexOf("%")!=-1)	this.spanp.width	= tmpobj.clientWidth*parseInt(this.spanp.width)/100;
		if(this.spanp.height.toString().indexOf("%")!=-1)	this.spanp.height	= tmpobj.clientHeight*parseInt(this.spanp.height)/100;
		if(this.spanc.width.toString().indexOf("%")!=-1)	this.spanc.width	= tmpobj.clientWidth*parseInt(this.spanc.width)/100;
		if(this.spanc.height.toString().indexOf("%")!=-1)	this.spanc.height	= tmpobj.clientHeight*parseInt(this.spanc.height)/100;
		if(!this.items.length){return false;}
		
		var html = "";
		for(var i=0;i<this.items.length;i++){
			if(this.direction=="left")	{var spanleft=this.spanc.width*i;var spantop=(this.spanp.height-this.spanc.height)/2;}
			if(this.direction=="right")	{var spanleft=this.spanp.width-this.spanc.width*(i+1);var spantop=(this.spanp.height-this.spanc.height)/2;}
			if(this.direction=="up")	{var spanleft=(this.spanp.width-this.spanc.width)/2;var spantop=this.spanc.height*i;}
			if(this.direction=="down"){var spanleft=(this.spanp.width-this.spanc.width)/2;var spantop=this.spanp.height-this.spanc.height*(i+1);}
			html += "<span id='"+this.name+"Main_"+i+"' style='position:absolute;left:"+spanleft+"px;top:"+spantop+"px;width:"+this.spanc.width+";height:"+this.spanc.height+"px;'>";
			html += "<table width="+this.spanc.width+" height="+this.spanc.height+" border=0 cellpadding=0 cellspacing=0><tr><td align=left  nowrap onmouseover='"+this.name+".stop(0)' onmouseout='"+this.name+".start()'>";
			html += this.items[i];
			html += "</td></tr></table>";
			html += "</span>";
		}
		document.getElementById(this.name+'Main').innerHTML = html;
		this.iswrited = true;
	}
	this.move = function(){
		var tmpobj;
		for(var i=0;i<this.items.length;i++){
			tmpobj = document.getElementById(this.name+"Main_"+i);
			if(this.direction=="left"){
				tmpobj.style.pixelLeft -= parseInt(this.amount);
				if(tmpobj.style.pixelLeft <- this.spanc.width){
					tmpobj.style.pixelLeft = this.spanc.width * (this.items.length - 1);
					if(this.stoptime) this.stop(this.stoptime);
				}
			}
			if(this.direction=="right"){
				tmpobj.style.pixelLeft += parseInt(this.amount);
				if(tmpobj.style.pixelLeft > this.spanp.width){
					tmpobj.style.pixelLeft = this.spanp.width-this.spanc.width*this.items.length;
					if(this.stoptime) this.stop(this.stoptime);
				}
			}
			if(this.direction=="up"){
				tmpobj.style.pixelTop -= parseInt(this.amount);
				if(tmpobj.style.pixelTop < 0){
						tmpobj.style.pixelTop = (this.spanc.height)*this.items.length + tmpobj.style.pixelTop;
				}
			}
			if(this.direction=="down"){
				tmpobj.style.pixelTop += parseInt(this.amount);
				if(tmpobj.style.pixelTop >= this.spanp.height){
					tmpobj.style.pixelTop = tmpobj.style.pixelTop-(this.spanc.height)*this.items.length;
				}
			}
		}
	}
	this.stop = function(stoptime){
		clearInterval(this.intervalID);
		this.intervalID = "";
		if(this.stoptime) window.setTimeout(this.name+".start()",this.stoptime);
	}
	this.start = function(){
		if(!this.iswrited) this.write();
		if(this.iswrited && !this.intervalID){
			this.intervalID = window.setInterval(this.name+".move()",this.speed);
		}
	}
}

function gotoRecent(media){
	if(media == 'sk'){
		MM_openBrWindow('http://economy.hankooki.com/QuickNews/NewsList.php?media='+media,'','width=1020,height=702');
	} else {
		MM_openBrWindow('http://www.hankooki.com/totallist/gisalist.php?media='+media,'','width=1024,height=710');
	}
}

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v;
  }
}
MM_reloadPage(true);

function ShowFlash(url, width, height){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
	document.write('<param name="movie" value="' + url + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" VALUE="transparent">');
	document.write('<param name="allowScriptAccess" value="always">');	
	document.write('<embed src="' + url + '"  wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowScriptAccess="always" width="' + width + '" height="' + height + '"></embed>');
	document.write('</object>');
}

function IframeResize(frameID,frameW,frameH)
{
	var reframe = eval("document.all." + frameID);
	if(frameW > 0) reframe.style.width = frameW;
	if(frameH > 0) reframe.style.height = frameH;
}

function AddChildFrame(div_name,frm_id,frm_url,frm_width,frm_height){
	addFrm = document.createElement("iframe");
	addFrm.setAttribute("id","frm_"+frm_id);
	addFrm.setAttribute("width",frm_width+"px");
	addFrm.setAttribute("height",frm_height+"px");
	addFrm.setAttribute("border", "0"); 
	addFrm.setAttribute("frameBorder", "0"); 
	addFrm.setAttribute("marginWidth", "0"); 
	addFrm.setAttribute("marginHeight", "0"); 
	addFrm.setAttribute("leftMargin", "0"); 
	addFrm.setAttribute("topMargin", "0"); 
	addFrm.setAttribute("allowtransparency", "true"); 
	addFrm.setAttribute("scrolling","no");
	addFrm.setAttribute("src",frm_url);
	eval("document.getElementById('"+div_name+"')").appendChild(addFrm);
}

function AddChildDiv(div_name,child_div_id,child_width,child_height){
	addDiv=document.createElement("div");
	addDiv.setAttribute("id",child_div_id);
	if(child_width>0){
		addDiv.setAttribute("width",child_width+"px");
	}if(child_height>0){
		addDiv.setAttribute("height",child_height+"px");
	}
	eval("document.getElementById('"+div_name+"')").appendChild(addDiv);
}

function AddChildScript(JsURL,LayerID){
	var script=document.createElement("script");
	script.type="text/javascript";
	if(script.readyState){
		script.onreadystatechange=function(){
			if(script.readyState=="loaded"||script.readyState=="complete"){
				script.onreadystatechange=null;eval("document.getElementById('"+LayerID+"')").innerHTML=poll_list;
			};
		};
	}else{
		script.onload=function(){eval("document.getElementById('"+LayerID+"')").innerHTML=poll_list;
	};
}
	script.src=JsURL;document.getElementsByTagName("head")[0].appendChild(script);
}

var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;
var i=0;input=Base64._utf8_encode(input);
while(i<input.length){
	chr1=input.charCodeAt(i++);
	chr2=input.charCodeAt(i++);
	chr3=input.charCodeAt(i++);
	enc1=chr1>>2;
	enc2=((chr1&3)<<4)|(chr2>>4);
	enc3=((chr2&15)<<2)|(chr3>>6);
	enc4=chr3&63;
	if(isNaN(chr2)){enc3=enc4=64;
}else if(isNaN(chr3)){
	enc4=64;}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);
}
return output;
},decode:function(input){
	var output="";
	var chr1,chr2,chr3;
	var enc1,enc2,enc3,enc4;
	var i=0;
	input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");
	while(i<input.length){
		enc1=this._keyStr.indexOf(input.charAt(i++));
		enc2=this._keyStr.indexOf(input.charAt(i++));
		enc3=this._keyStr.indexOf(input.charAt(i++));
		enc4=this._keyStr.indexOf(input.charAt(i++));
		chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);
		chr3=((enc3&3)<<6)|enc4;
		output=output+String.fromCharCode(chr1);
		if(enc3!=64){output=output+String.fromCharCode(chr2);
		}if(enc4!=64){output=output+String.fromCharCode(chr3);
		}
	}
	output=Base64._utf8_decode(output);
	output=encodeURI(output);
	output=output.replace("%00","");
	output=decodeURI(output);
	return output;},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");
	var utftext="";
	for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);
	if(c<128){utftext+=String.fromCharCode(c);
	}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);
	utftext+=String.fromCharCode((c&63)|128);
	}else{utftext+=String.fromCharCode((c>>12)|224);
	utftext+=String.fromCharCode(((c>>6)&63)|128);
	utftext+=String.fromCharCode((c&63)|128);}}return utftext;},_utf8_decode:function(utftext){var string="";
	var i=0;
	var c=c1=c2=0;
	while(i<utftext.length){c=utftext.charCodeAt(i);
	if(c<128){string+=String.fromCharCode(c);i++;
	}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);
	string+=String.fromCharCode(((c&31)<<6)|(c2&63));
	i+=2;
	}else{c2=utftext.charCodeAt(i+1);
	c3=utftext.charCodeAt(i+2);
	string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));
	i+=3;
	}
	}
	return string;
	}
}

function setDate(){
	this.weekDayname=new Array("(ÀÏ)","(¿ù)","(È­)","(¼ö)","(¸ñ)","(±Ý)","(Åä)");
	this.monthName=new Array("1","2","3","4","5","6","7","8","9","10","11","12");
	this.jCurDate=new Date();
	this.giYear=this.jCurDate.getFullYear();
	this.giMonth=this.jCurDate.getMonth();
	this.giDay=this.jCurDate.getDate();
	this.giWeek=this.jCurDate.getDay();
	this.innerDATE=function(){
		document.getElementById("szTime").innerHTML=this.giYear+"."+this.monthName[this.giMonth]+"."+this.giDay+".<span>"+this.weekDayname[this.giWeek]+"</span>";return true;}
	}

function Hki_GetCookie(NameCookie){
	var i=document.cookie.indexOf(NameCookie+'=');
	if(i!=-1){i+=NameCookie.length+1;NameEnd=document.cookie.indexOf(';',i);
	if(NameEnd==-1){
		NameEnd=document.cookie.length;
	}
	return unescape(document.cookie.substring(i,NameEnd));}else{return""}
}

function Hki_Login(HomeUrl,Path,LoginImg,LogoutImg,JoinImg,ModifyImg){
	Cookievalue=Hki_GetCookie('mlogin_cookie');
	var Cookie_idname=new Array();
	Cookie_idname=Cookievalue.split("|");
	var urls=location.host+location.pathname+location.search;
	urls=urls.replace(/&/g,"%26");
	if(Cookievalue!=""){
		document.writeln("<a href=\"https://login.hankooki.com/logout.php?mode=logout&home="+HomeUrl+"&path="+Path+"&url="+HomeUrl+"\" target=\"_top\"><img src=\""+LogoutImg+"\" alt=\"·Î±×¾Æ¿ô\" /></a>");
		document.writeln("<a href=\"https://login.hankooki.com/edit_member.php?path="+Path+"&home="+HomeUrl+"&url="+urls+"\" target=\"_top\"><img src=\""+ModifyImg+"\" alt=\"Á¤º¸¼öÁ¤\" /></a>");
	}else{
		document.writeln("<a href=\"https://login.hankooki.com/login.php?path="+Path+"&home="+HomeUrl+"&url="+urls+"\" target=\"_top\"><img src=\""+LoginImg+"\" alt=\"·Î±×ÀÎ\" /></a>");
		document.writeln("<a href=\"https://login.hankooki.com/agree.php?path="+Path+"&url="+urls+"\" target=\"_top\"><img src=\""+JoinImg+"\" alt=\"È¸¿ø°¡ÀÔ\" /></a>");
	}
}

var Agent = function () {var a = navigator.userAgent;function is(s,t) {return ((s||"").indexOf(t)>-1);}this.isWin = is(a,"Windows");this.isMac = is(a,"Macintosh");this.isOP = typeof window.opera != "undefined" || is(a,"Opera");this.isIE = !this.isOP && is(a,"MSIE");this.isFF = is(a,"Firefox");this.isCR = is(a,"Chrome");this.isSF = !this.isCR && is(a,"Apple");if (this.isIE) {var v = parseFloat(a.match(/MSIE ([0-9\.]+)/)[1]);if (isNaN(v)) this.isIE0 = true;if (6 <= v && v < 7) {this.isIE6 = true;return;} else if (7 <= v && v < 8) {this.isIE7 = true;return;} else if (5.5 <= v && v < 6) {this.isIE55 = true;return;} else if (v < 5.5) {this.isIE5 = true;this.isIE = false;return;} else if (8 <= v) {this.isIE8 = true;return;}}};
Agent.prototype = {support : function (i) {if (i===10) {return (this.isWin)&&(this.isIE && !this.isIE8) ? true : false ;} else if (i===20) {return (this.isWin)&&(this.isIE) ? true : false ;} else if (i===30) {return (this.isWin)&&(this.isIE || this.isCR) ? true : false ;} else if (i===40) {return (this.isWin)&&(this.isIE || this.isCR || this.isSF) ? true : false ;} else if (i===45) {return (this.isWin)&&(this.isIE || this.isSF || this.isOP) ? true : false ;} else if (i===50) {return (this.isWin)&&(this.isIE || this.isCR || this.isSF || this.isOP) ? true : false ;			} else if (i===60) {return (this.isWin)&&(this.isIE || this.isCR || this.isSF || this.isFF) ? true : false ;} else if (i===80) {return (this.isWin)&&(this.isIE || this.isFF || this.isCR || this.isSF || this.isOP) ? true : false ;} else if (i===90) {return (this.isIE || this.isFF || this.isCR || this.isSF || this.isOP) ? true : false ;			}return false;},hasFP : function() {if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){return true;}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(axo!=null) {return true;}}catch(e){}}return false;},dump : function() {document.write(navigator.userAgent +"<hr>");document.write("Win : " + this.isWin +"<br>");document.write("Mac : " + this.isMac +"<br>");document.write("IE : " + this.isIE +"<br>");document.write("IE0 : " + this.isIE0 +"<br>");document.write("IE5 : " + this.isIE5 +"<br>");document.write("IE55 : " + this.isIE55 +"<br>");document.write("IE6 : " + this.isIE6 +"<br>");document.write("IE7 : " + this.isIE7 +"<br>");document.write("IE8 : " + this.isIE8 +"<br>");document.write("FF : " + this.isFF +"<br>");document.write("CR : " + this.isCR +"<br>");document.write("SF : " + this.isSF +"<br>");document.write("OP : " + this.isOP +"<br>");}};
var isFlash = (new Agent()).hasFP();
