function _ID(obj){return document.getElementById(obj)}

// Å¸ÀÌÆ²
document.title="±¹³» ÃÖ´ëÀÇ Åø·¹Ä³¸®¾î Àü¹® ¼îÇÎ¸ô! THULECARRIER.COM";

// Æ÷Ä¿½º
function allblur() {
  for (i = 0; i < document.links.length; i++)
	document.links[i].onfocus = document.links[i].blur;
}

// ·Ñ¿À¹ö
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_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; }
}

// »õÃ¢ ¶Ù¿ì±â

var win2;
//¿ÀÇÂ À©µµ¿ì
function winOpen(f, w, h) {    
   	if(!win2 || win2.closed){
	   	win2 = window.open(f,"win2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+w+",height="+h);   
   	}
   	else
    {
	    win2.close();
	   	win2 = window.open(f,"win2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+w+",height="+h);   
	    win2.focus();
    }
}

function Web_Flash(url,fwidth,fheight,f_opt,restartValue){ //
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ fwidth +'" height="'+ fheight +'">');
 document.write('<param name="movie" value="'+ url +'">');
 document.write('<param name="quality" value="high">');
 document.write('<param name="FlashVars" value="restart=' + restartValue + '">');
 document.write('<param name="menu" value="0">');
 if (f_opt=="tr"){
  document.write('<param name="wmode" value="transparent">');
 } else { document.write('<param name="wmode" value="opaque">'); }
 document.write('<embed src="'+ url +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ fwidth +'" height="'+ fheight +'">');
 document.write('</embed>');
 document.write('</object>'); 
}
function view_popflash(restartValue,http_type) { 
var restartValue;
var http_type; 
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + http_type + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="630" height="460">');
document.write('<param name="quality" value="high"><param name="FlashVars" value="restart=' + restartValue + '"><param name="menu" value="0">');
document.write('<param name="wmode" value="transparent"></object>');
}

function FlashObject(swf, width, height, 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" width="' + width + '" height="' + height + '">';
        strFlashTag += '<param name="movie" value="' + swf + '"/>';        
        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 += 'salign="LT" ';
        strFlashTag += 'wmode="transparent" ';
        strFlashTag += 'allowScriptAccess="sameDomain" ';
        strFlashTag += '<param name="FlashVars" value="' + flashvars + '"/>';
        strFlashTag += 'type="application/x-shockwave-flash" ';
        strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        strFlashTag += '</embed>';
    }

 document.write(strFlashTag);
}


/*** ·¹ÀÌ¾î ÆË¾÷Ã¢ ¶ç¿ì±â ***/
function popupLayer(s,w,h)
{
	if (!w) w = 600;
	if (!h) h = 400;

	var pixelBorder = 3;
	var titleHeight = 12;
	w += pixelBorder * 2;
	h += pixelBorder * 2 + titleHeight;

	var bodyW = document.body.clientWidth;
	var bodyH = document.body.clientHeight;

	var posX = (bodyW - w) / 2;
	var posY = (bodyH - h) / 2;

	hiddenSelectBox('hidden');
	//hiddenDiv('hidden');

	/*** ¹é±×¶ó¿îµå ·¹ÀÌ¾î ***/
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = 0;
		top = 0;
		width = "100%";
		height = document.body.scrollHeight;
		backgroundColor = "#000000";
		filter = "Alpha(Opacity=80)";
		opacity = "0.5";

	}
	obj.id = "objPopupLayerBg";
	obj.style.zIndex = "300";
	obj.innerHTML = "<div style='position:absolute;width:100%; height=100%' onclick='javascript:closeLayer();'></div>";
	document.body.appendChild(obj);

	/*** ³»¿ëÇÁ·¹ÀÓ ·¹ÀÌ¾î ***/
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = posX + document.body.scrollLeft;
		top = posY + document.body.scrollTop;
		width = w;
		height = h+8;
		backgroundColor = "#ffffff";
		border = "3px solid #FF0000";
	}
	obj.id = "objPopupLayer";
	obj.style.zIndex = "400";
//	obj.innerHTML = "<div width=500 height=500 onclick=javascript:closeLayer()></div>";
	obj.innerHTML = "<div style='position:absolute;width:550; height=600'><table width=550 height=600 cellpadding=0 cellspacing=0 border=0><tr><td width=550 height=600  onclick='javascript:closeLayer();' style='cursor:hand'></td></tr></table></div>";
	document.body.appendChild(obj);

	/*** Å¸ÀÌÆ²¹Ù ·¹ÀÌ¾î ***/
	var bottom = document.createElement("div");
	with (bottom.style){
		position = "absolute";
		width = w - pixelBorder * 2;
		height = titleHeight;
		left = 0;
		top = h - titleHeight - pixelBorder * 3;
		padding = "4px 0 5px 0";
		textAlign = "center";
		backgroundColor = "#FF0000";
		color = "#ffffff";
		font = "bold 11pt tahoma; padding:10px 0;";
		
	}
	bottom.innerHTML = "<a href='javascript:closeLayer()' class='white'>£Ø close</a>";
	obj.appendChild(bottom);

	/*** ¾ÆÀÌÇÁ·¹ÀÓ ***/
	var ifrm = document.createElement("iframe");
	with (ifrm.style){
		width = w - 6;
		height = h - pixelBorder * 2 - titleHeight - 3;
		//border = "3 solid #000000";
	}
	ifrm.frameBorder = 0;
	ifrm.src = s;
	//ifrm.className = "scroll";
	obj.appendChild(ifrm);
}
function closeLayer()
{
	hiddenSelectBox('visible');
	hiddenDiv('visible');
	_ID('objPopupLayer').parentNode.removeChild( _ID('objPopupLayer') );
	_ID('objPopupLayerBg').parentNode.removeChild( _ID('objPopupLayerBg') );
}
function hiddenSelectBox(mode)
{
	var obj = document.getElementsByTagName('select');
	for (i=0;i<obj.length;i++){
		obj[i].style.visibility = mode;
	}
}
function hiddenDiv(mode)
{
	var obj = document.getElementsByTagName('div');
	for (i=0;i<obj.length;i++){
		obj[i].style.visibility = mode;
	}
}

function hidemenu() { 
	top_menu.style.zIndex = "1";
} 

function showmenu() { 
	top_menu.style.zIndex = "100";
} 

var ifrContentsTimer;
function resizeRetry()
{ 
    if(document.body.readyState == "complete")
    { 
       clearInterval(ifrContentsTimer); 
    }
    else
    { 
       resizeFrame(); 
    } 
} 
function resizeFrame()
{  
    var h = parseInt(document.body.scrollHeight)+10;
    self.resizeTo(document.body.scrollWidth + (document.body.offsetWidth-document.body.clientWidth), h); 
} 
