/*show hide 贸府*/

function show(id) {
	document.getElementById(id).style.visibility="visible"; 
}

function hide(id) {
document.getElementById(id).style.visibility="hidden";
}

function show2(id) {
	document.getElementById(id).style.display="block"; 
}

function hide2(id) {
	document.getElementById(id).style.display="none"; 
}

/* 其捞靛牢/酒眶 贸府 */
var baseopacity=0

/****************** show ***************************/
function l_filter(objt){
    if (!document.getElementById)
        return
        textcontainerobj=document.getElementById(objt)
        browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
        instantset(baseopacity)
        //document.getElementById("tabledescription").innerHTML=thetext
        highlighting=setInterval("gradualfade(textcontainerobj)",80)
}

function instantset(degree){
    if (browserdetect=="mozilla")
        textcontainerobj.style.MozOpacity=degree/100
    else if (browserdetect=="ie")
        textcontainerobj.filters.alpha.opacity=degree
    //else if (document.getElementById && baseopacity==0)
        //document.getElementById("tabledescription").innerHTML=""
}

function gradualfade(cur2){
    if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
        cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
    else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
        cur2.filters.alpha.opacity+=20
    else if (window.highlighting)
    clearInterval(highlighting)
}

var baseopacity2=100
/****************** hide ***************************/
function l_filter2(objt){
    if (!document.getElementById)
        return
        textcontainerobj=document.getElementById(objt)
        browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
        instantset2(baseopacity2)
        highlighting=setInterval("gradualfade2(textcontainerobj)",40)
}

function instantset2(degree){
    if (browserdetect=="mozilla")
        textcontainerobj.style.MozOpacity=degree/100
    else if (browserdetect=="ie")
        textcontainerobj.filters.alpha.opacity=degree
}

function gradualfade2(cur2){
    if (browserdetect=="mozilla" && cur2.style.MozOpacity>0)
        cur2.style.MozOpacity=Math.max(parseFloat(cur2.style.MozOpacity)-0.2, 0.01)
    else if (browserdetect=="ie" && cur2.filters.alpha.opacity>0)
        cur2.filters.alpha.opacity-=20
    else if (window.highlighting)
    clearInterval(highlighting)

	if (cur2.filters.alpha.opacity == 0)
	{
		cur2.style.visibility="hidden";
	}
}



function lHeight()
{
	/*if (document.documentElement.scrollHeight)
	{
		scrollY = document.documentElement.scrollHeight;
		alert('test');
	}
	else if (document.body.offsetHeight)
	{
		scrollY = document.body.offsetHeight;
	}
	else if (document.body.scrollHeight)
	{
		scrollY = document.body.scrollHeight;
	}*/
	scrollX = document.documentElement.scrollWidth;
	scrollY = document.documentElement.scrollHeight;
	
	var htmlDiv = "<div id='dimd2' style='position:absolute; background:#000000; overflow:hidden; width:"+scrollX+"px; filter:alpha(opacity=50); -moz-opacity:0.5; z-index:10000; height:"+scrollY+"px;'></div>";
	document.getElementById('dimdw').innerHTML = htmlDiv;
	dHeight = scrollY;
	//rLb_h();
	//alert(dHeight);
}

/* height size */
function rLb_h()
{
	document.getElementById('dimd2').style.width = document.documentElement.scrollWidth;
	document.getElementById('dimd2').style.height = document.documentElement.scrollHeight;	
}

//do_rLb_h();

function chd()
{
	var htmlDiv = "";
	document.getElementById('dimdw').innerHTML = htmlDiv;
}

var fl_h;
/*function do_rf_h()
{
	//windowHeight = document.documentElement.clientHeight;
	setInterval("chk_f_h()",20);
}*/

function chk_f_h()
{
	windowHeight = document.documentElement.clientHeight;
	fl_h = windowHeight - 80;
}
chk_f_h();

//iframe include
function lp_if_inc(lp_val)
{
	//document.getElementById('lp_detail').src="http://www.naver.com";
	var html_inc = "<iframe id='lp_detail' scrolling='auto' frameborder='0' src='"+lp_val+"' allowtransparency='true' class='scroll_g' width='1000' height='421'></iframe>";
	document.getElementById('detail_fr').innerHTML = html_inc;
}

//popup
function d_p_m()
{
	var w_div = "<div style='width:100%; height:100%; position:absolute; top:0; left:0; overflow:hidden;'><div id='dimd'></div></div>";
	document.getElementById('w_l').innerHTML = w_div;
}
