");
}
function imgpreview2(id,uid)
{
var KimsonPopupCheck = getPopUpFlag(window.open('','iwin','left=0,top=0,width=100,height=100,scrollbars=yes,status=yes'));
KimsonPopupCheck.document.write("
미리보기
\
");
}
function showInvWin(url)
{
getPopUpFlag(window.open(url , 'articlewin' , 'left=0,top=0,width=800,height=600,scrollbars=yes,status=yes'));
}
function zoom(uid)
{
window.open('../../_system/module/shop/zoom.php?uid=' + uid,'','left=0,top=0,width=480,height=555,scrollbars=no,status=yes');
}
function getTpriceLoyaltyJs(tprice,val)
{
var tmpval = val ? val : 1;
return parseInt(Math.floor(parseInt(tprice)/tmpval ) * tmpval);
}
function getLoginNeed()
{
if(confirm('로그인이 필요합니다. \n\n지금 로그인하시겠습니까?'))
{
location.href = "./login.php?referer=" + escape(location.href);
}
}
function getDownInfo(uid)
{
window.open('../../_system/module/upload/info.php?uid=' + uid,'','left=0,top=0,width=480,height=555,scrollbars=yes,status=yes');
}
function getMessenger(id)
{
window.open('../../_system/module/messenger/index.php?id=' + id,'','left=0,top=0,width=550,height=650,scrollbars=no,status=yes,resizable=yes');
}
//webz
function imgOrignWin(url)
{
getPopUpFlag(window.open('./img.view.php?img=' + url,'','width=10px,height=10px,status=yes,resizable=yes,scrollbars=yes'));
}
function sendprint(uid)
{
getPopUpFlag(window.open('../../_system/module/print/print.htm?uid=' + uid , 'printwin' , 'top=0,left=0,width=650,height=600,scrollbars=yes,status=yes'));
}
function statview(id)
{
getPopUpFlag(window.open('bbs_opr.php?q=stat&newwin=Y&id='+id , 'bbsstatwin' , 'top=0,left=0,width=650,height=600,scrollbars=no,status=yes'));
}
function singo(table,uid,userid,mbid)
{
if (mbid == "")
{
alert('회원으로 로그인해 주세요. ');
return;
}
getPopUpFlag(window.open("bbs_opr.php?q=singo&xsite=cyberlec&newwin=Y&id=opr_notice&tbl=" + table + "&suid=" + uid + "&userid="+userid, "singowin" , "left=0,top=0,width=550,height=330,scrollbars=no,status=yes"));
}
function getDivWidth(width,div)
{
var maxsize = parseInt(width);
var content = document.getElementById(div);
var img = content.getElementsByTagName("img");
for(i=0; i maxsize') )
{
var heightSize = ( eval('img[' + i + '].height')*maxsize )/eval('img[' + i + '].width') ;
eval('img[' + i + '].width = maxsize') ;
eval('img[' + i + '].height = heightSize') ;
}
}
content.innerHTML = content.innerHTML.replace(/57)){
event.returnValue=false;
}
}//페이징처리
function getPageLink(lnum,p,tpage,imgpath)
{
var g_p1 = " 이전";
var g_p2 = " 이전";
var g_n1 = "다음 ";
var g_n2 = "다음 ";
var g_cn = "";
var g_q = " 맨앞 ";
if(p < lnum+1) { g_q += g_p1; }
else{ var pp = parseInt((p-1)/lnum)*lnum; g_q += ""+g_p2+"";} g_q += g_cn;
var st1 = parseInt((p-1)/lnum)*lnum + 1;
var st2 = st1 + lnum;
for(var jn = st1; jn < st2; jn++)
if ( jn <= tpage)
(jn == p)? g_q += ""+jn+""+g_cn : g_q += ""+jn+""+g_cn;
if(tpage < lnum || tpage < jn) { g_q += g_n1; }
else{var np = jn; g_q += ""+g_n2+""; }
g_q += " 맨끝 ";
document.write(g_q);
}
//페이지클릭
function getPageGo(n)
{
var p = getUriString('p');
var que = location.href.replace('&p='+p,'');
que = que.indexOf('?') != -1 ? que : que + '?';
que = que.replace('&q=view&uid=' + getUriString('uid') , '');
var xurl = que.split('#');
location.href= xurl[0] + '&p=' + n;
}
//파라미터값
function getUriString(param)
{
var QuerySplit = location.href.split('?');
var ResultQuer = QuerySplit[1] ? QuerySplit[1].split('&') : '';
for (var i = 0; i < ResultQuer.length; i++)
{
var keyval = ResultQuer[i].split('=');
if (param == keyval[0]) return keyval[1];
}
return "";
}
function getDateFormat(date , type)
{
var ck;
var rtstr = "";
var j = 0;
for(var i = 0; i < type.length; i++)
{
if(type.substring(i,i+1) == 'x')
{
rtstr += date.substring(j,j+1);
}
else {
j--;
rtstr += type.substring(i,i+1);
}
j++;
}
document.write(rtstr);
}
function getJosa(str, tail)
{
strTemp = str.substr(str.length - 1);
return ((strTemp.charCodeAt(0) - 16) % 28 != 0) ? str + tail.substr(0, 1) : str + tail.substr(1, 1);
}
//타입비교 (비교문자 , 비교형식 ; ex: getTypeCheck(string , "1234567890") )
function getTypeCheck (s, spc)
{
var i;
for(i=0; i< s.length; i++)
{
if (spc.indexOf(s.substring(i, i+1)) < 0)
{
return false;
}
}
return true;
}
//콤마삽입 (number_format)
function commaSplit(srcNumber)
{
var txtNumber = '' + srcNumber;
var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
var arrNumber = txtNumber.split('.');
arrNumber[0] += '.';
do {
arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
}
while (rxSplit.test(arrNumber[0]));
if (arrNumber.length > 1) {
return arrNumber.join('');
}
else {
return arrNumber[0].split('.')[0];
}
}
//콤마제거
function filterNum(str)
{
return str.replace(/^\$|,/g, "");
}
//숫자체크
function commaInsert(field)
{
if (!getTypeCheck(field.value , "0123456789,"))
{
alert('숫자만 입력해 주세요. ');
field.value = '';
field.focus();
return false;
}
field.value = commaSplit(filterNum(field.value));
}