
//img
function imageOver(obj) {
	obj.src = obj.src.replace("off.gif", "on.gif");
}
function imageOut(obj) {
	obj.src = obj.src.replace("on.gif", "off.gif");
}

// Tag
function menushow() {
	document.getElementById("Lmenu1").style.display = "block";	
	document.getElementById("Lmenu2").style.display = "none";
}
function menuhidden() {
	document.getElementById("Lmenu1").style.display = "none";
	document.getElementById("Lmenu2").style.display = "block";
}

function Pcshow(){
    document.getElementById("tb1").style.display = "block";
    document.getElementById("tb2").style.display = "none";	
    document.getElementById("tb3").style.display = "block";
    document.getElementById("tb4").style.display = "block";
    //document.getElementById("contry").style.display = "block";
	try {
	    document.getElementById("kind").value ="PCR";
	} catch(e) { }
    document.getElementById("ddlCountry").value="";
    
    document.getElementById("ddlcirc").value="";
    document.getElementById("ddlposi").value="";
    document.getElementById("ddltype").value="";    
    document.getElementById("ddlStyle").value="";    
    
    document.getElementById("ddlWidthPCR").value="";
    document.getElementById("ddlAspectRatioPCR").value="";
    document.getElementById("ddlRimSizePCR").value="";  
    document.getElementById("ddlRimSizeTBR").value="";
    
    
}

function Tbshow(){
    document.getElementById("tb1").style.display = "none";
    document.getElementById("tb2").style.display = "block";
    document.getElementById("tb3").style.display = "none";
    document.getElementById("tb4").style.display = "none";	
    document.getElementById("contry").style.display = "none";
    document.getElementById("kind").value ="TBR";
    document.getElementById("ddlCountry").value="";
    
    document.getElementById("ddlcirc").value="";
    document.getElementById("ddlposi").value="";
    document.getElementById("ddltype").value="";    
    document.getElementById("ddlStyle").value="";   
    
    document.getElementById("ddlWidthPCR").value="";
    document.getElementById("ddlAspectRatioPCR").value="";
    document.getElementById("ddlRimSizePCR").value="";
    document.getElementById("ddlRimSizeTBR").value="";
    
}

//product_tab
function funcChange(objNum) {	  
	for(i=0;i<2;i++) {          
		if(objNum==i) {
			document.getElementById("protab"+i).style.display = "block";               
		} else {              
			document.getElementById("protab"+i).style.display = "none";
		}
	}
}
function funcChange2(objNum) {	  
	for(i=0;i<4;i++) {          
		if(objNum==i) {
			document.getElementById("Vtab"+i).style.display = "block";               
		} else {              
			document.getElementById("Vtab"+i).style.display = "none";
		}
	}
}
function funcChange3(objNum) {	
    
	for(i=0;i<4;i++) 
	{          
		if(objNum==i) {
			document.getElementById("Ptab"+i).style.display = "block";               
		} else {              
			document.getElementById("Ptab"+i).style.display = "none";
		}
	}
}
function funcChange4(objNum) {	  
	for(i=0;i<4;i++) {          
		if(objNum==i) {
			document.getElementById("Ttab"+i).style.display = "block";               
		} else {              
			document.getElementById("Ttab"+i).style.display = "none";
		}
	}
}
function funcChange5(objNum) {	
    
	for(i=0;i<4;i++) 
	{          
		if(objNum==i) {
			document.getElementById("Ptab2"+i).style.display = "block";               
		} else {              
			document.getElementById("Ptab2"+i).style.display = "none";
		}
	}
}
// view popup
function viewshow() {
	document.getElementById("viewbox").style.display = "block";	
}
function viewhidden() {
	document.getElementById("viewbox").style.display = "none";
}

// footer coor network
function coorNetwork(){
	var net = document.getElementById('footerNetwork');
	var obj = net.getElementsByTagName('dd');
	for( i = 0; i <= obj.length-1; i ++ ) {
		if (obj[i].className=='on') obj[i].className='';
		else obj[i].className='on';
	}
}

