function chk_eng(obj){
     var isID = /^[a-z0-9_]/;
     if( !isID.test(obj)) {
         alert("¾ÆÀÌµð´Â 3~12ÀÚÀÇ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ,Æ¯¼ö±âÈ£(_)¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù."); 
		 event.returnValue=false;
         return 0; 
     }
     return 1;
}

function EngNumCheck2(str){ 
re= /[a-zA-Z0-9_]/;
if( !re.test(str) ) { return true;} 
else { return false;} 
}


function EngNumCheck(str){ 
re=/[°¡-ÆR]+/i;
if( re.test(str) ) { return true;} 
else { return false;} 
}

function addfriend_1(tid){
alert('½ºÆä¼È È¸¿ø¸¸ »ç¿ë°¡´ÉÇÕ´Ï´Ù');
}
function homepage_1(doc,tid){
alert('½ºÆä¼È È¸¿ø¸¸ »ç¿ë°¡´ÉÇÕ´Ï´Ù');
}
function addfriend(tid){
window.open("../search/friend_add.php?tid="+tid,"","height=200, width=300,scrollbars=yes");
}
function homepage(doc,tid){
window.open("../homepage/?doc="+doc+"&tid="+tid,"","height=600, width=720,scrollbars=yes");
}
function member_only(){
alert('È¸¿øÀü¿ëÀÔ´Ï´Ù.');
}

function addfriend_2(){
alert('½ºÆä¼È È¸¿ø¸¸ È®ÀÎ °¡´ÉÇÕ´Ï´Ù');
}

	function currFormat(amount) {

		if (amount == 0) {
			return amount;
		}

		var len;
		var samount = String(amount);
		var new_amount = '';
		var cp = 0;

		len = samount.length;

		for (var i = len-1; i >= 0; i--) {
			if (cp != 0 && !(cp % 3)) {
				new_amount = ',' + new_amount;
			}

			new_amount = samount.substring(i,i+1) + new_amount;
			cp++;
		}

            return new_amount;
	}


function ordno(){
var now = new Date();
var nowyear  = now.getFullYear();
var nowmonth = now.getMonth() + 1;
var nowday   = now.getDate();
var nowhour  = now.getHours();
var nowmin   = now.getMinutes();
var nowsec   = now.getSeconds();
var randnum  = Math.floor(Math.random()*10);
if (("" + nowmonth).length == 1) { nowmonth = "0" + nowmonth; }
if (("" + nowday).length   == 1) { nowday   = "0" + nowday;   }
if (("" + nowhour).length  == 1) { nowhour  = "0" + nowhour;  }
if (("" + nowmin).length   == 1) { nowmin   = "0" + nowmin;   }
if (("" + nowsec).length   == 1) { nowsec   = "0" + nowsec;   }
var orderdate   = String(nowyear) + String(nowmonth) + String(nowday); //ÁÖ¹®ÀÏ
var ordertimeis = String(nowhour) + String(nowmin) + String(nowsec);   //ÁÖ¹®½Ã°£
var ordernum    = orderdate + "_" +ordertimeis+randnum;				   //ÁÖ¹®¹øÈ£	

	return ordernum;
}
