function getPosition(_nm){
var start, end, scale, term;
start = parseInt (document.getElementById('Quick').style.top, 0);
end = document.documentElement.scrollTop;
if(end < _nm) end = _nm;
term = 1;

 if ( start != end ) {

  scale = Math.ceil( Math.abs( end - start ) / 20 );
  if ( end < start ) scale = -scale;
  document.getElementById('Quick').style.top = parseInt (document.getElementById('Quick').style.top, 0)+ scale + "px";
  term = 1;

 }

 setTimeout ("getPosition("+_nm+")", term);

}

function moveBanner(_nm) {

 if (!document.getElementById('Quick')) return false;
 document.getElementById('Quick').style.top = document.documentElement.scrollTop + "px";
 getPosition(_nm);

document.getElementById('Quick').style.top = _nm+"px";
 return true;

}



/* 플래쉬 뷰 */
function flashView(fileName, w, h){
	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='"+fileName+"' align='middle' />\
	<param name='allowScriptAccess' value='always' />\
	<param name='movie' value='"+fileName+"' />\
	<param name='FlashVars' value='flashVars' />\
	<param name='loop' value='false' />\
	<param name='menu' value='true' />\
	<param name='quality' value='high' />\
    <param name='wmode' value='transparent' />\
    <param name='scale' value='noscale' />\
	<param name='bgcolor' value='#FFFFFF' />\
	<embed src='"+fileName+"' wmode='transparent' FlashVars='flashVars'  quality='best' bgcolor='#FFFFFF' width='"+w+"' height='"+h+"' name='"+fileName+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
	</object>");
}


/*
*  toggleDiv(divID,cntDiv, titleDiv, contentDiv)
*  작성자 : 안건우 2009-08-11
*
*  divID : 보여질 div의 값 (1,2,3,4...)
*  cntDiv : Div의 갯수 (구현할 content Div의 갯수임)
*  titleDiv : 메뉴로 쓰일 Div의 id값
*  contentDiv : 컨텐츠로로 쓰일 Div의 id값
*
*  실제 사용예
*  toggleDiv('1','3','title','content');
*/
function toggleDiv(divID,cntDiv,contentDiv){
 for(i=1;i<=cntDiv;i++){
  if(divID==i){
   document.getElementById(contentDiv+i).style.display="";
  }else{
   document.getElementById(contentDiv+i).style.display="none";
  }
 }
}




/*
탭버튼
*/

function show_tab(divid,dcnt,idx) {
	for(i=1;i<= dcnt; i++) {
		if(idx==i) {
			document.getElementById(divid + i).style.display = "block";
		} else {
			document.getElementById(divid + i).style.display = "none";
		}
	}
}