// Top scroll
function getPosition(){
	var start, end, scale, term;
	start = parseInt (document.getElementById('dvquick').style.top, 10);
	end = document.documentElement.scrollTop + 400;
	term = 5;

	if ( start != end ) {
	scale = Math.ceil( Math.abs( end - start ) / 20 );
		if ( end < start )	scale = -scale;
		document.getElementById('dvquick').style.top = parseInt (document.getElementById('dvquick').style.top, 10)+ scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
}
function moveBanner() {
	document.getElementById('dvquick').style.top = document.documentElement.scrollTop + 400 + "px";
	getPosition();
	return true;
}

// Flash 
// url - 경로 , w - 넓이 , h - 높이 , bg - 배경색 , t - 투명도 , code - 함수 , id - 네임
function FlashLoad(url,w,h,bg,t,code,id){
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width="+w+" height="+h+" id="+id+">");
document.write("<param name='movie' value="+url+ "?" + code + " />");
document.write("<param name='wmode' value="+t+" />");
document.write("<param name='bgcolor' value="+bg+" />");
document.write("<param name='allowScriptAccess' value='sameDomain' />");
document.write("<param name='quality' value='high' />");
document.write("<param name='menu' value='false' />");
//document.write("<param name='flashVars' value='&"+code+"' />");
document.write("<embed src="+url+ "?" + code + " width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' wmode='"+t+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.write("</object>");
}
//media
function mplayerprint(id,src,width,height)
{
 document.write('<object id="'+id+'" width="'+width+'" height="'+height+'" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" name="MediaPlayer" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
 document.write('<param name="src" value="'+src+'" />');

 document.write('<PARAM NAME="AnimationAtStart"         value="0">');
 document.write('<PARAM name="CurrentPosition"          value="0">');
 document.write('<PARAM name="DisplaySize"              value="0">');
 document.write('<param name="DisplayBackColor"         value="1">');
 document.write('<PARAM name="EnableFullScreenControls" value="1">');
 document.write('<PARAM name="ShowControls"             value="0">');
 document.write('<PARAM name="ShowTracker"              value="1">');
 document.write('<PARAM name="ShowAudioControls"        value="1">');
 document.write('<PARAM name="ShowStatusBar"            value="0">');
 document.write('<PARAM name="ShowDisplay"              value="0">');
 document.write('<PARAM name="ShowTracker"              value="1">');
 document.write('<PARAM name="ShowCaptioning"           value="0">');
 document.write('<PARAM name="ShowPositionControls"     value="0">');
 document.write('<PARAM name="SetCurrentEntry"          value="1">');
 document.write('<PARAM name="ClickToPlay"              value="1">');
 document.write('<PARAM name="AutoSize"                 value="1">');
 document.write('<PARAM NAME="TransparentAtStart"      value="-1">');
 document.write('<PARAM name="AutoStart"                value="1">');
 document.write('<PARAM name="AutoResize"               value="1">');
 document.write('<PARAM name="EnableContextMenu"        value="0">');
 document.write('<PARAM name="volume"                   value="1">');
 document.write(' <!--[if !IE]>  <--> ');
 document.write(' <object data="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" type="application/x-mplayer2" id="'+id+'" width="'+width+'" height="'+height+'">');
 document.write(' <param name="src" value="'+src+'" />');
 document.write('<PARAM NAME="AnimationAtStart"         value="0">');
 document.write('<PARAM name="CurrentPosition"          value="0">');
 document.write('<PARAM name="DisplaySize"              value="0">');
 document.write('<param name="DisplayBackColor"         value="1">');
 document.write('<PARAM name="EnableFullScreenControls" value="1">');
 document.write('<PARAM name="ShowControls"             value="0">');
 document.write('<PARAM name="ShowTracker"              value="1">');
 document.write('<PARAM name="ShowAudioControls"        value="1">');
 document.write('<PARAM name="ShowStatusBar"            value="0">');
 document.write('<PARAM name="ShowDisplay"              value="0">');
 document.write('<PARAM name="ShowTracker"              value="1">');
 document.write('<PARAM name="ShowCaptioning"           value="0">');
 document.write('<PARAM name="ShowPositionControls"     value="0">');
 document.write('<PARAM name="SetCurrentEntry"          value="1">');
 document.write('<PARAM name="ClickToPlay"              value="1">');
 document.write('<PARAM name="AutoSize"                 value="1">');
 document.write('<PARAM NAME="TransparentAtStart"      value="-1">');
 document.write('<PARAM name="AutoStart"                value="1">');
 document.write('<PARAM name="AutoResize"               value="1">');
 document.write('<PARAM name="EnableContextMenu"        value="0">');
 document.write('<PARAM name="volume"                   value="1">');

 document.write(' </object> ');
 document.write(' <!--> <![endif]-->');
 document.write('</object>');
}
/* 플래시 호출 함수 #############################################################################*/

/*  */
function Flash(url,w,h,bg,t,pn1,pn2,id) {
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,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' />\
<param name='flashVars' value='&pageNum="+pn1+"&SubNum="+pn2+"' />\
<embed src='"+url+"' FlashVars='&pageNum="+pn1+"&SubNum="+pn2+"' width='"+w+"' height='"+h+"' name='"+id+"' bgcolor='"+bg+"' allowScriptAccess='sameDomain' quality='high' wmode='"+t+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");


}

// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 변수, 윈도우모드)
function flashRiaWrite(url,w,h,id,bg,vars,win){

 // 플래시 코드 정의
 var flashStr=
 "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
 "<param name='allowScriptAccess' value='always' />"+
 "<param name='movie' value='"+url+"' />"+
 "<param name='FlashVars' value='"+vars+"' />"+
 "<param name='wmode' value='"+win+"' />"+
 "<param name='menu' value='false' />"+
 "<param name='quality' value='high' />"+
 "<param name='bgcolor' value='"+bg+"' />"+

 "<param name='base' value='.'>"+
 "<embed src='"+url+"' FlashVars='"+vars+"' base='.' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
 "</object>";
 

 // 플래시 코드 출력
 document.write(flashStr);


 //Flash의 ExternalInterface가 Form Tag내에서 오류나는 버그를 해결하는 코드     
 eval("window." + id + " = document.getElementById('" + id + "');");

}


function FlashFilm(url,w,h,bg,t,movieLink,id) {
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,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' />\
<param name='flashVars' value='&dn="+movieLink+"' />\
<embed src='"+url+"' FlashVars='&dn="+movieLink+"' width='"+w+"' height='"+h+"' name='"+id+"' bgcolor='"+bg+"' allowScriptAccess='sameDomain' quality='high' wmode='"+t+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}

//팝업 플래시 타이어 4개 관련 스크립트
function FlashProduct(url,w,h,bg,t,A,B,C,D,id) {
        document.write("\
        <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,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' />\
        <param name='flashVars' value='&typeA="+A+"&typeB="+B+"&typeC="+C+"&typeD="+D+"' />\
        <embed src="+url+" FlashVars='&typeA="+A+"&typeB="+B+"&typeC="+C+"&typeD="+D+"' width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' wmode='"+t+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
        </object>\
        ");
    }


/* 서브페이지 Worldwide보기 #############################################################################*/
function Vtable(no)
{
	for(var i=1 ; i<=1 ; i++) {
		if(no==i)
		{ 
			document.all['vtable'+i].style.visibility = 'visible';document.all['vtable'+i].style.display = '';
		} else { 
			document.all['vtable'+i].style.visibility = 'hidden';document.all['vtable'+i].style.display = 'none';
		}
    }
}


//타이어 규격가이드 팝업창//
function TireGuide(){
    window.open('../Product/standard_guide.aspx', '', 'width=580, height=540, left=0, top=0, scrollbars=yes');
}

//글로벌 웹진 팝업 풀창 띄우기//
function winWebzine(openURL) {
	//var openURL = "";
    window.open(openURL,'winWebzine','width=' + screen.availWidth + ',height=' + screen.availHeight + ',left=0, top=0,toolbar=0, menubar=0, statusbar=0, scrollbar=0, resizable=0');
}