

function popyes24()
{
	url = "http://www.ilikeclick.com/track/click.php?dts_code=100372870020268022000013304000000000000&DTS_UID=";
	popframe(url);
}


function popframe(url)
{
	url = encodeURIComponent(url);
	window.open("/yframe.html?yurl="+url);
}





// ·Ñ¿À¹ö

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_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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// ¸ðµç ¸µÅ©¿Í img ÅÂ±×¿¡ onfocus=blur() Ã³¸®
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
//document.onfocusin=bluring; 


/*
IE Flash ActiveContent Activation Script
Method: FlashObject
 Param1: SWF path
 Param2: Movie width
 Param3: Movie height
 Param4: BGColor
 Param5: Flashvars (Optional)
*/



function FlashObject(swf, width, height, bgcolor, id, flashvars)
{
    var strFlashTag = new String();
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
		//ÀÍ½º
        strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
        strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
        strFlashTag += '<param name="movie" value="' + swf + '"/>';
        
        if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
        strFlashTag += '<param name="quality" value="best"/>';
        strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
        strFlashTag += '<param name="menu" value="false"/>';
        strFlashTag += '<param name="salign" value="LT"/>';
        strFlashTag += '<param name="scale" value="noscale"/>';
        strFlashTag += '<param name="wmode" value="transparent"/>';
        strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
        strFlashTag += '</object>';
    }
    else
    {
    	//ÆÄÆø
        strFlashTag += '<embed src="' + swf + '" ';
        strFlashTag += 'quality="best" ';
        strFlashTag += 'bgcolor="' + bgcolor + '" ';
        strFlashTag += 'width="' + width + '" ';
        strFlashTag += 'height="' + height + '" ';
        strFlashTag += 'menu="false" ';
        strFlashTag += 'scale="noscale" ';
        strFlashTag += 'id="' + id + '" ';
        strFlashTag += 'salign="LT" ';
         //strFlashTag += 'wmode="transparent" ';
        strFlashTag += 'allowScriptAccess="sameDomain" ';
        if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
        strFlashTag += 'type="application/x-shockwave-flash" ';
        strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        strFlashTag += '</embed>';
    }

 document.write(strFlashTag);
}

function popsite(ina)
{
	if(ina)window.open(ina);
}


