/**  ÆË¾÷Ã¢ ÀÌ¹ÌÁö ¿©´Â Module
	url : open target window(È®ÀåÀÚ´Â º¯°æ°¡´É,È¥¿µ»ç¿ë½Ã È®ÀåÀÚ ÆÄ¶ó¹ÌÅÍ »èÁ¦ »ç¿ë°¡´É)
	wd : open window °¡·Î°ª
	he : open window ¼¼·Î°ª
	flag : scroll ¿©ºÎ(0:½ºÅ©·Ñ ¾ø½¿ / 1:½ºÅ©·Ñ ÀÖ½¿)
	±×¿Ü left. top ÁöÁ¤°ªÀ¸·Î ÁÂÇ¥ ÁöÁ¤ °¡´É

	¿¹) pop('sample.html',500,500,1) 
			=> °¡·Î,¼¼·Î 500pxÀÎ ½ºÅ©·Ñ ÀÖ´Â ÆË¾÷Ã¢ È£Ãâ
**/

/***********************************************************************************/
//¿À¸¥ÂÊ ¸¶¿ì½º »ç¿ë ±ÝÁö ÇØÁ¦ 2004.7.30 by ally
document.onselectstart = function() {return false}
document.oncontextmenu = function() {return false}




function pop(pop,width,height,flag)
{
	var url = pop;
	var wd = width;
	var he = height;

	if (flag == 0 )
	{
		window.open(url,"","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
	}
	else
	{
		window.open(url,"","toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
	}
}
function pop2(pop,width,height,flag)
{
	var url = pop;
	var wd = width;
	var he = height;

	if (flag == 0 )
	{
		window.open(url,"","toolbar=yes,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
	}
	else
	{
		window.open(url,"","toolbar=yes,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
	}
}



/***********************************************************************************/
/**
 * ÀÚ¹Ù½ºÅ©¸³Æ® Trim ÇÔ¼ö
 */
String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g, ""); 
}

//±Ý¾× ÀÚ¸´¼ö ¸¸µé¾îÁÖ´Â ÇÔ¼ö
String.prototype.toMoney = function() {
	var re = new RegExp("([0-9]+)([0-9]{3})");
	var str = this;
	while( re.test(str) ) {
		str = str.replace( re, "$1,$2" );
	}
	
	return str;
}

//±Ý¾×À» ÀÏ¹Ý ¹®ÀÚ·Î º¯È¯
String.prototype.moneyToString = function() {
	return this.replace( /(\,)/g, "" );
}


/**
 * ¿Ã¹Ù¸¥ ¸ÞÀÏÇü½ÄÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isValidEmail(str) 
{
	var re=new RegExp("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$","gi");
	var matchArray=str.match(re);
	if (matchArray) return true;
	else return false;
}

/**
 * ¿Ã¹Ù¸¥ È¨ÆäÀÌÁöÇü½ÄÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isValidHomepage(str) 
{
	var re=new RegExp("^((ht|f)tp:\/\/)((([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3}))|(([0-9]{1,3}\.){3}([0-9]{1,3})))((\/|\\?)[a-z0-9~#%&'_\+=:\?\.-]*)*)$","gi");
	var matchArray=str.match(re);
	if (matchArray) return true;
	else return false;
}

/**
 * ¿Ã¹Ù¸¥ ÀüÈ­¹øÈ£ Çü½Ä(¼ýÀÚ-¼ýÀÚ-¼ýÀÚ)ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isValidPhone(str) 
{
	if (str.search(/^(\d+)-(\d+)-(\d+)$/g)!=-1) return true;
	else return false;
}

/**
 * ¾ËÆÄºª¸¸À¸·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isAlphabet(str) 
{
	if (str.search(/[^a-zA-Z]/g)==-1) return true;
	else return false;
}

/**
 * ´ë¹®ÀÚ·Î¸¸ ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isUpperCase(str) 
{
	if (str.search(/[^A-Z]/g)==-1) return true;
	else return false;
}

/**
 * ¼Ò¹®ÀÚ·Î¸¸ ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isLowerCase(str) 
{
	if (str.search(/[^a-z]/g)==-1) return true;
	else return false;
}

/**
 * ÇÑ±Û·Î¸¸ ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isKorean(str) 
{
	var strLength = str.length;
	var i;
	var Unicode;

	for (i=0;i<strLength;i++) 
	{
		Unicode = str.charCodeAt(i);
		if ( !(44032 <= Unicode && Unicode <= 55203) ) return false;	
	}
	return true;
}

/**
 * ¼ýÀÚ¸¸À¸·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isDigit(str) 
{
	if (str.search(/[^0-9]/g)==-1) return true;
	else return false;
}

/**
 * ¹®ÀÚ¿­ÀÌ NULLÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
 */
function isNull(str) 
{
    if (str == null || str == "") return true;
    else return false;
}

/**
 * ¹®ÀÚ¿­¿¡ ÇÑÄ­ÀÌ»óÀÇ ½ºÆäÀÌ½º ÀÔ·ÂÀÌ ÀÖ´ÂÁö¸¦ Ã¼Å©ÇÕ´Ï´Ù.
 */
function isValidSpace(str) 
{
	if (isNull(str)) return false;
	else
	{
		if (str.search(/[\s]{2,}/g)!=-1) return false;
		else return true;
	}
}
/***********************************************************************************/

/*****history ¿¡ ÀÖ´Â °Ë»öºÎºÐ ************************************************************/

function showow(){
	if(navigator.appName != "Netscape"){
			if(document.all['show'].style.visibility == "visible")
				document.all['show'].style.visibility = "hidden";
			else 
				document.all['show'].style.visibility = "visible";
	}
	if(navigator.appName == "Netscape"){
			if(document.layers['show'].visibility == "showow")
					document.layers['show'].visibility = "hide";
			else
					document.layers['show'].visibility = "showow";
	}
}


/*****ÇÃ·¡½¬ ºÎºÐ(Çì´õ¸Þ´º) ************************************************************/

function enghome(){
location.replace("/eng/index.jsp");
}
function contactus(){
location.replace("javascript:pop('/eng/home/pop_contactus.jsp',620,505,flag='0')");
}
function korean(){
location.replace("http://www.kidc.net");
}
function faq(){
location.replace("/eng/home/faq.jsp");
}
function sitemap(){
location.replace("/eng/home/sitemap.jsp");
}


function about(){
location.replace("/eng/about/location.jsp");
}
function about01(){
location.replace("/eng/about/location.jsp");
}
function about02(){
location.replace("/eng/about/site.jsp");
}
function about03(){
location.replace("/eng/about/partner.jsp");
}

function service(){
location.replace("/eng/service/managed_co/co.jsp");
}
function service01(){
location.replace("/eng/service/managed_co/co.jsp");
}
function service02(){
location.replace("/eng/service/managed_ser/overview.jsp");
}
function service03(){
location.replace("/eng/service/add/security.jsp");
}
function service04(){
location.replace("/eng/service/out/out.jsp");
}
function service05(){
location.replace("/eng/service/mobile/wip.jsp");
}
function service06(){
location.replace("/eng/service/theme/disaster.jsp");
}

function guide(){
location.replace("/eng/network/kns.jsp");
}
function guide01(){
location.replace("/eng/network/kns.jsp");
}
function guide02(){
location.replace("/eng/network/backbone.jsp");
}
function guide03(){
location.replace("/eng/network/map.jsp");
}

function customer(){
location.replace("/eng/facility/overview.jsp");
}
function customer01(){
location.replace("/eng/facility/overview.jsp");
}
function customer02(){
location.replace("/eng/facility/nonhyun.jsp");
}
function customer03(){
location.replace("/eng/facility/seo01.jsp");
}
function customer04(){
location.replace("/eng/facility/seo02.jsp");
}
function customer05(){
location.replace("/eng/facility/daegu.jsp");
}

//center_tour
function center01(){
location.replace("/eng/facility/nonhyun.jsp");
}
function center02(){
location.replace("/eng/facility/seo01.jsp");
}
function center03(){
location.replace("/eng/facility/seo02.jsp");
}
function center04(){
location.replace("/eng/facility/daegu.jsp");
}
function vr01(){
location.replace("javascript:pop('/eng/home/centertour/centertour_non.jsp',750,455,flag=0)");
}
function vr02(){
location.replace("javascript:pop('/eng/home/centertour/centertour_seo01.jsp',750,455,flag=0)");
}
function vr03(){
location.replace("javascript:pop('/eng/home/centertour/centertour_seo02.jsp',750,455,flag=0)");
}

//main_banner
function imsIntroduction(){
location.replace("javascript:pop('http://ims.kidc.net/vttour.html',850,650,flag=0)");
}
function cyberBrochure(){
location.replace("javascript:pop('/about/cyber/brochure/main.html',752,531,flag=0)");
}
function centerTour(){
location.replace("javascript:pop('/eng/home/centertour/centertour_non.jsp',750,455,flag=0)");
}

//main_img
function mservice01(){
location.replace("/service/managed_co/co_outline.jsp");
}
function mservice02(){
location.replace("/service/managed_ser/moutline.jsp");
}
function mservice03(){
location.replace("/service/addition/security.jsp");
}
function mservice04(){
location.replace("/service/mobile/sms.jsp");
}
function mservice05(){
location.replace("/service/out/outsourcing.jsp");
}
function mservice06(){
location.replace("/service/stream/stream.jsp");
}
function mservice07(){
location.replace("/service/exclu/exclu.jsp");
}
function mservice08(){
location.replace("/service/theme/themec.jsp");
}

function center01(){
location.replace("/eng/facility/nonhyun.jsp");
}
function center02(){
location.replace("/eng/facility/seo01.jsp");
}
function center03(){
location.replace("/eng/facility/seo02.jsp");
}
function center04(){
location.replace("/eng/facility/daegu.jsp");
}

function core01(){
location.replace("/service/managed_co/co_outline.jsp");
}
function core02(){
location.replace("/service/managed_ser/moutline.jsp");
}
function core03(){
location.replace("/service/mobile/sms.jsp");
}

function consulting01(){
location.replace("/guide/consulting/exm.jsp");
}
function consulting02(){
location.replace("/guide/consulting/wizd.jsp");
}
function consulting03(){
location.replace("/guide/simul/simul.jsp");
}