//¸Àº¸±â	

function guidance() 
{		
    alert('¸Àº¸±â °úÁ¤¿¡¼­´Â º»±â´ÉÀÌ Áö¿øµÇÁö ¾Ê½À´Ï´Ù.');
}

function firstpage() 
{		
    alert('This is the first page of your current lesson');
}


//pre, next rollover È¿°ú

function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//showhideLayer È¿°ú

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


//openwindow

function open_window(name, url, left, top, width, height, toolbar, menubar, location, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  location_str = location ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open( url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',location='+location_str+',statusbar='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}


//¿ìÃø¿¡ Ç×»óÀÖ´Â ¿ë¾î»çÀü script

function scroll_lay()
{
    var s_top=document.body.scrollTop+20 
    var s_left=document.body.scrollLeft+540 
    bt_layer.style.top=s_top;
    bt_layer.style.left=s_left;
}

//¿ë¾î»çÀü

function dict()
{
	open_window('dict', '../common/lcd_dict.htm', 0, 0, 500, 500, 0, 0, 0, 0, 0, 0);
}


//ÀÎ¼â

function printpage()
{
	//this.focus();
	print();
}


//CLICK EVENT 

function vh_layer(vlayer, hlayer)
{
	vlayer.style.visibility="visible";
	hlayer.style.visibility="hidden";
}

function v_layer(vlayer)
{
	vlayer.style.visibility="visible";
}

function h_layer(hlayer)
{
	hlayer.style.visibility="hidden";
}

function id_display(id)
{
	id.style.display=id.style.display=='none' ? '' : 'none';
}


//¹°À½Ç¥ Å¬¸¯ÇÏ¸é ´Ü¾î ·¹ÀÌ¾î html ÅÂ±× Æ÷ÇÔ

function change_htm(id , txt)
{
	id.innerHTML= txt;
}



//testÆò°¡ ÆäÀÌÁö navi Á¶Àý

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function mov_DoFSCommand(command, args) 
{
  var movObj = InternetExplorer ? mov : document.mov;
  
  var navi_ctrlnum = eval(getCookie("navi_ctrlnum"));

  if (navi_ctrlnum == null)
  { 		
	setCookie("navi_ctrlnum", 1);
  }
  else
  {
  	if (command == "chk")
  	{ 	
		navi_ctrlnum = eval(navi_ctrlnum) + 1;
		setCookie("navi_ctrlnum", navi_ctrlnum);
		//alert(navi_ctrlnum);
  	}  	
  }
}
// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) 
{
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub mov_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call mov_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}


function test_guide()
{
	alert("Please answer following questions");
}