//º£³Ê¸ðµâ
var js_rolling = function(box){
	// ½Ã°£´ÜÀ§´Â ms·Î 1000ÀÌ 1ÃÊ
	if(box.nodeType==1){
		this.box = box;
	}else{
		this.box = document.getElementById(box);
	}
	this.is_rolling = false;
	this.mouseover_pause = true;
	this.direction = 1; //1:top, 2:right, 3:bottom, 4:left (½Ã°è¹æÇâ) // 1¹ø°ú 4¹ø¸¸ µÊ
	this.children =	null;
	this.move_gap = 1;	//¿òÁ÷ÀÌ´Â ÇÈ¼¿´ÜÀ§
	this.time_dealy = 100; //¿òÁ÷ÀÌ´Â Å¸ÀÓµô·¹ÀÌ
	this.time_dealy_pause = 1000;//ÇÏ³ªÀÇ ´ë»óÀÌ »õ·Î ½ÃÀÛÇÒ ¶§ ¸ØÃß´Â ½Ã°£, 0 ÀÌ¸é Àû¿ë ¾ÈÇÔ
	this.time_timer=null;
	this.time_timer_pause=null;
	this.mouseover=false;
	this.init();
	this.set_direction(this.direction);
}
js_rolling.prototype.init = function(){
	this.box.style.position='relative';
	this.box.style.overflow='hidden';
	var children = this.box.childNodes;
	for(var i=(children.length-1);0<=i;i--){
		if(children[i].nodeType==1){
			children[i].style.position='relative';
		}else{
			this.box.removeChild(children[i]);
		}
	}
	var thisC=this;

	this.box.onmouseover=function(){
		if(!thisC.mouseover_pause){	return;	}
		thisC.mouseover=true;
		if(!thisC.time_timer_pause){
			thisC.pause();
		}
	}
	this.box.onmouseout=function(){
		if(!thisC.mouseover_pause){return;}
		thisC.mouseover=false;
		if(!thisC.time_timer_pause){
			thisC.resume();
		}
	}	
}
js_rolling.prototype.set_direction = function(direction){
	this.direction=direction;
	if(this.direction==2 ||this.direction==4){
		this.box.style.whiteSpace='nowrap';
	}else{
		this.box.style.whiteSpace='normal';
	}
	var children = this.box.childNodes;
	for(var i=(children.length-1);0<=i;i--){
			if(this.direction==1){
				children[i].style.display='block';
			}else if(this.direction==2){
				children[i].style.textlign='right';
				children[i].style.display='inline';
			}else if(this.direction==3){
				children[i].style.display='block';
			}else if(this.direction==4){
				children[i].style.display='inline';
			}
	}
	this.init_element_children();	
}
js_rolling.prototype.init_element_children = function(){
	var children = this.box.childNodes;
	this.children = children;
	for(var i=(children.length-1);0<=i;i--){
			if(this.direction==1){
				children[i].style.top='0px';
			}else if(this.direction==2){
				children[i].style.left='-'+this.box.firstChild.offsetWidth+'px';
			}else if(this.direction==3){
				children[i].style.top='-'+this.box.firstChild.offsetHeight+'px';
			}else if(this.direction==4){
				children[i].style.left='0px';
			}
	}
}
js_rolling.prototype.act_move_up = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.top=(parseInt(child.style.top)-this.move_gap)+'px';
	}
	if((this.children[0].offsetHeight+parseInt(this.children[0].style.top))<=0){
		this.box.appendChild(this.children[0]);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_up = function(){
	if(this.direction!=1&&this.direction!=3){return false;}
	this.box.appendChild(this.children[0]);
	this.init_element_children();
	this.pause_act();	
}
js_rolling.prototype.act_move_down = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.top=(parseInt(child.style.top)+this.move_gap)+'px';
	}
	if(parseInt(this.children[0].style.top)>=0){
		this.box.insertBefore(this.box.lastChild,this.box.firstChild);
		this.init_element_children();
		this.pause_act();	
	}
}
js_rolling.prototype.move_down = function(){
	if(this.direction!=1&&this.direction!=3){return false;}	
	this.box.insertBefore(this.box.lastChild,this.box.firstChild);
	this.init_element_children();
	this.pause_act();
}
js_rolling.prototype.act_move_left = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.left=(parseInt(child.style.left)-this.move_gap)+'px';
	}
	if((this.children[0].offsetWidth+parseInt(this.children[0].style.left))<=0){
		this.box.appendChild(this.box.firstChild);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_left = function(){
	if(this.direction!=2&&this.direction!=4){return false;}		
	this.box.appendChild(this.box.firstChild);
	this.init_element_children();
	this.pause_act();		
}
js_rolling.prototype.act_move_right = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.left=(parseInt(child.style.left)+this.move_gap)+'px';
	}
	
	if(parseInt(this.box.lastChild.style.left)>=0){
		this.box.insertBefore(this.box.lastChild,this.box.firstChild);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_right = function(){
	if(this.direction!=2&&this.direction!=4){return false;}			
	this.box.insertBefore(this.box.lastChild,this.box.firstChild);
	this.init_element_children();
	this.pause_act();
}
js_rolling.prototype.start = function(){ //·Ñ¸µ ½ÃÀÛ
	var thisC = this;
	this.stop();
	this.is_rolling = true;
	var act = function(){
		if(thisC.is_rolling){
			if(thisC.direction==1){thisC.act_move_up();}
			else if(thisC.direction==2){thisC.act_move_right();}
			else if(thisC.direction==3){thisC.act_move_down();}
			else if(thisC.direction==4){thisC.act_move_left();}
		}
	}
	this.time_timer = setInterval(act,this.time_dealy);
}
js_rolling.prototype.pause_act = function(){ //ÀÏ½Ã µ¿ÀÛ
	if(this.time_dealy_pause){
		var thisC = this;
		var act = function(){thisC.resume();thisC.time_timer_pause=null;}
		if(this.time_timer_pause){clearTimeout(this.time_timer_pause);}
		this.time_timer_pause = setTimeout(act,this.time_dealy_pause);
		this.pause();
	}
}
js_rolling.prototype.pause = function(){ //ÀÏ½Ã ¸ØÃã
	this.is_rolling = false;
}
js_rolling.prototype.resume = function(){ //ÀÏ½Ã ¸ØÃã ÇØÁ¦
	if(!this.mouseover){
		this.is_rolling = true;
	}
}
js_rolling.prototype.stop = function(){ //·Ñ¸µÀ» ³¡³¿
	this.is_rolling = false;
	if(!this.time_timer){
		clearInterval(this.time_timer);
	}
	this.time_timer = null
}

function to_top(no){
	if(!no)	return false;
	if(no==1){
		roll1.pause();
		roll1.direction=1;
		roll1.resume();
	}

}

function to_bottom(no){
	if(!no)	return false;
	if(no==1){
		roll1.pause();
		roll1.direction=3;
		roll1.resume();
	}
}

function to_left(no){
	if(!no)	return false;
	if(no==1){
		roll2.pause();
		roll2.direction=4;
		roll2.resume();
	}

}

function to_right(no){
	if(!no)	return false;
	if(no==1){
		roll2.pause();
		roll2.direction=2;
		roll2.resume();
	}
}

function to_top(no){
	if(!no)	return false;
	if(no==1){
		roll1.pause();
		roll1.direction=1;
		roll1.resume();
	}

}

function to_bottom(no){
	if(!no)	return false;
	if(no==1){
		roll1.pause();
		roll1.direction=3;
		roll1.resume();
	}
}

function to_left(no){
	if(!no)	return false;
	if(no==1){
		roll2.pause();
		roll2.direction=4;
		roll2.resume();
	}

}

function to_right(no){
	if(!no)	return false;
	if(no==1){
		roll2.pause();
		roll2.direction=2;
		roll2.resume();
	}
}



function winOpen(url, name, scroll, resize) {
	if(url) window.open(url, name, 'width=100,height=100,scrollbars='+scroll+',resizable='+resize);
}








/** ===========================================================================
Return :
Comment: Popup
Usage  :
------------------------------------------------------------------------------*/
function onPopup( fileName, winName, winWidth, winHeight, Scroll )
{

var	winPosLeft = (screen.width - winWidth) / 2;
var	winPosTop = (screen.height - winHeight) / 2;
var	winOpt = "width="+ winWidth +", height="+ winHeight +", top="+ winPosTop +", left="+ winPosLeft +", scrollbars="+ Scroll +", menubar=No, resizable=No, status=No, toolbar=No";

var	Wins = window.open(fileName, winName, winOpt + "");

	Wins.focus();

}


function viewImg( path, img )
{

var url = "/main/image_pop?mode=Imgview&path="+ path +"&img=" + img;

	onPopup( url, "viewImg", "100", "100", "no" )

}


function goPrint( mode, type, nums )
{

var url = "/request/?mode="+ mode +"&type="+ type +"&nums="+ nums;

	onPopup( url, "Print", "100", "100", "Yes" )

}


function onClose( val )
{

	if(opener)
		opener.focus();

	self.window.close();

}


/** ===========================================================================
Return :
Comment: Resize
Usage  :
------------------------------------------------------------------------------*/
function onResize()
{

var	eleBody       = document.body;
var	intBodyWidth  = eleBody.scrollWidth;
var	intBodyHeight = eleBody.scrollHeight;

	if(new RegExp(/MSIE/).test(navigator.userAgent)) {
		if(navigator.appName.charAt(0) == "M" && navigator.appVersion.charAt(0) == 4 && (navigator.appVersion.indexOf("MSIE 7") == -1)) {
		} else {	// ºê¶ó¿ìÀú 7
			margin_height = intBodyHeight + 43;
		}
	}

	intBodyHeight   = (intBodyHeight > screen.availHeight) ? screen.availHeight - 50 : intBodyHeight;
	intBodyWidth    = (intBodyWidth > screen.availWidth) ? screen.availWidth - 50 : intBodyWidth;

	eleBody.oncontextmenu = function() { return false };
	eleBody.ondreagstart  = function() { return false };
	eleBody.onselectstart = function() { return false };

	window.resizeTo(intBodyWidth + 10, intBodyHeight + 49);

}
