var winname_1;
var winname_2;
var openF = 0;
var openF2=0;
function popup2(fileName, intWidth, intHeight, intLeft, intTop, vScrollbars, vResizable, vStatus){
        today = new Date();
        winName = today.getTime();

        var fileName, intWidth, intHeight;
        var screenWidth = screen.availwidth;
        var screenHeight = screen.availheight;

		 if(intHeight >= screenHeight)
		{
                intHeight = screenHeight - 50;
                vScrollbars = 1;
				intTop=0;
				intWidth=eval(intWidth)+18;
        }
        if(intWidth >= screenWidth)
		{
                intWidth = screenWidth - 40;
                vScrollbars = 1;
				intTop=0;
        }

        if(intLeft =="auto" || intTop =="auto")
		{
                var intLeft = (screenWidth - intWidth) / 2;
				if(intTop!=0)
				{
	                var intTop = (screenHeight - intHeight) / 2;
				}
        }
        var features = eval("'width=" + intWidth + ",height=" + intHeight + ",left=" + intLeft + ",top=" + intTop + ",scrollbars=" + vScrollbars + ",resizable=" + vResizable + ",status=" + vStatus +", title="+"Welcome to Korean Air"+ "'");
        if(openF == 1){
                if(winname_1.closed){
                        winname_1 = window.open(fileName,winName,features);
                }else{
                        winname_1.close();
                        winname_1 = window.open(fileName,winName,features);
                }
        }else{
                winname_1 = window.open(fileName,winName,features);
                openF = 1;
        }
        winname_1.focus();
}
function etktpop(tktno, intWidth, intHeight, intLeft, intTop, vScrollbars, vResizable, vStatus){
        today = new Date();
        winName = today.getTime();

		var fileName = "http://cyb.koreanair.com/iKalApp/int/purchase/itrSearchIntEng.jsp?eTicketNo="+tktno;
        var intWidth, intHeight;
		intWidth = 670;
        var screenWidth = screen.availwidth;
        var screenHeight = screen.availheight;

		 if(intHeight >= screenHeight)
		{
                intHeight = screenHeight - 50;
                vScrollbars = 1;
				intTop=0;
				intWidth=eval(intWidth)+18;
        }
        if(intWidth >= screenWidth)
		{
                intWidth = screenWidth - 40;
                vScrollbars = 1;
				intTop=0;
        }

        if(intLeft =="auto" || intTop =="auto")
		{
                var intLeft = (screenWidth - intWidth) / 2;
				if(intTop!=0)
				{
	                var intTop = (screenHeight - intHeight) / 2;
				}
        }
        var features = eval("'width=" + (intWidth+3) + ",height=" + intHeight + ",left=" + intLeft + ",top=" + intTop + ",scrollbars=" + vScrollbars + ",resizable=" + vResizable + ",status=" + vStatus + "'");
        if(openF == 1){
                if(winname_1.closed){
                        winname_1 = window.open(fileName,winName,features);
                }else{
                        winname_1.close();
                        winname_1 = window.open(fileName,winName,features);
                }
        }else{
                winname_1 = window.open(fileName,winName,features);
                openF = 1;
        }
        winname_1.focus();
}
function etktpop3(tktCryptno, tktno, intWidth, intHeight, intLeft, intTop, vScrollbars, vResizable, vStatus){
        today = new Date();
        winName = today.getTime();

		var fileName = "http://cyb.koreanair.com/iKalApp/int/purchase/itrSearchIntEng.jsp?eTicketNo="+tktCryptno;
        var intWidth, intHeight;
		intWidth = 670;
        var screenWidth = screen.availwidth;
        var screenHeight = screen.availheight;

		 if(intHeight >= screenHeight)
		{
                intHeight = screenHeight - 50;
                vScrollbars = 1;
				intTop=0;
				intWidth=eval(intWidth)+18;
        }
        if(intWidth >= screenWidth)
		{
                intWidth = screenWidth - 40;
                vScrollbars = 1;
				intTop=0;
        }

        if(intLeft =="auto" || intTop =="auto")
		{
                var intLeft = (screenWidth - intWidth) / 2;
				if(intTop!=0)
				{
	                var intTop = (screenHeight - intHeight) / 2;
				}
        }
        var features = eval("'width=" + intWidth + ",height=" + intHeight + ",left=" + intLeft + ",top=" + intTop + ",scrollbars=" + vScrollbars + ",resizable=" + vResizable + ",status=" + vStatus +", title="+"Welcome to Korean Air"+ "'");
        if(openF == 1){
                if(winname_1.closed){
                        winname_1 = window.open(fileName,winName,features);
                }else{
                        winname_1.close();
                        winname_1 = window.open(fileName,winName,features);
                }
        }else{
                winname_1 = window.open(fileName,winName,features);
                openF = 1;
        }
        winname_1.focus();
}

function popup3(fileName, intWidth, intHeight, intLeft, intTop, vScrollbars, vResizable, vStatus){
        today = new Date();
        winName = today.getTime()+"zz";

        var fileName, intWidth, intHeight;
        var screenWidth = screen.availwidth;
        var screenHeight = screen.availheight;

		 if(intHeight >= screenHeight)
		{
                intHeight = screenHeight - 50;
                vScrollbars = 1;
				intTop=0;
				intWidth=eval(intWidth)+18;
        }
        if(intWidth >= screenWidth)
		{
                intWidth = screenWidth - 40;
                vScrollbars = 1;
				intTop=0;
        }

        if(intLeft =="auto" || intTop =="auto")
		{
                var intLeft = (screenWidth - intWidth) / 2;
				if(intTop!=0)
				{
	                var intTop = (screenHeight - intHeight) / 2;
				}
        }
        var features = eval("'width=" + intWidth + ",height=" + intHeight + ",left=" + intLeft + ",top=" + intTop + ",scrollbars=" + vScrollbars + ",resizable=" + vResizable + ",status=" + vStatus +", title="+"Welcome to Korean Air"+ "'");
        if(openF2 == 1){
                if(winname_2.closed){
                        winname_2 = window.open(fileName,winName,features);
                }else{
                        winname_2.close();
                        winname_2 = window.open(fileName,winName,features);
                }
        }else{
                winname_2 = window.open(fileName,winName,features);
                openF2 = 1;
        }
        winname_2.focus();
}
