function getCookie( name )
{
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}

/*------------------ popup1 -----------------------*/
if ( getCookie( "dysbank_notice1" ) != "done" )
{
	//noticeWindow = window.open('/main/popupnew.html','notice1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=428,height=550,left=1,top=1');
	//noticeWindow.moveTo(1, 1);
	//noticeWindow.opener = self;
}

function getCookie( name )
{
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}


/*------------------ popup2 -----------------------*/
if ( getCookie( "dysbank_notice2" ) != "done" )
{
	//noticeWindow = window.open('/main/popupnew1.html','notice2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=428,height=550,left=1,top=1');
	//noticeWindow.moveTo(350, 1);
	//noticeWindow.opener = self;
}

/*------------------ popup3 -----------------------*/
if ( getCookie( "dysbank_notice3" ) != "done" )
{
	//noticeWindow = window.open('/main/pop.htm','notice3','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=418,height=452,left=1,top=1');
	//noticeWindow.moveTo(100, 1);
	//noticeWindow.opener = self;
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function Login()
{
  document.frmLogin.action = "/Helpdesk/LoginCheck.asp";
  document.frmLogin.submit();
}
function Register()
{
  document.frmLogin.action = "/Helpdesk/Join_guide.asp";
  document.frmLogin.submit();
}

function MoveMore(div)
{
	if (div==1) {
		if (moreInfo1==1) {
			location.href = "f-infor/f-news/fn_list.asp?table_name=Finance_i_tbl";
		}
		else if (moreInfo1==2) {
			location.href = "f-infor/f-sense/fs_list.asp?table_name=Finance_s_tbl";
		}
	} else  {
		if (moreInfo2==3) {
			location.href = "board/board/board.asp?Mode=list&Head=produse&Type=1";
		}
		else if (moreInfo2==4) {
			location.href = "board/board/board.asp?Mode=list&Head=knowhow&Type=1";
		}
	}
}

var banner_1_mouseEvent = 1;
var banner_2_mouseEvent = 1;



// banner_roll("divÅÂ±× id", ¹è³Ê1°³³ôÀÌ, µô·¹ÀÌ, 1Ä­ÀÌµ¿¼Óµµ, 0);
function banner_roll(div_id, banner_height, banner_delay, banner_speed, this_height){
	if (eval(div_id + "_mouseEvent")) {
		var div_tag = document.getElementById(div_id);
		var a_tag, i;
		this_height++;
		if (this_height < banner_height) {
			div_tag.style.top = -this_height;
			setTimeout("banner_roll('" + div_id + "', " + banner_height + ", " + banner_delay + ", " + banner_speed + ", " + this_height + ");", banner_speed);
		} else {
			a_tag = div_tag.getElementsByTagName("TABLE");
			div_tag.appendChild(a_tag[0]);
			div_tag.style.top = 0;
			setTimeout("banner_roll('" + div_id + "', " + banner_height + ", " + banner_delay + ", " + banner_speed + ", 0);", banner_delay);
		}
	} else{
		setTimeout("banner_roll('" + div_id + "', " + banner_height + ", " + banner_delay + ", " + banner_speed + ", " + this_height + ");", banner_speed);
	}
	return true;
}


function OnPlay()
{
    if (MediaPlayer1.PlayState != 2) 
       {
       MediaPlayer1.Play();
       }
}
function OnStop()
{
       MediaPlayer1.Stop(); 
       MediaPlayer1.CurrentPosition=0;
}
function OnPause()
{
         if (MediaPlayer1.PlayState == 2) 
       {
       MediaPlayer1.Pause(); 
       }
}
