//flash start
//######################################
//## Product Company mdizain.com      ##
//## License is MDIZAIN          	 ##
//## Product Version M1.0          	 ##
//## Made By chen sui 이명재  	     ##
//######################################
	
function flashMovie(f,w,h,t,U,c){
	flashMovie_2(f, w, h,t,U,c, '');
}
function flashMovie_2(f,w,h,t,U,c, code){
	var s_index="";
	var m_flash_movie="";
 	s_index= U+"/"+f;
 	m_flash_movie+="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' bgcolor='"+c+"' id='submenu_flash' name='submenu_flash'>";
	m_flash_movie+="<param name='movie' value='"+s_index+"'>";
	m_flash_movie+="<param name='menu' value='false'>";
	m_flash_movie+="<param name='allowScriptAccess' value='always'>";
	m_flash_movie+="<param name='quality' value='high'>";
	m_flash_movie+="<param name='wmode' value='"+t+"'/>";	
	m_flash_movie+="<embed src='"+s_index+"' wmode='"+t+"'  quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"' bgcolor='"+c+"' allowScriptAccess='always' swLiveConnect=true id='submenu_flash' name='submenu_flash'></embed></object>";	
	
	document.write(m_flash_movie);
}


//상태바
function hidestatus(){
	window.status='+CODILAND+?迎?.'
	return true
}
/*** iframe add 관련 스크립트 ***/
function calcHeight1()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe1').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe1').height=
the_height;
}
function calcHeight2()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe2').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe2').height=
the_height;
}

function calcHeight3()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe3').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe3').height=
the_height;
}
function calcHeight4()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe4').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe4').height=
the_height;
}
function calcHeight5()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe5').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe5').height=
the_height;
}
/*** 관리자 페이지 관련 스크립트 ***/

//top button start
function topx() 
{ 
        x = document.body.scrollLeft; 
        y = document.body.scrollTop; 
        step = 2; 

        while ((x != 0) || (y != 0)) { 
                scroll (x, y); 
                step += (step * step / 300); 
                x -= step; 
                y -= step; 
                if (x < 0) x = 0; 
                if (y < 0) y = 0; 
        } 
        scroll (0, 0); 
} 
//top button end


// 팝업창 중앙으로 위치 
function center(){ 
var x,y; 
if (self.innerHeight) { // IE 외 모든 브라우저 
x = (screen.Width - self.innerWidth) / 2; 
y = (screen.Height - self.innerHeight) / 2; 
}else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict 모드 
x = (screen.Width - document.documentElement.clientWidth) / 2; 
y = (screen.Height - document.documentElement.clientHeight) / 2; 
}else if (document.body) { // 다른 IE 브라우저( IE < 6) 
x = (screen.Width - document.body.clientWidth) / 2; 
y = (screen.Height - document.body.clientHeight) / 2; 
} 
window.moveTo(x,y); 
} 
// 팝업창 중앙으로 위치 

//Part Print 
function printLayer () { 
      if (document.all && window.print) { 
        window.onbeforeprint = beforeLayer; 
        window.onafterprint = afterLayer; 
        window.print(); 
      } 
} 
function beforeLayer () { 
      if (document.all) { 
        objContents.style.display = 'none'; 
        objSelection.innerHTML = document.all['printArea'].innerHTML;
      } 
} 
function afterLayer () { 
      if (document.all) { 
        objContents.style.display = 'block'; 
        objSelection.innerHTML = ""; 
      } 
} 
//Part Print 
    
//top banner

var downLayerId;
var dropDegree = 5; //스크롤 속도
var doDirect;
var DirectTerm = 4000; //스크롤 지연시간
var curDropIdx = 0;

