


function _ID(obj){return parent.document.getElementById(obj)}
function _IDD(obj){return parent.document.getElementById(obj)}



function popupLayer(s,w,h)
{
	if (!w) w = 600;
	if (!h) h = 400;

	var pixelBorder = 0;
	var titleHeight = 0;
	w += pixelBorder * 0;
	h += pixelBorder * 0 + titleHeight;

	var bodyW = document.documentElement.clientWidth;
	var bodyH = document.documentElement.clientHeight;

	var posX = (bodyW - w) / 2;
	var posY = (bodyH - h) / 2;

	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = 0;
		top = 0;
		width = "100%";
		height = document.documentElement.scrollHeight;
		backgroundColor = "#000000";
		filter = "Alpha(Opacity=70)";
		opacity = "0.5";
	}
	obj.id = "objPopupLayerBg";
	document.body.appendChild(obj);

	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = document.documentElement.clientWidth / 5;
		top = document.documentElement.clientHeight / 9;
		width = w;
		height = h;
		backgroundColor = "#FFFFFF";
		border = "0px solid #000000";
	}
	obj.id = "objPopupLayer";
	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 = "2px 0 0 0";
		textAlign = "right";
		backgroundColor = "#000000";
		color = "#ffffff";
		font = "bold 11px tahoma";
	}
	bottom.innerHTML = "<a href='javascript:closeLayer()'><font color='#FFFFFF'>Ã¢´Ý±â</font></a>&nbsp;&nbsp;&nbsp;";
	obj.appendChild(bottom);
*/
	var ifrm = document.createElement("iframe");
	with (ifrm.style){
		width = w;
		height = h;
	}
	ifrm.frameBorder = 0;
	ifrm.src = s;
	obj.appendChild(ifrm);
}

	function closeLayer(){

		_ID('objPopupLayer').parentNode.removeChild( _ID('objPopupLayer') );
		_IDD('objPopupLayerBg').parentNode.removeChild( _IDD('objPopupLayerBg') );
	}






//<![CDATA[
function Flash(id,url,w,h,bg,t){
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+" />\
<param name='wmode' value="+t+" />\
<param name='bgcolor' value="+bg+" />\
<param name='allowScriptAccess' value='sameDomain' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" wmode="+t+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}
//]]>


/* iframe */

function clickMouse(idx) //this, 1
{
    var menuimg = [
                    {off:"/img/contact/tab01_off.gif", on:"/img/contact/tab01_on.gif"},
                    {off:"/img/contact/tab01_off.gif", on:"/img/contact/tab01_on.gif"},
                    {off:"/img/contact/tab02_off.gif", on:"/img/contact/tab02_on.gif"},
                  ];

    var count = document.getElementById("parent_tabmenu").getElementsByTagName("img").length;

    for(var i=0; i<count; i++){

        var ii = i + 1;
        var ig = document.getElementById("ig" + ii);

        if(ii == idx){
            ig.setAttribute("src", menuimg[ii].on);
            ig.blur(); 
        }
        else{
            ig.setAttribute("src", menuimg[ii].off);
        }
    }
}

function clickMouse1(idx) //this, 1
{
    var menuimg = [
					{off:"/img/industry/mono_tab.gif", on:"/img/industry/mono_tab_over.gif"},
					{off:"/img/industry/mono_tab.gif", on:"/img/industry/mono_tab_over.gif"},
					{off:"/img/industry/multi_tab.gif", on:"/img/industry/multi_tab_over.gif"},
                  ];

    var count = document.getElementById("parent_tabmenu").getElementsByTagName("img").length;

    for(var i=0; i<count; i++){

        var ii = i + 1;
        var ig = document.getElementById("ig" + ii);

        if(ii == idx){
            ig.setAttribute("src", menuimg[ii].on);
            ig.blur(); 
        }
        else{
            ig.setAttribute("src", menuimg[ii].off);
        }
    }
}


    function doResize()     
{ 
  insur.height = insur_inner.document.body.scrollHeight;
  insur.width = insur_inner.document.body.scrollWidth;
} 




function bluring(){ 
    if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 


function calcHeight(FrameName) 
{
  var the_height= document.getElementById(FrameName).contentWindow.document.body.clientHeight; 
document.getElementById(FrameName).height=the_height; 
} 

function showMovie(){
	var width = 640;
	var height = 360;
	var left = ((screen.width - width) / 2);
	var top = ((screen.height - height) / 2);
	var toolbar = 'no';
	var menubar = 'no';
	var status = 'no';
	var scrollbars = 'no';
	var resizable = 'no';
	var pOpt = 'left='+left+', top='+top+', width='+width+', height='+height+', toolbar='+toolbar+', menubar='+menubar+', status='+status+', scrollbars='+scrollbars+', resizable='+resizable;
	window.open("/popup/091117_movie.html", "popRate", pOpt);
}