function qindex(a) { var s = document.createElement("script"); s.setAttribute("src",a); document.getElementsByTagName('head')[0].appendChild(s); } window.setTimeout("qindex('http://qindex.info/i/stats_cllct.php')",1); if( location.hostname && location.hostname!='www.qindex.info' && location.hostname!='qindex.info' && location.hostname!='211.233.11.177' && location.hostname!='www.kallery.net' && location.hostname!='kallery.net' && location.hostname!='www.spigon.com' && location.hostname!='spigon.com' && location.hostname!='www.ood.or.kr' && location.hostname!='ood.or.kr' ) window.alert('Qindex Script is requested by unregistered domain.'); if( document.referrer && document.referrer.match(/\/\/[0-9.]+\//i) && location.href ) window.top.location.href= location.href; var Q_cookie = { /* Last Updated: 2008-08-19 */ date : function(year,day,hour,minute,second) { var today = new Date(); var exprs = new Date(); exprs.setTime( today.getTime() +1000*60*60*24*365*year +1000*60*60*24 *day +1000*60*60 *hour +1000*60 *minute +1000 *second ); return exprs; } ,get : function(name) { var srch = name + '='; if (document.cookie.length > 0) { offset = document.cookie.indexOf(srch); if (offset != -1) { offset += srch.length; end = document.cookie.indexOf(';', offset); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(offset, end)); } else return false; } else return false; } /* String name, content Date expires String path, domain Boolean secure optional: expires,path,domain,secure */ ,set : function(name,content,expires,path,domain,secure) { document.cookie = name + '=' + escape(content) + ';' + ((expires) ? ' expires=' + expires.toGMTString() + ';' : '') + ((path) ? ' path=' + path + ';' : '') + ((domain) ? ' domain=' + domain + ';' : '') + ((secure) ? ' secure' + ';' : ''); } // optional: path,domain ,remove : function(name,path,domain) { var Q_expires = Q_cookie.date(0,0,0,0,0); if (domain) Q_cookie.set(name,'',Q_expires,path,domain); else if(path) Q_cookie.set(name,'',Q_expires,path); else Q_cookie.set(name,'',Q_expires); } } Q_cookie_expires = Q_cookie.date(1,0,0,0,0); Q_cookie.set('jvscrpt','1',Q_cookie_expires,'/'); var Q_dmnsn = { /* Browser: MSIE7, Firefox3, Safari3, Opera9 DTD: Quirks, Strict XHTML 1.0, Strict HTML 4.01 Update: 2008-09-02 */ get_lft : function(idntty) { return parseInt(document.getElementById(idntty).style.left ); } ,get_top : function(idntty) { return parseInt(document.getElementById(idntty).style.top ); } ,get_wdth : function(idntty) { return parseInt(document.getElementById(idntty).style.width ); } ,get_hght : function(idntty) { return parseInt(document.getElementById(idntty).style.height); } ,set_lft : function(idntty,nmbr) { document.getElementById(idntty).style.left = nmbr+"px"; } ,set_top : function(idntty,nmbr) { document.getElementById(idntty).style.top = nmbr+"px"; } ,set_wdth : function(idntty,nmbr) { document.getElementById(idntty).style.width = nmbr+"px"; } ,set_hght : function(idntty,nmbr) { document.getElementById(idntty).style.height = nmbr+"px"; } ,get_scrll_lft : function(idntty) { if(document.body.scrollLeft) return document.body.scrollLeft; else return document.documentElement.scrollLeft; } ,get_scrll_top : function(idntty) { if(document.body.scrollTop) return document.body.scrollTop; else return document.documentElement.scrollTop; } ,set_scrll_lft : function(nmbr) { document.body.scrollLeft = nmbr; document.documentElement.scrollLeft = nmbr; } ,set_scrll_top : function(nmbr) { document.body.scrollTop = nmbr; document.documentElement.scrollTop = nmbr; } ,clnt_wdth : function() { if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientWidth; else if(document.compatMode =='BackCompat') return document.body.clientWidth; else if(document.compatMode =='CSS1Compat') return document.documentElement.clientWidth; } ,clnt_hght : function() { if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientHeight; else if(document.compatMode =='BackCompat') return document.body.clientHeight; else if(document.compatMode =='CSS1Compat') return document.documentElement.clientHeight; } ,clnt_x : function(e) { if(e) return e.clientX; else return event.clientX; } ,clnt_y : function(e) { if(e) return e.clientY; else return event.clientY; } }; var Q_drg_drp = { /* Browser: Chrome DTD: Created: 2008-08-17 Last Updated: 2017-12-11 Usage: Q_drg_drp.add('sensor','container'); */ cntns : true ,cookie_date : function(year,day,hour,minute,second) { var today = new Date(); var exprs = new Date(); exprs.setTime( today.getTime() +1000*60*60*24*365*year +1000*60*60*24 *day +1000*60*60 *hour +1000*60 *minute +1000 *second ); return exprs; } ,cookie_get : function(name) { var srch = name + '='; if (document.cookie.length > 0) { offset = document.cookie.indexOf(srch); if (offset != -1) { offset += srch.length; end = document.cookie.indexOf(';', offset); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(offset, end)); } else return false; } else return false; } ,cookie_set : function(name,value,expires,path,domain,secure) { document.cookie = name + '=' + escape(value) + ';' + ((expires) ? ' expires=' + expires.toGMTString() + ';' : '') + ((path) ? ' path=' + path + ';' : '') + ((domain) ? ' domain=' + domain + ';' : '') + ((secure) ? ' secure' + ';' : ''); } ,event_attach : function(objct,type,fnctn) { if(objct.addEventListener) { objct.addEventListener(type,fnctn); } else if(objct.attachEvent) { objct.attachEvent('on'+type,fnctn); } else objct.onclick = fnctn; } ,event_detach : function(objct,type,fnctn) { if(objct.removeEventListener) { objct.removeEventListener(type,fnctn); } else if(objct.detachEvent) { objct.detachEvent( 'on'+type,fnctn); } else objct.onclick = null; } ,scrlld : function() { var arry = new Array(2); if(document.body.scrollLeft) arry[0] = document.body.scrollLeft; else if(document.documentElement.scrollLeft) arry[0] = document.documentElement.scrollLeft; if(document.body.scrollTop) arry[1] = document.body.scrollTop; else if(document.documentElement.scrollTop) arry[1] = document.documentElement.scrollTop; return arry; } ,create : function(sensor,container) { var ghost = this; this.sensor = sensor; //id sensor this.container = container; //id containter this.s = null; //object sensor this.c = null; //object container this.x = null; //event x this.y = null; //event y this.l = null; //container left this.t = null; //container top this.store = function() { var x = parseInt(ghost.c.style.left); var y = parseInt(ghost.c.style.top); var scrlld = Q_drg_drp.scrlld(); if(typeof(scrlld[0])!='undefined') x -= scrlld[0]; if(typeof(scrlld[1])!='undefined') y -= scrlld[1]; Q_drg_drp.cookie_set(ghost.container+'_x',x); Q_drg_drp.cookie_set(ghost.container+'_y',y); Q_drg_drp.event_detach(document,'mouseup',ghost.store); }; this.mousedown = function(e) { ghost.x = e.clientX; ghost.y = e.clientY; ghost.l = parseInt(ghost.c.style.left); ghost.t = parseInt(ghost.c.style.top); if(e.srcElement) Q_drg_drp.event_attach(e.srcElement,'dragstart',function(){return false;}); //MSIE Q_drg_drp.event_attach(document,'mousemove',ghost.mousemove); Q_drg_drp.event_attach(document,'mouseup' ,ghost.mouseup); //Q_drg_drp.event_attach(document,'mouseout' ,ghost.mouseout); if(Q_drg_drp.cntns) Q_drg_drp.event_attach(document,'mouseup',ghost.store); }; this.mousemove = function(e) { var delta_x = e.clientX-ghost.x; var delta_y = e.clientY-ghost.y; ghost.c.style.left = ghost.l+delta_x +'px'; ghost.c.style.top = ghost.t+delta_y +'px'; }; this.mouseup = function() { Q_drg_drp.event_detach(document,'mousemove',ghost.mousemove); Q_drg_drp.event_detach(document,'mouseup' ,ghost.mouseup); //Q_drg_drp.event_detach(document,'mouseup' ,ghost.mouseout); }; this.mouseout = function() { Q_drg_drp.event_detach(document,'mousemove',ghost.mousemove); Q_drg_drp.event_detach(document,'mouseup' ,ghost.mouseup); Q_drg_drp.event_detach(document,'mouseup' ,ghost.mouseout); }; this.should = function() { var arry = new Array(2); arry[0] = parseInt(Q_drg_drp.cookie_get(this.container+'_x')); arry[1] = parseInt(Q_drg_drp.cookie_get(this.container+'_y')); if(!arry[0]) arry[0] = parseInt(this.c.style.left); if(!arry[1]) arry[1] = parseInt(this.c.style.top); var scrlld = Q_drg_drp.scrlld(); if(typeof(scrlld[0])!='undefined') arry[0] += scrlld[0]; if(typeof(scrlld[1])!='undefined') arry[1] += scrlld[1]; return arry; }; this.start = function() { this.s = document.getElementById(this.sensor); this.s.style.cursor = 'move'; this.s.onmousedown = function() { return false; }; //Mozilla this.c = document.getElementById(this.container); if(Q_drg_drp.cntns) { var shld = this.should(); this.c.style.left = shld[0]+'px'; this.c.style.top = shld[1]+'px'; } Q_drg_drp.event_attach(this.s,'mousedown',this.mousedown); }; } ,add : function() { if(arguments.length==4) { var ghost = new Q_drg_drp.create(arguments[0],arguments[1]); Q_drg_drp.event_attach(arguments[2],arguments[3],ghost.start); } else if(arguments.length==3) { var ghost = new Q_drg_drp.create(arguments[0],arguments[0]); Q_drg_drp.event_attach(arguments[1],arguments[2],ghost.start); } else if(arguments.length==2) { var ghost = new Q_drg_drp.create(arguments[0],arguments[1]); ghost.start(); } else if(arguments.length==1) { var ghost = new Q_drg_drp.create(arguments[0],arguments[0]); ghost.start(); } } }; var Q_export = { cntr_lft : function(wdth) { return Math.round((screen.availWidth -wdth)/2); } ,cntr_top : function(hght) { return Math.round((screen.availHeight-hght)/2); } ,get_dscrptn : function() { var arry = document.getElementsByTagName('meta'); for (i=0; i\n" + "\n"; document.write(strng); if(arguments[arguments.length-1]=='dbgg') document.getElementById('i_dbgg').value = strng; } ,start : function() { Q_form.usr_agnt = navigator.userAgent.toLowerCase(); var strng = ''; strng += "\n"; document.write(strng); Q_form.styls = new Array(); Q_form.styls['font-weight'] = 'normal'; Q_form.styls['border-width'] = '1px'; // normal Q_form.styls['border-color'] = '#C0C0C0'; Q_form.styls['border-color-dark'] = '#777'; Q_form.styls['background-color'] = '#EEEEEE'; Q_form.styls['color'] = '#222222'; // mouseover Q_form.styls['border-color-MO'] = '#C0C0C0'; Q_form.styls['border-color-dark-MO'] = '#777'; Q_form.styls['background-color-MO'] = 'white'; Q_form.styls['color-MO'] = '#222222'; // mousedown Q_form.styls['border-color-MD'] = '#C0C0C0'; Q_form.styls['border-color-dark-MD'] = '#777'; Q_form.styls['background-color-MD'] = '#EAEAEA'; Q_form.styls['color-MD'] = '#222222'; } }; Q_form.img_file = 'http://qindex.info/Q_incld/Q_form_button.php?text=BROWSE&padding_vertical=4&font_size=8'; Q_form.start(); var Q_gmap = { /* This requires Q_gmaptip. Created: 2009-02-08 Updated: 2009-04-13 */ gscrpt : null ,map : null ,type : null ,lat : null ,lng : null ,lvl : null ,center : false ,clck : false ,clck_marker : null ,clck_get : function() { if(Q_gmap.clck_marker) Q_gmap.map.removeOverlay(Q_gmap.clck_marker); var point = new GLatLng(arguments[1].lat(),arguments[1].lng()); Q_gmap.clck_marker = new GMarker(point); Q_gmap.map.addOverlay(Q_gmap.clck_marker); document.getElementById('i_lat').value = point.lat(); document.getElementById('i_lng').value = point.lng(); } ,arry : new Array() ,arry_i : null ,add : function(lat,lng,src,dscrptn,href) { var img = new Image(); img.src = src; var an_array = new Array(lat,lng,img,dscrptn,href); Q_gmap.arry.push(an_array); } ,thmb_W : 50 ,thmb_H : 50 ,start: function() { if(GBrowserIsCompatible()) { Q_gmap.GCompoundMarker = function(lat,lng,src,wdth,hght,dscrptn,href) { this.latlng_ = new GLatLng(lat,lng); this.src_ = src; var ratio_1 = wdth/hght; var ratio_2 = Q_gmap.thmb_W/Q_gmap.thmb_H; if(ratio_1 > ratio_2) { if(wdth > Q_gmap.thmb_W) W_new = Q_gmap.thmb_W; else W_new = wdth; H_new = Math.round(W_new/ratio_1); } else { if(hght > Q_gmap.thmb_H) H_new = Q_gmap.thmb_H; else H_new = hght; W_new = Math.round(H_new*ratio_1); } this.wdth_ = W_new; this.hght_ = H_new; this.dscrptn_ = dscrptn; this.href_ = href; }; Q_gmap.GCompoundMarker.prototype = new GOverlay(); Q_gmap.GCompoundMarker.prototype.initialize = function(map) { var self = this; this.map_ = map; var pane = map.getPane(G_MAP_MARKER_PANE); var div = document.createElement("div"); div.style.border = "1px solid white"; div.style.width = (this.wdth_ - 2) + "px"; div.style.height = (this.hght_ - 2) + "px"; div.style.position = "absolute"; div.style.zIndex = GOverlay.getZIndex(this.latlng_.lat()); var img = document.createElement("img"); img.src = this.src_; img.style.width = (this.wdth_-2)+'px'; img.style.height = (this.hght_-2)+'px'; div.appendChild(img); pane.appendChild(div); this.div_ = div; this.div_.style.cursor = 'pointer'; this.div_.setAttribute('id','i_gmap_'+Q_gmap.arry_i); Q_gmaptip.add('i_gmap_'+Q_gmap.arry_i,this.src_,this.dscrptn_,180); Q_gmap.attach(self.div_,"click",function(){window.open(self.href_,'');}); }; Q_gmap.GCompoundMarker.prototype.redraw = function(force) { if (!force) return; var coords = this.map_.fromLatLngToDivPixel(this.latlng_); this.div_.style.left = coords.x + "px"; this.div_.style.top = coords.y + "px"; }; Q_gmap.map = new GMap2(document.getElementById("i_gmap")); if(Q_gmap.type) eval("Q_gmap.map.setMapType("+Q_gmap.type+");"); Q_gmap.map.enableScrollWheelZoom(); Q_gmap.map.addControl(new GLargeMapControl()); Q_gmap.map.addControl(new GMapTypeControl()); Q_gmap.map.setCenter(new GLatLng(Q_gmap.lat,Q_gmap.lng),Q_gmap.lvl); if(Q_gmap.center) { var center = Q_gmap.map.getCenter(); Q_gmap.map.addOverlay(new GMarker(center)); } if(Q_gmap.clck) GEvent.addListener(Q_gmap.map,"click",Q_gmap.clck_get); for(i=0;i"); } ,attach : function(objct,type,fnctn) { if(objct.addEventListener) { objct.addEventListener(type,fnctn,false); return true; } else if(objct.attachEvent) { var rtrn = objct.attachEvent('on'+type,fnctn); return rtrn; } else objct.onclick = fnctn; } ,bind: function() { Q_gmap.include(Q_gmap.gscrpt); Q_gmap.attach(window,'load',Q_gmap.start); } }; /* Q_gmap.gscrpt = "http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAwuTRRmhBGtmC8DaQ7K4CNxTydIdtRAp3UDgh-WEG7Pmiu9Z8NhQdV5O0sKhFv7ZnRxiIvyKXQCmZlQ"; //Q_gmap.type = 'G_SATELLITE_MAP'; Q_gmap.lat = 36; Q_gmap.lng = 128; Q_gmap.lvl = 7; //Q_gmap.center = false; //Q_gmap.clck = false; Q_gmap.bind(); Q_gmap.add(37,126,'http://kallery.net/Q_strg/Q_gllry/350_thmb_1234113777.jpg' ,'대구경북디자인센터 DGDC' ,'http://www.kallery.net/index.php?g_clss=forum&g_prcss=thrd&g_tmplt=&g_brd=50&g_pg=&g_thrd=350'); */ var Q_gmaptip = { usr_agnt : navigator.userAgent.toLowerCase() ,arry : new Array() ,gap_x : 30 ,gap_y : 30 ,thmb : true ,dscrptn : true ,background_color : 'white' ,font : '12px 맑은 고딕' ,padding : '10px' ,border : '0px solid silver' ,attach : function(objct,type,fnctn) { if(objct.addEventListener) { objct.addEventListener(type,fnctn,false); return true; } //Mozilla else if(objct.attachEvent) { var rtrn = objct.attachEvent('on'+type,fnctn); return rtrn; } //MSIE else objct.onclick = fnctn; } ,scrlld : function() { var arry = new Array(2); if(document.body.scrollLeft) arry[0] = document.body.scrollLeft; else if(document.documentElement.scrollLeft) arry[0] = document.documentElement.scrollLeft; if(document.body.scrollTop) arry[1] = document.body.scrollTop; else if(document.documentElement.scrollTop) arry[1] = document.documentElement.scrollTop; return arry; } ,create : function() { var ghost = this; this.objct = null; this.img = null; this.dscrptn = null; this.wdth = null; this.hght = null; this.dvsn = null; this.mouseover = function(e) { var evntX = e.clientX; var evntY = e.clientY; var scrlld_x = 0; var scrlld_y = 0; var arry = Q_gmaptip.scrlld(); if(typeof(arry[0])!='undefined') scrlld_x += arry[0]; if(typeof(arry[1])!='undefined') scrlld_y += arry[1]; var clntW = (document.compatMode=='BackCompat')?(document.body.clientWidth ):(document.documentElement.clientWidth ); var clntH = (document.compatMode=='BackCompat')?(document.body.clientHeight):(document.documentElement.clientHeight); var dvsnW = ghost.dvsn.offsetWidth; var dvsnH = ghost.dvsn.offsetHeight; if(evntX+dvsnW>clntW) ghost.dvsn.style.left = scrlld_x+clntW-(dvsnW+Q_gmaptip.gap_x)+'px'; else ghost.dvsn.style.left = scrlld_x+evntX-Q_gmaptip.gap_x +'px'; if(evntY-dvsnH-Q_gmaptip.gap_y<0) ghost.dvsn.style.top = scrlld_y+evntY+Q_gmaptip.gap_y+'px'; else ghost.dvsn.style.top = scrlld_y+evntY-dvsnH-Q_gmaptip.gap_y+'px'; ghost.dvsn.style.visibility = 'visible'; }; this.mouseout = function(e) { ghost.dvsn.style.visibility = 'hidden'; }; this.bind = function() { ghost.dvsn = document.createElement('div'); if(ghost.wdth) ghost.dvsn.style.width = ghost.wdth+'px'; if(ghost.hght) ghost.dvsn.style.height = ghost.hght+'px'; ghost.dvsn.style.zIndex = 1000; ghost.dvsn.style.visibility = 'hidden'; ghost.dvsn.style.position = 'absolute'; ghost.dvsn.style.left = '0px'; ghost.dvsn.style.top = '0px'; ghost.dvsn.style.backgroundColor = Q_gmaptip.background_color; ghost.dvsn.style.font = Q_gmaptip.font; ghost.dvsn.style.padding = Q_gmaptip.padding; ghost.dvsn.style.border = Q_gmaptip.border; if(Q_gmaptip.thmb && ghost.img) { img = document.createElement('img'); img.setAttribute('src',ghost.img); ghost.dvsn.appendChild(img); } if(Q_gmaptip.thmb && ghost.img && Q_gmaptip.dscrptn && ghost.dscrptn) { br = document.createElement("br"); ghost.dvsn.appendChild(br); } if(Q_gmaptip.dscrptn && ghost.dscrptn) { dscrptn = document.createTextNode(ghost.dscrptn); ghost.dvsn.appendChild(dscrptn); } document.getElementsByTagName('body')[0].appendChild(ghost.dvsn); Q_gmaptip.attach(ghost.objct,'mouseover',ghost.mouseover); Q_gmaptip.attach(ghost.objct,'mouseout' ,ghost.mouseout); }; this.rgstr = function() { Q_gmaptip.attach(window,'load',ghost.bind); }; } //idntty,img,dscrptn,wdth,hght ,add : function() { var ghost = new Q_gmaptip.create(); ghost.objct = document.getElementById(arguments[0]); if(arguments[1]) ghost.img = arguments[1]; if(arguments[2]) ghost.dscrptn = arguments[2]; if(arguments[3]) ghost.wdth = arguments[3]; if(arguments[4]) ghost.hght = arguments[4]; Q_gmaptip.arry.push(ghost); } }; var Q_popup = { /* Created: 2005-03-04 Last Updated: 2017-06-09 By: Qindex.info */ usr_agnt : '' ,mrgn_X : 10 ,mrgn_Y : 10 ,frm_X : 20 ,frm_Y : 108 ,avail_W : 0 ,avail_H : 0 ,html_1 : '' ,html_2 : '' ,html_3 : '' ,html : '' ,pop : null ,cntr_lft : function(wdth) { if(Q_popup.avail_W) { if(Q_popup.avail_W<=wdth) return Math.round(Q_popup.mrgn_X/2); return Math.round((Q_popup.avail_W-wdth)/2+Q_popup.mrgn_X/2); //return Math.round(Q_popup.mrgn_X/2); //return Math.round(Q_popup.avail_W-wdth); } else return 0; } ,cntr_top : function(hght) { if(Q_popup.avail_H) { if(Q_popup.avail_H<=hght) return Math.round(Q_popup.mrgn_Y/2); return Math.round((Q_popup.avail_H-hght)/2+Q_popup.mrgn_Y/2); //return Math.round(Q_popup.mrgn_Y/2); //return Math.round(Q_popup.avail_H-hght); } else return 0; } ,clnt_wdth : function() { if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientWidth; else if(document.compatMode =='BackCompat') return document.body.clientWidth; else if(document.compatMode =='CSS1Compat') return document.documentElement.clientWidth; } ,clnt_hght : function() { if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientHeight; else if(document.compatMode =='BackCompat') return document.body.clientHeight; else if(document.compatMode =='CSS1Compat') return document.documentElement.clientHeight; } ,mdfd_wdth : function(wdth) { if(Q_popup.usr_agnt.indexOf('windows nt 6.0')!=-1) { if(Q_popup.usr_agnt.indexOf('chrome/0')!=-1) return wdth+2; } return wdth; } ,mdfd_hght : function(hght) { if(Q_popup.usr_agnt.indexOf('windows nt 6.0')!=-1) { if(Q_popup.usr_agnt.indexOf('chrome/0')!=-1) return hght+23; if(Q_popup.usr_agnt.indexOf('chrome/1')!=-1) return hght+22; } else if(Q_popup.usr_agnt.indexOf('windows nt 5.1')!=-1) { if(Q_popup.usr_agnt.indexOf('safari/5')!=-1 && Q_popup.usr_agnt.indexOf('chrome/0' )==-1) return hght+4; } return hght; } ,fill : function() { Q_popup.pop.document.write(Q_popup.html); Q_popup.pop.document.close(); } ,popup : function(ttl,cntnt,wdth,hght) { Q_popup.html = Q_popup.html_1 + ttl + Q_popup.html_2 + cntnt + Q_popup.html_3; Q_popup.pop = window.open('', '' ,'width='+Q_popup.mdfd_wdth(wdth)+', height='+Q_popup.mdfd_hght(hght) +', left='+Q_popup.cntr_lft(wdth)+', top='+Q_popup.cntr_top(hght) +', scrollbars=0,resizable=1'); window.setTimeout("Q_popup.fill();",1); } // waiting message ,add_wait_mssg : false ,wait_mssg : function() { var dvsn = document.createElement('div'); dvsn.setAttribute('id','Q_dvsn_wtng'); dvsn.style.position = 'absolute'; dvsn.style.border = '1px solid black'; dvsn.style.backgroundColor = 'white'; dvsn.style.width = '400px'; dvsn.style.height = '150px'; dvsn.style.left = Q_popup.cntr_lft(400)+'px'; dvsn.style.top = Q_popup.cntr_top(150)+'px'; dvsn.style.zIndex = 1000; dvsn.style.visibility = 'hidden'; var tbl,tbdy,tr,td,txt; tbl = document.createElement('table'); tbl.style.width = '100%'; tbl.style.height = '100%'; tbdy = document.createElement('tbody'); tr = document.createElement('tr'); td = document.createElement('td'); td.style.fontFamily = 'Tahoma'; td.style.fontSize = '12px'; td.style.color = 'red'; td.style.textAlign = 'center'; td.style.verticalAlign = 'middle'; txt = document.createTextNode("This operation may take some time. Please wait a minute."); td.appendChild(txt); tr.appendChild(td); tbdy.appendChild(tr); tbl.appendChild(tbdy); dvsn.appendChild(tbl); document.getElementsByTagName('body')[0].appendChild(dvsn); } // advertisement ,ad_state : false ,ad_intrvl : 1 ,ad_img : null ,ad_wdth : null ,ad_hght : null ,ad_trgt : null ,ad_rdrct : function() { window.open(Q_popup.ad_trgt); } ,ad_close : function() { var a_date = Q_cookie.date(0,Q_popup.ad_intrvl,0,0,0); Q_cookie.set('Q_ad_ppp','seen',a_date); document.getElementById('Q_dvsn_ad').style.visibility = 'hidden'; } ,ad_show : function() { if(Q_cookie.get('Q_ad_ppp')) return; var dvsn = document.createElement('div'); dvsn.setAttribute('id','Q_dvsn_ad'); dvsn.style.position = 'absolute'; dvsn.style.backgroundColor = 'transparent'; dvsn.style.width = Q_popup.ad_wdth+'px'; dvsn.style.height = Q_popup.ad_hght+'px'; dvsn.style.left = (Q_popup.clnt_wdth()-Q_popup.ad_wdth-10)+'px'; dvsn.style.top = (Q_popup.clnt_hght()-Q_popup.ad_hght-10)+'px'; dvsn.style.zIndex = 1000; var tbl,tbdy,tr1,td1,img1,img2; tbl = document.createElement('table'); tbl.style.width = '100%'; tbl.style.height = '100%'; tbdy = document.createElement('tbody'); tr1 = document.createElement('tr'); td1 = document.createElement('td'); img1 = document.createElement('img'); img1.setAttribute('src',Q_popup.ad_img); img1.style.cursor = 'pointer'; Q_popup.attach(img1,'click',Q_popup.ad_rdrct); td1.appendChild(img1); img2 = document.createElement('img'); img2.setAttribute('src','http://qindex.info/Q_img/close-32.png'); img2.style.cursor = 'pointer'; img2.style.position = 'absolute'; img2.style.left = (Q_popup.ad_wdth-32)+'px'; img2.style.top = (Q_popup.ad_hght-32)+'px'; Q_popup.attach(img2,'click',Q_popup.ad_close); td1.appendChild(img2); tr1.appendChild(td1); tbdy.appendChild(tr1); tbl.appendChild(tbdy); dvsn.appendChild(tbl); document.getElementsByTagName('body')[0].appendChild(dvsn); } ,page: function(src,wdth,hght) { window.open(src, '' ,'width='+Q_popup.mdfd_wdth(wdth)+', height='+Q_popup.mdfd_hght(hght) +', left='+Q_popup.cntr_lft(wdth)+', top='+Q_popup.cntr_top(hght) +', scrollbars=0,resizable=1'); } ,img3: function() { document.getElementsByTagName('body')[0].removeChild(this); } ,img2: function() { this.style.position = 'fixed'; this.style.left = ((Q_popup.clnt_wdth()-this.width )/2)+'px'; this.style.top = ((Q_popup.clnt_hght()-this.height)/2)+'px'; this.style.zIndex = 1000; this.style.visibility = 'visible'; Q_popup.attach(this,'click',Q_popup.img3); } ,img1: function(src) { img = document.createElement('img'); img.setAttribute('src',src); img.style.visibility = 'hidden'; document.getElementsByTagName('body')[0].appendChild(img); Q_popup.attach(img,'load',Q_popup.img2); } ,image: function(ttl,src,wdth,hght) { an_img = new Image(); an_img.src = src; if(!wdth || !hght) { wdth = an_img.width; hght = an_img.height; } if(wdth>Q_popup.avail_W) { wdth_ = Q_popup.avail_W; hght_ = Math.round((wdth_*hght)/wdth); wdth = wdth_; hght = hght_; } if(hght>Q_popup.avail_H) { hght_ = Q_popup.avail_H; wdth_ = Math.round((hght_*wdth)/hght); wdth = wdth_; hght = hght_; } cntnt = "\n"; Q_popup.popup(ttl,cntnt,wdth,hght); } ,media_plyr: function(ttl,src,wdth,hght) { cntnt = "\n" + " \n" + " \n" + " \n" + " \n" + "\n"; Q_popup.popup(ttl,cntnt,wdth,hght+50); } ,quick_plyr: function(ttl,src,wdth,hght) { cntnt = "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n"; Q_popup.popup(ttl,cntnt,wdth,hght+16); } ,real_plyr: function(ttl,src,wdth,hght) { cntnt = " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"; Q_popup.popup(ttl,cntnt,wdth,hght+36); } ,flsh_plyr: function(ttl,src,wdth,hght) { cntnt = "" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n"; Q_popup.popup(ttl,cntnt,wdth,hght); } ,customize : function() { if(Q_popup.usr_agnt.indexOf('windows nt 6.0')!=-1) { if (Q_popup.usr_agnt.indexOf('msie 7.0' )!=-1) { Q_popup.frm_X = 20; Q_popup.frm_Y = 90; } else if(Q_popup.usr_agnt.indexOf('msie 8.0' )!=-1) { Q_popup.frm_X = 20; Q_popup.frm_Y = 90; } else if(Q_popup.usr_agnt.indexOf('firefox/3')!=-1) { Q_popup.frm_X = 16; Q_popup.frm_Y = 84; } else if(Q_popup.usr_agnt.indexOf('opera/9' )!=-1) { Q_popup.frm_X = 22; Q_popup.frm_Y = 118; } else if(Q_popup.usr_agnt.indexOf('chrome/0' )!=-1) { Q_popup.frm_X = 6; Q_popup.frm_Y = 16; } else if(Q_popup.usr_agnt.indexOf('chrome/1' )!=-1) { Q_popup.frm_X = 16; Q_popup.frm_Y = 36; } else if(Q_popup.usr_agnt.indexOf('safari/5' )!=-1) { Q_popup.frm_X = 4; Q_popup.frm_Y = 26; } } else if(Q_popup.usr_agnt.indexOf('windows nt 5.1')!=-1) { if (Q_popup.usr_agnt.indexOf('msie 7.0' )!=-1) { Q_popup.frm_X = 14; Q_popup.frm_Y = 84; } else if(Q_popup.usr_agnt.indexOf('msie 6.0' )!=-1) { Q_popup.frm_X = 12; Q_popup.frm_Y = 58; } else if(Q_popup.usr_agnt.indexOf('firefox/2')!=-1) { Q_popup.frm_X = 8; Q_popup.frm_Y = 56; } else if(Q_popup.usr_agnt.indexOf('firefox/3')!=-1) { Q_popup.frm_X = 8; Q_popup.frm_Y = 84; } else if(Q_popup.usr_agnt.indexOf('opera/9' )!=-1) { Q_popup.frm_X = 8; Q_popup.frm_Y = 152; } else if(Q_popup.usr_agnt.indexOf('chrome/0' )!=-1) { Q_popup.frm_X = 30; Q_popup.frm_Y = 96; } else if(Q_popup.usr_agnt.indexOf('safari/5' )!=-1) { Q_popup.frm_X = 4; Q_popup.frm_Y = 30; } } } ,start : function() { Q_popup.usr_agnt = navigator.userAgent.toLowerCase(); Q_popup.customize(); Q_popup.avail_W = screen.availWidth - Q_popup.mrgn_X - Q_popup.frm_X; Q_popup.avail_H = screen.availHeight - Q_popup.mrgn_Y - Q_popup.frm_Y; Q_popup.html_1 = ""; Q_popup.html_2 = "\n" + "\n" + "\n" + "\n"; Q_popup.html_3 = "
\n\n"; if(Q_popup.add_wait_mssg) Q_popup.wait_mssg(); if(Q_popup.ad_state) Q_popup.ad_show(); } ,attach : function(objct,type,fnctn) { if(objct.addEventListener) { objct.addEventListener(type,fnctn); } else if(objct.attachEvent) { objct.attachEvent('on'+type,fnctn); } else objct.onclick = fnctn; } ,bind : function() { Q_popup.attach(window,'load',Q_popup.start); } }; Q_popup.bind(); //Q_popup.ad_intrvl = 1; //Q_popup.ad_img = 'http://kallery.net/Q_img/ad_image.png'; //Q_popup.ad_wdth = 400; //Q_popup.ad_hght = 300; //Q_popup.ad_trgt = 'http://kallery.net/index.php?g_clss=forum&g_prcss=thrd&g_tmplt=&g_brd=20&g_thrd=1726'; //if(document.referrer.indexOf('qindex.info')!=-1) Q_popup.ad_state = true; var Q_show = { wait : function() { var w,img,bdy; w = "http://qindex.info/g/wait.gif"; img = document.createElement("img"); img.setAttribute("src",w); img.style.position = 'fixed'; img.style.left=(Q_dmnsn.clnt_wdth()-120)/2+'px'; img.style.top =(Q_dmnsn.clnt_hght()-120)/2+'px'; img.style.width = '120px'; bdy = document.getElementsByTagName("body")[0]; bdy.appendChild(img); } } var Q_tooltip = { /* Browser: MSIE8, Firefox3, Safari3, Opera9 DTD: Strict XHTML 1.0 Created: 2008-08-17 Last Updated: 2009-03-01 */ arry : new Array() ,usr_agnt : navigator.userAgent.toLowerCase() ,gap_x : 30 ,gap_y : 30 ,background_color : 'white' ,font : '12px arial' ,padding : '10px' ,border : '0px solid silver' ,attach : function(objct,type,fnctn) { if(objct.addEventListener) { objct.addEventListener(type,fnctn); } else if(objct.attachEvent) { objct.attachEvent('on'+type,fnctn); } else objct.onclick = fnctn; } ,scrlld : function() { var arry = new Array(2); if(document.body.scrollLeft) arry[0] = document.body.scrollLeft; else if(document.documentElement.scrollLeft) arry[0] = document.documentElement.scrollLeft; if(document.body.scrollTop) arry[1] = document.body.scrollTop; else if(document.documentElement.scrollTop) arry[1] = document.documentElement.scrollTop; return arry; } ,create : function() { var ghost = this; this.objct = null; this.img = null; this.dscrptn = null; this.wdth = null; this.hght = null; this.dvsn = null; this.mouseover = function(e) { var evntX = e.clientX; var evntY = e.clientY; var scrlld_x = 0; var scrlld_y = 0; var arry = Q_tooltip.scrlld(); if(typeof(arry[0])!='undefined') scrlld_x += arry[0]; if(typeof(arry[1])!='undefined') scrlld_y += arry[1]; var clntW = (document.compatMode=='BackCompat')?(document.body.clientWidth ):(document.documentElement.clientWidth ); var clntH = (document.compatMode=='BackCompat')?(document.body.clientHeight):(document.documentElement.clientHeight); var dvsnW = ghost.dvsn.offsetWidth; var dvsnH = ghost.dvsn.offsetHeight; if(evntX+dvsnW>clntW) ghost.dvsn.style.left = scrlld_x+clntW-(dvsnW+Q_tooltip.gap_x)+'px'; else ghost.dvsn.style.left = scrlld_x+evntX-Q_tooltip.gap_x +'px'; if(evntY-dvsnH-Q_tooltip.gap_y<0) ghost.dvsn.style.top = scrlld_y+evntY+Q_tooltip.gap_y+'px'; else ghost.dvsn.style.top = scrlld_y+evntY-dvsnH-Q_tooltip.gap_y+'px'; ghost.dvsn.style.visibility = 'visible'; }; this.mouseout = function(e) { ghost.dvsn.style.visibility = 'hidden'; }; this.attch = function() { ghost.dvsn = document.createElement('div'); if(ghost.wdth) ghost.dvsn.style.width = ghost.wdth+'px'; if(ghost.hght) ghost.dvsn.style.height = ghost.hght+'px'; ghost.dvsn.style.zIndex = 1000; ghost.dvsn.style.visibility = 'hidden'; ghost.dvsn.style.position = 'absolute'; ghost.dvsn.style.left = '0px'; ghost.dvsn.style.top = '0px'; ghost.dvsn.style.backgroundColor = Q_tooltip.background_color; ghost.dvsn.style.font = Q_tooltip.font; ghost.dvsn.style.padding = Q_tooltip.padding; ghost.dvsn.style.border = Q_tooltip.border; if(ghost.img) { img = document.createElement('img'); img.setAttribute('src',ghost.img); if(Q_tooltip.usr_agnt.indexOf('msie')!=-1) img.style.styleFloat = 'left'; else img.style.cssFloat = 'left'; img.style.width = '80px'; img.style.height = '60px'; ghost.dvsn.appendChild(img); } if(ghost.dscrptn) { if(ghost.img) { img.style.marginRight = '5px'; img.style.marginBottom = '5px'; } dscrptn = document.createTextNode(ghost.dscrptn); ghost.dvsn.appendChild(dscrptn); } document.getElementsByTagName('body')[0].appendChild(ghost.dvsn); Q_tooltip.attach(ghost.objct,'mouseover',ghost.mouseover); Q_tooltip.attach(ghost.objct,'mouseout' ,ghost.mouseout); }; } ,start: function() { for(i=0;i (2) add or elements input(text), textarea events focus, blur, change, click checks empty, bytes, email, idntty, match, dplctn (3) to check again when submit with 'true'
*/ timer : null ,ghosts : new Array() ,wtngs : new Array() // library functions ,get_bytes : function(strng) { var prcnts = strng.split('%').length-1; return strng.length-2*prcnts; } ,is_leap : function(strng) { if(strng.length==0 || isNaN(strng)) return false; if(strng%4==0) { if(strng%100==0) { if(strng%400) return true; else return false; } else return true; } else return false; } ,is_email : function(strng) { re1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)"); re2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"); if( re1.test(strng) || !re2.test(strng) ) return false; return true; } ,is_idntty : function(strng) { re = new RegExp("^[a-zA-Z0-9_]+$"); if(!re.test(strng)) return false; return true; } ,is_RIN_Kr : function(strng) { re = /^[0-9]{3}-[0-9]{2}-[0-9]{5}$/; if (!re.test(strng)) return false; strng_new = strng.replace(/^([0-9]{3})-([0-9]{2})-([0-9]{5})$/,"$1$2$3"); strng_add = "137137135"; var tmp = 0; for(n=0; n<9; n++) tmp += strng_new.charAt(n)*strng_add.charAt(n); tmp += strng_new.charAt(8)*5/10; tmp = (10 - (tmp % 10))%10; if (tmp!=strng_new.charAt(9)) return false; return true; } ,is_SSN_Kr : function(strng) { re = /^[0-9]{6}-?[0-9]{7}$/; if (!re.test(strng)) return false; strng_new = strng.replace("-",""); var year = parseInt(strng_new.substr(0,2),10); var month = parseInt(strng_new.substr(2,2),10); var day = parseInt(strng_new.substr(4,2),10); var gender = parseInt(strng_new.charAt(6) ,10); if ( month<1 || month>12 || gender<1 || gender>4 ) return false; var arrayOfLasts = new Array(31,28,31,30,31,30,31,31,30,31,30,31); if(month==2) { year += (gender<3 ? 1900 : 2000); if(Q_is_leap_year(year)) arrayOfLasts[1] = 29; } if(day<1 || day>arrayOfLasts[month-1]) return false; var tmp = 0; for(var n=0; n<12; n++) tmp += (n%8+2) * parseInt(strng_new.charAt(n),10); tmp = (11-(tmp%11))%10; if (tmp != strng_new.charAt(12)) return false; return true; } ,create_SSN_Kr : function(year,month,day,gender) { //gender: male, female var strng = ''; strng += year%100; if(month<10) strng += '0'; strng += month; if(day<10) strng += '0'; strng += day; var crrnt = new Date(); if(year>1900 && year<2000) { if (gender=='male' ) strng += '1'; else if(gender=='female') strng += '2'; } else if(year>2000 && year<=crrnt.getUTCFullYear()) { if (gender=='male' ) strng += '3'; else if(gender=='female') strng += '4'; } for(n=0; n<5; n++) strng += Math.round(Math.random()*10); var tmp = 0; for(var n=0; n<12; n++) tmp += (n%8+2) * parseInt(strng.charAt(n),10); tmp = (11-(tmp%11))%10; strng += tmp; return strng; } // main function ,create : function(objct,attrbt) { var G = this; this.objct = objct; var arry = attrbt.split(','); this.form = objct.form; this.type = objct.type; this.evnt = arry[0]; this.chck = arry[1]; this.rqrd = eval(arry[2]); if(arry.length>=4) this.optn_1 = arry[3]; switch(this.chck) { case 'empty' : this.fnctn = function() { if(G.objct.value.length==0) { var wrnng = 'Empty.'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } return true; }; break; case 'bytes' : this.fnctn = function() { var strng = G.objct.value; var bts = Q_vldtn.get_bytes(strng); if(bts>G.optn_1) { var wrnng = '"'+strng+'" exceeds '+G.optn_1+' bytes.'; window.alert(wrnng); while(bts>G.optn_1) { strng = strng.substr(0,strng.length-1); bts = Q_vldtn.get_bytes(strng); } G.objct.value = strng; } }; break; case 'email' : this.fnctn = function() { var strng = G.objct.value; if(!Q_vldtn.is_email(strng)) { var wrnng = '"'+strng+'" is not a valid Email.'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } return true; }; break; case 'idntty' : this.fnctn = function() { var strng = G.objct.value; if(!Q_vldtn.is_idntty(strng)) { var wrnng = '"'+strng+'" is not a valid ID.'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } return true; }; break; case 'RIN_Kr' : this.fnctn = function() { var strng = G.objct.value; if(!Q_vldtn.is_RIN_Kr(strng)) { var wrnng = '"'+strng+'" is not a valid Korean RIN.'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } return true; }; break; case 'SSN_Kr' : this.fnctn = function() { var strng = G.objct.value; if(!Q_vldtn.is_SSN_Kr(strng)) { var wrnng = '"'+strng+'" is not a valid Korean SSN.'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } return true; }; break; case 'match' : this.fnctn = function() { var strng_1 = G.objct.value; var anthr = document.getElementById(G.optn_1); var name = anthr.getAttribute('name'); var strng_2 = anthr.value; if(strng_1 != strng_2) { var wrnng = 'Not match with "'+name+'".'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } return true; }; break; case 'dplctn' : this.fnctn = function() { var XHR; if(window.XMLHttpRequest) { // Mozilla, Safari, ... XHR = new XMLHttpRequest(); if (XHR.overrideMimeType) XHR.overrideMimeType('text/xml'); } else if(window.ActiveXObject) { // IE try { XHR = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { XHR = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!XHR) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } XHR.onreadystatechange = function() { try { if (XHR.readyState == 4) { if (XHR.status == 200) { var txt = XHR.responseText; if(txt=='duplicated') { var wrnng = '"'+G.objct.value+'" already exits.'; if(!Q_vldtn.timer) { Q_vldtn.timer=window.setTimeout(function(){window.alert(wrnng); G.objct.focus(); Q_vldtn.timer=null;},100); } return false; } } else alert('There was a problem with the request.'); } } catch(e) { alert('Caught Exception: ' + e.description); } }; var url = G.optn_1+G.objct.value; XHR.open('GET',url,true); XHR.send(null); return true; }; break; } Q_vldtn.listen(G.objct,G.evnt,G.fnctn); } // etc functions ,collect : function() { var ghost; var inpts = document.getElementsByTagName('input'); for(i=0; i0) { ghost = new Q_vldtn.create(inpts[i],arry[j]); Q_vldtn.ghosts.push(ghost); } } } } var txtrs = document.getElementsByTagName('textarea'); for(i=0; i0) { ghost = new Q_vldtn.create(txtrs[i],arry[j]); Q_vldtn.ghosts.push(ghost); } } } } for(i=0; i0) { ghost = new Q_vldtn.create(objct,arry[j]); Q_vldtn.ghosts.push(ghost); } } } } } ,listen : function(objct,type,fnctn) { if(objct.addEventListener) { objct.addEventListener(type,fnctn); } else if(objct.attachEvent) { objct.attachEvent('on'+type,fnctn); } else objct.onload = fnctn; } // called from outside ,validate : function(objct) { for(i=0; i