function DirectDown()
{
clearInterval(doDirect);
clearInterval(downLayerId);

for(i = curDropIdx ;i < document.all["DropHit"].length + curDropIdx;i++){
  document.all["DropHit"][i%document.all["DropHit"].length].style.posTop = document.all["DropHit"][i%document.all["DropHit"].length].style.posHeight * (-1*((i-curDropIdx)%document.all["DropHit"].length));
}
var temp = 'setInterval("DownLayer()",20)';
downLayerId = eval(temp);
direction = "down";
}
function DownLayer()
{
if(document.all["DropHit"][curDropIdx].style.posTop < document.all["DropHit"][curDropIdx].style.posHeight){
  for(j = curDropIdx ;j < document.all["DropHit"].length + curDropIdx;j++){
   document.all["DropHit"][j%document.all["DropHit"].length].style.posTop += dropDegree;
  }
}else{
  clearInterval(downLayerId);
  for(j = curDropIdx ;j < document.all["DropHit"].length + curDropIdx;j++){
   document.all["DropHit"][j%document.all["DropHit"].length].style.posTop = document.all["DropHit"][j%document.all["DropHit"].length].style.posHeight *((-1*((j-curDropIdx)%document.all["DropHit"].length))+1);
  }
  curDropIdx = (curDropIdx + 1) ;
  curDropIdx = curDropIdx > document.all["DropHit"].length-1 ? curDropIdx%document.all["DropHit"].length:curDropIdx;
  var temp = 'setInterval("DirectDown()",DirectTerm)';
  doDirect = eval(temp);
}
}
function DirectUp()
{
clearInterval(doDirect);
clearInterval(downLayerId);
var tempIdx = 0;
for(i = 0;i<document.all["DropHit"].length;i++){
  tempIdx = (document.all["DropHit"].length + curDropIdx - i) %document.all["DropHit"].length;
  document.all["DropHit"][tempIdx].style.posTop = i*document.all["DropHit"][tempIdx].style.posHeight;
}
var temp = 'setInterval("UpLayer()",20)';
downLayerId = eval(temp);
direction = "up";
}
function UpLayer()
{
var tempIdx = 0;
if(document.all["DropHit"][curDropIdx].style.posTop < document.all["DropHit"][curDropIdx].style.posHeight && document.all["DropHit"][curDropIdx].style.posTop > document.all["DropHit"][curDropIdx].style.posHeight * (-1)){
  for(j = 0 ;j < document.all["DropHit"].length;j++){
   tempIdx = (document.all["DropHit"].length + curDropIdx - j) %document.all["DropHit"].length;
   document.all["DropHit"][tempIdx].style.posTop -= dropDegree;
  }
}else{
  clearInterval(downLayerId);
  for(j = 0;j<document.all["DropHit"].length;j++){
   tempIdx = (document.all["DropHit"].length + curDropIdx - j) % document.all["DropHit"].length;
   document.all["DropHit"][tempIdx].style.posTop = (j-1)*(document.all["DropHit"][tempIdx].style.posHeight);
  }
  curDropIdx = (curDropIdx - 1) ;
  curDropIdx = curDropIdx < 0 ? document.all["DropHit"].length-1:curDropIdx;
  var temp = 'setInterval("DirectUp()",DirectTerm)';
  doDirect = eval(temp);
}
}

//top banner



//popup window 
function Window_popup(URL,width,height)
{
	window.open(URL,'','width='+width+'px,height='+height+'px,top=50,left=10,scrollbars=no');
}

function menu(lnk){
if (lnk == "home")
location.href="/"; //home
	
else if (lnk == "101")
location.href="common.asp?page_num=101&pageNum=1&subNum=1"; 
	
else if (lnk == "102")
location.href="common.asp?page_num=102&pageNum=1&subNum=2";
	
else if (lnk == "200")
location.href="common.asp?page_num=200&pageNum=2&subNum=1";
	
else if (lnk == "2011")
location.href="common.asp?page_num=2011&pageNum=2&subNum=1";
	
else if (lnk == "2012")
location.href="common.asp?page_num=2012&pageNum=2&subNum=1";
	
else if (lnk == "2013")
location.href="common.asp?page_num=2013&pageNum=2&subNum=1";
	
else if (lnk == "2021")
location.href="common.asp?page_num=2021&pageNum=2&subNum=2";
	
else if (lnk == "203")
location.href="common.asp?page_num=203&pageNum=2&subNum=3";
	
else if (lnk == "2031")
location.href="common.asp?page_num=2031&pageNum=2&subNum=3";
	
else if (lnk == "2032")
location.href="common.asp?page_num=2032&pageNum=2&subNum=3";
	
else if (lnk == "2033")
location.href="common.asp?page_num=2033&pageNum=2&subNum=3";
	
else if (lnk == "2034")
location.href="common.asp?page_num=2034&pageNum=2&subNum=3";
	
else if (lnk == "2035")
location.href="common.asp?page_num=2035&pageNum=2&subNum=3";
	
else if (lnk == "2036")
location.href="common.asp?page_num=2036&pageNum=2&subNum=3";
	
else if (lnk == "2037")
location.href="common.asp?page_num=2037&pageNum=2&subNum=3";
	
else if (lnk == "2041")
location.href="common.asp?page_num=2041&pageNum=2&subNum=4";
	
else if (lnk == "205")
location.href="common.asp?page_num=205&pageNum=2&subNum=5";
	
else if (lnk == "2051")
location.href="common.asp?page_num=2051&pageNum=2&subNum=5";
	
else if (lnk == "301")
location.href="common.asp?page_num=301&pageNum=3&subNum=1";
	
else if (lnk == "302")
location.href="common.asp?page_num=302&pageNum=3&subNum=2";
	
else if (lnk == "303")
location.href="common.asp?page_num=303&pageNum=3&subNum=3";
	
else if (lnk == "401")
location.href="common.asp?page_num=401&pageNum=4&subNum=1";
	
else if (lnk == "501")
location.href="common.asp?page_num=501&pageNum=5&subNum=1";
	
else if (lnk == "contact")
location.href="common.asp?page_num=contact&pageNum=6";
}

