﻿var SITE_DOMAIN = "http://www.wizbox.co.kr";

function PopupWindow(url, width, height)
{
	sw = screen.availWidth;
	sh = screen.availHeight;

	px = (sw-width) / 2;
	py = (sh-height) / 2;

    window.open(url,"",'resizeable=0,scrollbars=0,toolbar=0,directories=0,status=yes,menubar=0' + ',width=' + width + ',height=' + height + ',left=' + px + ',top=' + py );
}

function containsCharsOnly(input, chars) 
{
    for (var i = 0; i< input.length; i++) 
    {
		var nIndex = chars.indexOf(input.charAt(i));
		
		//alert(chars + " # " + input.charAt(i) + " # " + nIndex);
		
        if (nIndex == -1)
        {
            return false;
		}
    }
    
    return true;
}

// 숫자 체크
function isNum(input) 
{
    var chars = "0123456789";
    return containsCharsOnly(input, chars);
}

function BigIsAlphaNumeric(checkStr)
{
	var checkOK = "ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	
	for (i = 0; i < checkStr.length; i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0; j < checkOK.length; j++)
		{
			if (ch == checkOK.charAt(j))
				break;
		}
		
		if (j == checkOK.length)
			return false;
	}
	
	return true;
}
