// ¹®ÀÚ¿­ Ã¼Å©, °¡ÀÔÆûµî¿¡¼­ »ç¿ë
function beAllowStr(str, allowStr) {
    var i;
    var ch;
    for (i=0;i<str.length;i++) {
        ch = str.charAt(i);
        if (allowStr.indexOf(ch) < 0) {
            return false;
        }
    }
    return true;
}

function Confirm_yesorno(msg,url) {
  var Message = msg;
  if(confirm(Message)=='1') {
    location.href = url;
  }
}
function Confirm_yesorno_popup(msg,url) {
  var Message = msg;
  if(confirm(Message)=='1') {
    window.open(url, "", 'top=1,left=1,width=1,height=1,status=no,scrollbars=no,fullscreen=no,toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=yes');
  }
}

function move_url(url) { 
  location.href = url;
} 

function move_url_popup(url) { 
  window.open(url,"","");
} 

function profileWindow(url) {
  var window_left = (screen.width-700)/2;
  var window_top = (screen.height-500)/2;
  window.open(url, "", 'width=900,height=550,status=no,scrollbars=yes,fullscreen=no,toolbar=no,location=0,directories=0,status=1,menubar=no,resizable=yes,top=' + window_top + ',left=' + window_left + '');

}

function window_small(url) {
  var window_left = (screen.width-400)/2;
  var window_top = (screen.height-600)/2;
  window.open(url, "", 'width=10,height=10,status=no,scrollbars=yes,fullscreen=no,toolbar=no,location=0,directories=0,status=1,menubar=no,resizable=yes,top=' + window_top + ',left=' + window_left + '');

}

function Window_StreamingPlayer(ref) {
  var window_left = (screen.width-800)/2;
  var window_top = (screen.height-600)/2;
  window.open(ref,"StreamingPlayer",'width=480,height=500,status=no,scrollbars=no,top=' + window_top + ',left=' + window_left + '');
}

function messageWindow(ref) {
  var window_left = (screen.width-700)/2;
  var window_top = (screen.height-500)/2;
  window.open(ref,"",'width=400,height=400,status=no,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}


function NotHan2(frmvalue, msg) {

	a=0;
	b=0;
	var data = frmvalue.value;		
	var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';	
	var numeric = '1234567890';
	var text = alpha + numeric;	
	for (var i=0;i<data.length;i++) {
		if (text.indexOf(data.substring(i,i+1))<=-1) break;		
	}	
	if (i!=data.length) { a=1; }
	
	
	var numberis = '0123456789';	
	var data = frmvalue.value;	
	for (i=0; i<data.length; i++) 	if ( numberis.indexOf(data.substring(i,i+1))<0) {	break ;}
	if ( i !=data.length ) {	b=1;	}		
	
	if (a==1&& b==1) return false;
	else { alert(msg); frmvalue.select(); return true; }
}



// 100106 by migo - user_photo Ä¡È¯
var userPhotoBaseUrl_100 = "http://hiphopplaya2.codns.com/img/user_photo/100/";			// user_photo À§Ä¡
var userPhotoBaseUrl_original = "http://hiphopplaya2.codns.com/img/user_photo/";			// user_photo À§Ä¡
var userPhotoBaseImg = "http://hiphopplaya.com/images/user_photo_empty.gif";	// ±âº» ÀÌ¹ÌÁö

$(function() { // IE8 - KB927917 ¿¡·¯ ¹ß»ýµÊ

	// 100106 by migo - user_photo Ä¡È¯
	$(".user_photo_by_migo, .user_photo_100_by_migo").each(function() {
		var _user_photo = $(this);
		//$(this).css({'border-style':'solid', 'border-width':'1px', 'border-color':'cdcdcd', 'width':'100px'});

    var _image = new Image(); 
    _image.src = userPhotoBaseUrl_100+ $(this).attr("id") +".gif"; 
    $(_image).load( function(){ 
			$(_user_photo).attr('src',userPhotoBaseUrl_100+ $(_user_photo).attr("id") +".gif");
    }); 
	});
	$(".user_photo_original_by_migo, .user_photo_original_150_by_migo, .user_photo_original_full_by_migo").each(function() {
		var _user_photo = $(this);
		//$(this).css({'border-style':'solid', 'border-width':'1px', 'border-color':'cdcdcd', 'width':'100px'});

    var _image = new Image(); 
    _image.src = userPhotoBaseUrl_original+ $(this).attr("id") +".gif"; 
    $(_image).load( function(){ 
			$(_user_photo).attr('src',userPhotoBaseUrl_original+ $(_user_photo).attr("id") +".gif");
    }); 
	});


}); // base func()