
﻿(function(window,$){if(!window.DF)window.DF={};if(!window.DF.Common)window.DF.Common={};window.DF.Common=window.DF.Common=function(){return new window.DF.Common.fn.init();};window.DF.Common.fn=window.DF.Common.prototype={init:function(){return this;}};window.DF.Common.fn.init.prototype=window.DF.Common.prototype;window.DF.Common.extend=window.DF.Common.fn.extend=function()
{if(!arguments[0])return false;if(this.constructor!==Object)return false;var length=arguments.length;var target=this;for(var i=0;i<length;i++)
{var options=arguments[i];for(name in options)
{var src=target[name];var copy=options[name];if(target===copy)continue;if(copy!==undefined)target[name]=copy;}}};window.DF.Common.fn.extend({os:{},bw:{ag:navigator.userAgent.toLowerCase(),ie5:function(){return this.ag.indexOf('msie 5')>-1?true:false;},ie6:function(){return this.ag.indexOf('msie 6')>-1?true:false;},ie7:function(){return this.ag.indexOf('msie 7')>-1?true:false;},ie8:function(){return this.ag.indexOf('msie 8')>-1?true:false;},ff:function(){return this.ag.toLowerCase().indexOf('firefox')>-1?true:false;},opera:function(){return window.opera?true:false;},safari:function(){return this.ag.indexOf('safari')>-1?true:false;},crome:function(){return this.ag.indexOf('chome')>-1?true:false;}},type:{isObj:function(arg){return arg&&arg.constructor===Object||false;},isArr:function(arg){return arg&&arg.constructor===Array||false;},isFnc:function(arg){return arg&&arg.constructor===Function||false;},isStr:function(arg){return arg&&arg.constructor===String||false;},isNum:function(arg){return arg&&arg.constructor===Number||false;},isBool:function(arg){return arg&&arg.constructor===Boolean||false;},isNull:function(arg){return arg===null?true:false;},isUndefined:function(arg){return String(typeof(arg))==='undefined'?true:false;}},convert:{baseString:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encodeBase64:function(arg)
{if(!arg)return false;var ret="";var c1="";var c2="";var c3="";var e1="";var e2="";var e3="";var e4="";arg=DF.Common.fn.convert.UTF8(arg);var i=0;while(i<arg.length){c1=arg.charCodeAt(i++);c2=arg.charCodeAt(i++);c3=arg.charCodeAt(i++);e1=c1>>2;e2=((c1&3)<<4)|(c2>>4);e3=((c2&15)<<2)|(c3>>6);e4=c3&63;if(isNaN(e2))e3=e4=64;if(isNaN(e3))e4=64;ret=ret
+this.baseString.charAt(e1)
+this.baseString.charAt(e2)
+this.baseString.charAt(e3)
+this.baseString.charAt(e4)}
return ret;},decodeBase64:function(arg){if(!arg)return false;var ret=[];var c1="";var c2="";var c3="";var e1="";var e2="";var e3="";var e4="";arg=arg.replace(/[^A-Za-z0-9\+\/\=]/g,"");var i=0;while(i<arg.length){e1=this.baseString.indexOf(arg.charAt(i++));e2=this.baseString.indexOf(arg.charAt(i++));e3=this.baseString.indexOf(arg.charAt(i++));e4=this.baseString.indexOf(arg.charAt(i++));c1=(e1<<2)|(e2>>4);c2=((e2&15)<<4)|(e3>>2);c3=((e3&3)<<6)|e4;ret+=String.fromCharCode(c1);if(e3!==64)ret+=String.fromCharCode(c2);if(e4!==64)ret+=String.fromCharCode(c3);}
ret=DF.Common.fn.convert.UTF8(ret);return ret;},UTF8:function(arg)
{if(!arg)return false;var ret=[];arg=arg?arg.replace(/\r\n/g,"\n"):"";for(var n=0;n<arg.length;n++){var c=arg.charCodeAt(n);if(c<128){ret.push(String.fromCharCode(c));}
else if((c>127)&&(c<2048)){ret.push(String.fromCharCode((c>>6)|192));ret.push(String.fromCharCode((c&63)|128));}
else{ret.push(String.fromCharCode((c>>12)|224));ret.push(String.fromCharCode(((c>>6)&63)|128));ret.push(String.fromCharCode((c&63)|128));}}
return ret.join("");}},file:{},cookie:{get:function(n){var cookie=document.cookie;var start=0;var end=cookie.length;if(cookie.indexOf(n+'=')===-1)return undefined;start=parseInt(cookie.indexOf(n+'='),10);if(cookie.indexOf("; ",start)>-1){end=parseInt(cookie.indexOf("; ",start),10);end=end-start;}
return DF.Common.fn.convert.decodeBase64(cookie.substr(start,end).split('=')[1]);},set:function(n,val,domain,expires){expires=expires||1;domain=domain||"fpscamp.com";var today=new Date();today.setDate(date.getDate()+expires);if(val){val=DF.Common.fn.convert.encodeBase64(val);document.cookie=n+"="+val+"; path=/; expires="+today.toGMTString()+"; domain="+domain+";";}},remove:function(n,domain){domain=domain||"fpscamp.com";var today=new Date();today.setDate(date.getDate()+-1);document.cookie=n+"=; path=/; expires="+today.toGMTString()+"; domain="+domain+";";}},events:{relatedEventFilter:function(target,relatedTarget,callback){if(!target||!relatedTarget)return false;if(relatedTarget){while(relatedTarget){if(relatedTarget===target)return false;relatedTarget=relatedTarget.parentNode;}}
callback(target);},preventDefault:function(e){if(window.event)e.returnValue=false;else if(e.preventDefault)e.preventDefault();},stopPropagation:function(e){if(window.event)e.cancelBubble=true;else if(e.stopPropagation)e.stopPropagation();}}});})(window,jQuery);(function(window,$){window.DF.Net={Ajax:function(options){return new this.Ajax.fn.init(options);},Include:function(url,onload){return new this.Include.fn.init(url,onload);}}
var buffer=[];DF.Net.Ajax.fn=DF.Net.Ajax.prototype={init:function(options)
{this.xhr=null;this.url='';this.method='post';this.type='text';this.data={};this.headers={'Content-type':'application/x-www-form-urlencoded'};this.isoverlay=true;this.opacity=45;this.isLoadingbar=true;this.target=null;this.onerror=function(){;};this.onload=function(){;};this.onsuccess=function(){;};this.onloaded=function(){;};this.isLoad=false;this.isLoaded=false;DF.Common.extend.call(this,options);return this;}};DF.Net.Ajax.fn.init.prototype=DF.Net.Ajax.fn;window.DF.Common.extend.call(DF.Net.Ajax.fn,{request:function(form)
{if(!this.url){alert('request url not found');return false;};var length=buffer.length;buffer.push(length);if(form)
{if(!(form&&(form.nodeName&&form.nodeName.toLowerCase()==='form'))){alert('request form not found');return false;}
this.requestForm(form,length);}
else
{this.xhr=this.getXhr();var parameters=this.getParamSerialize(this.data);var tmp_onload=this.onload;var overlay_buffer=0;this.onload=function()
{if(this.isoverlay)
{overlay_buffer=DF.UI.Overlay({target:this.target,opacity:this.opacity,isLoadingbar:this.isLoadingbar}).on();}
tmp_onload();};var tmp_onloaded=this.onloaded;this.onloaded=function(){if(this.isoverlay)DF.UI.Overlay().off(overlay_buffer);tmp_onloaded();};this.method=this.method.toLowerCase();this.url=this.method==='get'&&parameters?this.url+'?'+parameters+'&timer='+new Date().toUTCString():this.url;this.xhr.open(this.method,this.url,true);this.setHeaders(this.headers);if(this.xhr.overrideMimeType)this.xhr.setRequestHeader('Connection','close');if(!this.isLoad){this.isLoad=true;this.onload();}
(function(o){o.xhr.onreadystatechange=function(){o.reqHandler();};})(this);if(this.method==='get')this.xhr.send(null);else if(this.method==='post')this.xhr.send(parameters+'&timer='+new Date().toUTCString());}},getXhr:function(){if(DF.Common().type.isUndefined(window.XMLHttpRequest))return new ActiveXObject(DF.Common().bw.ie5()?'Microsoft.XMLHTTP':'Msxml2.XMLHTTP');else if(window.XMLHttpRequest)return new XMLHttpRequest;},getXhrParsingData:function(){var ret='';var ptn=/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/g;var isXml=false;var contentType=this.xhr.getResponseHeader('content-type');if(contentType)isXml=(contentType.indexOf('xml')>=0);ret=(this.type.toLowerCase()==='xml'&&isXml)?this.xhr.responseXML:this.type.toLowerCase()==='text'?this.xhr.responseText.replace(ptn,''):this.xhr.responseText;return ret;},reqHandler:function(){if(this.xhr.readyState===4&&this.isLoad&&!this.isLoaded)
{if(this.isReqonerror(this.xhr.status))this.onerror();else this.onsuccess(this.getXhrParsingData(),this.xhr.status);this.onloaded();this.isLoad=false;this.isLoaded=true;this.xhr.abort();this.xhr=null;}},isReqonerror:function(status){var ret=true;try
{if(!status&&location.protocol==='file:')ret=false;if(parseInt(status,10)>=200&&parseInt(status,10)<300)ret=false;else if(parseInt(status,10)===304)ret=false;if(DF.Common().bw.safari()&&DF.Common().type.isUndefined(status))ret=false;}
catch(e){;}
return ret;},setHeaders:function(options){if(!options||!DF.Common().type.isObj(options))return false;for(var n in options)if(options[n]!=='')this.xhr.setRequestHeader(n,options[n]);},getParamSerialize:function(options){if(!options||!DF.Common().type.isObj(options))return false;var ret=[];for(var n in options)ret.push(n+'='+encodeURIComponent(options[n]));return ret.join('&');},retvalue:{},requestForm:function(form,bufferLength)
{this.retvalue={form:form,ifm:null,response:null};this.setFormParameters(this.data);var con=document.createElement('div');$(con).attr('id','upload_target_container'+bufferLength).css({'position':'absolute','left':-9999,'top':-9999}).html('<iframe id=\'upload_target'+bufferLength+'\' name=\'upload_target'+bufferLength+'\' height=\'0\'></iframe>');$(document.body).append($(con));this.retvalue.ifm=$('#upload_target'+bufferLength)[0];this.retvalue.form.encoding='multipart/form-data';this.retvalue.form.method=this.method;this.retvalue.form.action=this.url;this.retvalue.form.target=this.retvalue.ifm.name;var tmp_onload=this.onload;var overlay_buffer=0;this.onload=function(){if(this.isoverlay){overlay_buffer=DF.UI.Overlay({target:this.target,opacity:this.opacity,isLoadingbar:this.isLoadingbar}).on();}
tmp_onload();};var tmp_onloaded=this.onloaded;this.onloaded=function()
{if(this.isoverlay)DF.UI.Overlay().off(overlay_buffer);if(this.retvalue.ifm&&this.retvalue.ifm.parentNode)$(this.retvalue.ifm.parentNode).remove();for(var n in this.data)if(this.retvalue.form.elements[n]&&this.retvalue.form.elements[n].nodeType===1&&this.retvalue.form.elements[n].type==='hidden')$(this.retvalue.form.elements[n]).remove();tmp_onloaded();};if(!this.isLoad){this.isLoad=true;this.onload();}
(function(o){o.successtimerid=window.setInterval(function(){o.checkReqonloaded();},100);})(this);(function(o){o.loadedtimerid=window.setInterval(function(){o.checkReqHandler();},100);})(this);},successtimerid:null,checkReqonloaded:function(){if(this.retvalue.ifm&&this.retvalue.ifm.contentWindow)
{if(this.retvalue.ifm.contentWindow.document.documentElement)
{var html=$(this.retvalue.ifm.contentWindow.document.documentElement).html();if(html)
{this.retvalue.response=$(this.retvalue.ifm.contentWindow.document.documentElement).html();this.isLoaded=true;window.clearInterval(this.successtimerid);}}}},loadedtimerid:null,checkReqHandler:function()
{if(this.isLoaded)
{this.onsuccess(this.getIfmParsingData(),200,this.retvalue.form);this.onloaded();this.isLoad=false;this.isLoaded=true;window.clearInterval(this.loadedtimerid);}},setFormParameters:function(params)
{for(var n in params){if(!this.retvalue.form.elements[n]||this.retvalue.form.elements[n].nodeType!==1){var input=document.createElement('input');input.type='hidden';input.id=n;input.name=n;input.value=encodeURIComponent(params[n]);input.value=params[n];this.retvalue.form.appendChild(input);}}},getIfmParsingData:function(){var ret=this.retvalue.response;var ptn=/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/g;if(this.type.toLowerCase()==='text')ret=this.retvalue.response.replace(ptn,'');return ret;}});})(window,jQuery);(function(window,$){DF.Net.Include.fn=DF.Net.Include.prototype={init:function(url,onload)
{this.url=url;this.onload=onload;return this;}};DF.Net.Include.fn.init.prototype=DF.Net.Include.fn;window.DF.Common.extend.call(DF.Net.Include.fn,{});})(window,jQuery);(function(window,$){window.DF.UI={ImageViewer:this.ImageViewer=function(options){return new this.ImageViewer.fn.init(options);},Overlay:this.Overlay=function(options){return new this.Overlay.fn.init(options);},Tooltip:this.Tooltip=function(options,target){return new this.Tooltip.fn.init(options,target);},Lamp:this.Lamp=function(options){return new this.Lamp.fn.init(options);},Forms:this.Forms=function(options){return new this.Forms.fn.init(options);},POPs:this.POPs=function(){return new this.POPs.fn.init();},Drag:this.Drag=function(options){return new this.Drag.fn.init(options);}}
var _this={};DF.UI.ImageViewer.fn=DF.UI.ImageViewer.prototype={init:function(options)
{this.loadContents=null;this.loadedContentImages=[];this.heightLoadTimeout=100;this.widthLoadTimeout=500;this.wrap=null;this.wrapMarginLeft=0;this.wrapMarginTop=20;this.wrapMinWidth=250;this.wrapMinHeight=300;this.topHeight=25;this.contentHeight=0;this.footerHeight=4;this.wrapMaxWidth=1024;this.wrapMaxHeight=top.document.documentElement.clientHeight-((this.wrapMarginTop*2)+this.topHeight);this.arrowWidth=27;this.arrowHeight=31;this.skin='white';this.align='center';this.opacity=90;this.zIndex=9999;this.isarrow=true;this.iswheel=true;DF.Common.extend.call(this,options);this.create();_this=this;return this;}};DF.UI.ImageViewer.fn.init.prototype=DF.UI.ImageViewer.fn;DF.Common.extend.call(DF.UI.ImageViewer.fn,{create:function()
{this.loadContents=$('a[lang*=imageviewer]');if(!this.loadContents[0])return false;for(var i=0;i<this.loadContents.size();i++)
{if(this.loadContents[i]&&this.loadContents[i].nodeName.toLowerCase()==='a')
{if(this.loadContents[i].childNodes[0]&&this.loadContents[i].childNodes[0].nodeName.toLowerCase()==='img')
{this.tmpLoadContents.push(this.loadContents[i]);this.tmpLoadImages.push(this.loadContents[i].childNodes[0]);var loadImage=new Image();loadImage.src=this.loadContents[i].childNodes[0].src;this.initLoadImages.push(loadImage);var popLoadImage=new Image();popLoadImage.src=this.loadContents[i].href=this.loadContents[i].href||this.loadContents[i].childNodes[0].src;this.initPOPLoadImages.push(popLoadImage);}}}
(function(o){o.initLoadImagesTimerId=window.setInterval(function(){o.initLoadImagess(o.tmpLoadContents,o.initAddEventHandler);},100);})(this);(function(o){window.setTimeout(function(){if(!o.isLoadedImages){window.clearInterval(o.initLoadImagesTimerId);o.initAddEventHandler(o.tmpLoadContents);}},o.initLoadTimeout);})(this);},initLoadImagesTimerId:null,initLoadTimeout:5000,initLoadImages:[],initPOPLoadImages:[],tmpLoadContents:[],tmpLoadImages:[],loadedImages:[],isLoadedImages:false,initLoadImagess:function(elements,onloaded){if(!elements[0]||!onloaded||onloaded.constructor!==Function)return false;for(var i=0;i<elements.length;i++)
{if(!this.initLoadImages[i].complete)
{var container=top.document.createElement('div');$(container).css({width:this.tmpLoadImages[i].width||24,height:this.tmpLoadImages[i].height||24,background:'#CFCFCF'});var tmpImg=new Image();$(tmpImg).css({position:'relative',top:((this.tmpLoadImages[i].height||24)/2)-(24/2),left:((this.tmpLoadImages[i].width||24)/2)-(24/2)});tmpImg.src='http://img.fpscamp.com/img/img_tool/common/image_loadinfo.net.gif';tmpImg.alt='loading image';tmpImg.title='loading image';$(container).append(tmpImg);elements[i].replaceChild(container,elements[i].childNodes[0]);}
else if(!this.isLoadedImage(this.loadedImages,this.initLoadImages[i])&&(this.initLoadImages[i].complete&&this.initPOPLoadImages[i].complete))
{this.initLoadImages[i].alt='click image';this.initLoadImages[i].title='click image'
elements[i].replaceChild(this.initLoadImages[i],elements[i].childNodes[0]);this.loadedContentImages.push(this.initPOPLoadImages[i]);this.loadedImages.push(this.initLoadImages[i]);}}
if(this.loadedImages.length===elements.length)
{window.clearInterval(this.initLoadImagesTimerId);onloaded.call(this,elements);this.isLoadedImages=true;}},isLoadedImage:function(loadedElements,loadElement){var ret=false;if(loadedElements.length>0)for(var el in loadedElements)if(loadedElements[el]===loadElement)ret=true;return ret;},initAddEventHandler:function(elements){$(elements).each(function(idx){$(this).bind('click',function(e){_this.createWrapElement(e.target,idx);return false;});});},overlay_buffer:0,createWrapElement:function(imgObject,idx){if(!imgObject)return false;this.removeElement(this.wrap);this.contentWidth=this.loadedContentImages[idx].width>=this.wrapMaxWidth?this.wrapMaxWidth:this.loadedContentImages[idx].width<=this.wrapMinWidth?this.wrapMinWidth:this.loadedContentImages[idx].width;this.contentHeight=this.loadedContentImages[idx].height>=this.wrapMaxHeight?this.wrapMaxHeight:this.loadedContentImages[idx].height<=this.wrapMinHeight?this.wrapMinHeight:this.loadedContentImages[idx].height;if(!$(top.document.getElementById('viewer_wrap'))[0])
{var w=top.document.createElement('div');$(w).attr({'id':'viewer_wrap','className':'DFImageViewerWrapper'}).css({zIndex:this.zIndex});var h=[];if(this.skin.toLowerCase()==='white')h.push('<div id=\'viewer_container\' class=\'DFImageViewer DFImageViewerWhite\'>\n');else if(this.skin.toLowerCase()==='black')h.push('<div id=\'viewer_container\' class=\'DFImageViewer DFImageViewerBlack\'>\n');h.push('<p id=\'viewer_left_arrow\' class=\'DFViewerArrowPrev\'><a href=\'#\' onclick=\'return false\'></a></p>');h.push('<p id=\'viewer_right_arrow\' class=\'DFViewerArrowNext\'><a href=\'#\' onclick=\'return false\'></a></p>');h.push('<p class=\'DFImageViewerBox\'>');h.push('<div class=\'DFImageViewerBox\'>');h.push('<div id=\'viewer_top\' class=\'DFViewerHeader\' style=\'\'><h1><p>FPSCAMP</p></h1><span><a href=\'#\' id=\'viewer_close\'></a></span></div>\n');h.push('<div id=\'viewer_content_container\' class=\'DFViewerContainer\' style=\'cursor:pointer;\' >\n');h.push('<div id=\'viewer_content\' class=\'DFViewerContent\' style=\'\' >\n');h.push('<div class=\'DFViewerInnerFrame\' >\n');h.push('<p id=\'viewer_loadingImage_container\' class=\'DFViewerLoading\' style=\'height:'+this.contentHeight+'px;\'><span>Image Loading...</span></p>\n');h.push('<div id=\'viewer_loadImage_container\' style=\'height:'+this.contentHeight+'px;\'></div>\n');h.push('</div>\n');h.push('</div>\n');h.push('<div id=\'viewer_footer\' class=\'DFViewerFooter\'><span></span><em></em></div>\n');h.push('</div>\n');h.push('<p id=\'viewer_content_expand\' class=\'DFViewerZoomer\'><a href=\'#\'>ZOOM</a></p>\n');h.push('</div>\n');h.push('</div>\n');h.push('</div>\n');$(w).html(h.join(''));$(top.document.body).append($(w));$(top.document.getElementById('viewer_left_arrow')).css({opacity:0});$(top.document.getElementById('viewer_right_arrow')).css({opacity:0});this.wrap=$(top.document.getElementById('viewer_wrap'));var overlay_buffer=0;DF.UI.Overlay({opacity:_this.opacity,zIndex:_this.overlayzIndex,onloaded:function()
{_this.loadWrapElement(imgObject,idx);if(_this.isarrow&&_this.align==='center'){if(idx>0)_this.createArrowLeftElement(idx);if(idx<_this.loadedContentImages.length-1)_this.createArrowRightElement(idx);}}}).on(-1);}},loadWrapElement:function(imgObject,idx){var left=0,_top=0;if(this.align==='center'){left=(($(top.document).scrollLeft()+(top.document.documentElement.clientWidth)/2)-(this.contentWidth/4))+this.wrapMarginLeft;_top=$(top.document).scrollTop()+this.wrapMarginTop;}
else if(this.align==='image'){left=($(imgObject).offset().left-(this.contentWidth/4)+(this.contentWidth/2))+this.wrapMarginLeft;_top=$(imgObject).offset().top+this.wrapMarginTop;}
this.wrap.css({width:this.contentWidth/3,height:this.contentHeight,left:left,top:_top}).animate({top:this.wrap[0].offsetTop},_this.heightLoadTimeout,function(){;}).animate({width:(this.contentWidth+(this.arrowWidth*2)),height:this.contentHeight+(this.topHeight+this.footerHeight),left:this.wrap[0].offsetLeft-(this.contentWidth/4)},_this.widthLoadTimeout,function(){_this.setContentElement(imgObject,idx);_this.addWrapHandler(idx);if(_this.loadedContentImages[idx].width>=_this.wrapMaxWidth||_this.loadedContentImages[idx].height>=_this.wrapMaxHeight){left=(($(top.document).scrollLeft()+(top.document.documentElement.clientWidth)/2)-(_this.contentWidth/2))+_this.wrapMarginLeft;_top=_this.wrapMarginTop;var expandProperty='left='+left+',top='+_top+',width='+_this.wrapMaxWidth+',height='+_this.loadedContentImages[idx].height+',scrollbars=yes';$(top.document.getElementById('viewer_content_expand')).css('display','block').bind('click',function(){window.open(imgObject.parentNode.href,'expandViewer',expandProperty);_this.removeViewerElements();return false;});}});},createArrowLeftElement:function(idx){var obj=$(top.document.getElementById('viewer_left_arrow'));this.loadArrowLeftElement(obj);this.addAllowLeftHandler(obj,idx);},createArrowRightElement:function(idx){var obj=$(top.document.getElementById('viewer_right_arrow'));this.loadArrowRightElement(obj);this.addAllowRightHandler(obj,idx);},loadArrowLeftElement:function(obj){if(!obj)return false;window.setTimeout(function(){obj.css({opacity:1});},500);},loadArrowRightElement:function(obj){if(!obj)return false;window.setTimeout(function(){obj.css({opacity:1});},500);},addWrapHandler:function(idx){if(this.iswheel&&this.align==='center'&&this.loadedContentImages.length>1)this.addWrapWheelHandler(idx);this.addWrapClickHandler();},addWrapWheelHandler:function(idx){var delta=0;$(top.document.body).bind('mousewheel',function(e){$(top.document.body).unbind('mousewheel');});$(top.document.body).unbind('mousewheel');$(this.wrap).bind('mousewheel',function(e)
{$(top.document.body).bind('mousewheel',function(){return false;});if(top.window.event.wheelDelta){delta=e.wheelDelta/120;if(window.opera)delta=-delta;}
delta=Math.round(delta);if(delta>0)
{if(idx>0){_this.createWrapElement(_this.tmpLoadContents[idx-1].childNodes[0],(idx-1));}
else{$(top.document.body).unbind('mousewheel');return false;}}
else if(delta<0)
{if(idx<_this.loadedContentImages.length-1){_this.createWrapElement(_this.tmpLoadContents[idx+1].childNodes[0],(idx+1));}
else{$(top.document.body).unbind('mousewheel');return false;}}});$(top.document.body).bind('DOMMouseScroll',function(e){$(top.document.body).unbind('DOMMouseScroll');});$(top.document.body).unbind('DOMMouseScroll');$(this.wrap).bind('DOMMouseScroll',function(e)
{$(top.document.body).bind('DOMMouseScroll',function(){return false;});if(e.detail)delta=-e.detail/3;if(delta>0)
{if(idx>0){_this.createWrapElement(_this.tmpLoadContents[idx-1].childNodes[0],(idx-1));}
else{$(top.document.body).unbind('DOMMouseScroll');return false;}}
else
{if(idx<_this.loadedContentImages.length-1){_this.createWrapElement(_this.tmpLoadContents[idx+1].childNodes[0],(idx+1));}
else{$(top.document.body).unbind('DOMMouseScroll');return false;}}});},addWrapClickHandler:function(){$(top.document.getElementById('overlay_container-1')).click(function(e){_this.removeViewerElements();});$(top.document.getElementById('viewer_close')).click(function(){_this.removeViewerElements();return false;});},addAllowLeftHandler:function(allowObject,idx){if(!allowObject)return false;allowObject.find('a').click(function(){_this.createWrapElement(_this.tmpLoadContents[idx-1].childNodes[0],(idx-1));return false;});},addAllowRightHandler:function(allowObject,idx){if(!allowObject)return false;allowObject.find('a').click(function(){_this.createWrapElement(_this.tmpLoadContents[idx+1].childNodes[0],(idx+1));return false;});},setContentElement:function(obj,idx){if(!obj)return false;var alt='Dragon fly viewer';var title='Dragon fly viewer';$(top.document.getElementById('viewer_loadingImage_container')).remove();$(top.document.getElementById('viewer_loadImage_container')).html(['<p><img src=\''+obj.parentNode.href+'\' alt=\''+alt+'\' title=\''+title+'\' style=\'width:'+(this.contentWidth-(this.arrowWidth/3))+'px;height:'+this.contentHeight+'px;top:'+((this.contentHeight/2)-(this.loadContents[idx].height/2))+'px;left:'+((this.contentWidth/2)-(this.loadContents[idx].width/2))+'px;overflow:hidden;\' /></p>'].join(''));},isImageLoad:function(loadImageSrc){if(!loadImageSrc)return false;var img=new Image();img.src=loadImageSrc;return img.complete;},removeElement:function(obj){if(!obj)return false;obj.remove();},removeViewerElements:function(){this.removeElement(this.wrap);DF.UI.Overlay().off(-1);if(top.document.all){$(top.document.body).unbind('mousewheel');$(this.wrap).unbind('mousewheel');}
else{$(top.document.body).unbind('DOMMouseScroll');$(this.wrap).unbind('DOMMouseScroll');}
$(top.document.body).unbind('click');}});})(window,jQuery);(function(window,$){var buffer=[];DF.UI.Overlay.fn=DF.UI.Overlay.prototype={init:function(options)
{this.target=null;this.container=null;this.imgcontainer=null;this.loadingImageFilePath='http://img.fpscamp.com/img/img_tool/common/loadinfo_net.gif';this.opacity=45;this.zIndex=9990;this.bgcolor='#090808';this.isLoadingbar=false;this.loadingImageWidth=24;this.loadingImageHeight=24;this.onloaded=function(){;};DF.Common.extend.call(this,options);return this;}};DF.UI.Overlay.fn.init.prototype=DF.UI.Overlay.fn;DF.Common.extend.call(DF.UI.Overlay.fn,{on:function(index){var length=0;if(DF.Common().type.isUndefined(index))length=buffer.length;else length=index;if(!$(top.document.getElementById('overlay_container'+length))[0])
{var con=top.document.createElement('div');con.id='overlay_container'+length;top.document.body.appendChild(con);this.container=$(top.document.getElementById('overlay_container'+length));if(this.container[0])buffer.push('#overlay_container'+length);this.imgcontainer=top.document.createElement('div');this.imgcontainer.id='img_container';if(this.isLoadingbar)this.container.append($(this.imgcontainer));this.imgcontainer=$(top.document.getElementById('img_container'));if(!this.target)
{if(this.container[0])
{var root=top.document.documentElement||top.document.body;this.container.css({'position':'absolute','top':0,'left':0,'width':parseInt(root.scrollWidth),'height':parseInt(root.scrollHeight),'background':this.bgcolor,'zIndex':this.zIndex,'opacity':0});if(this.imgcontainer[0])
{this.imgcontainer.css({'position':'relative','left':($(top.document).scrollLeft()+$(top.document.documentElement)[0].clientWidth/2)-(this.loadingImageWidth/2),'top':($(top.document).scrollTop()+$(top.document.documentElement)[0].clientHeight/2)-(this.loadingImageHeight/2)}).html('<img id=\'loadImg\' src=\''+this.loadingImageFilePath+'\' alt=\'loading\' />');}}}
else if(this.target)
{if(this.container[0])
{this.container.css({'position':'absolute','top':$(this.target).offset().top,'left':$(this.target).offset().left,'width':this.target.innerWidth||this.target.clientWidth,'height':this.target.innerHeight||this.target.clientHeight,'background':this.bgcolor,'zIndex':this.zIndex,'opacity':0});}
if(this.imgcontainer[0])
{this.imgcontainer.css({'position':'relative','left':($(this.target).width()/2)-(this.loadingImageWidth/2),'top':($(this.target).height()/2)-(this.loadingImageHeight/2)}).html('<img id=\'loadImg\' src=\''+this.loadingImageFilePath+'\' alt=\'loading\' tile=\'loading\' />');}}}
(function(o){if($(top.document.getElementById('overlay_container'+length))[0])$(top.document.getElementById('overlay_container'+length)).css({opacity:(o.opacity/100)});if(o.onloaded&&DF.Common().type.isFnc(o.onloaded))window.setTimeout(function(){o.onloaded();},(300));})(this);return length;},off:function(length)
{if($(top.document.getElementById('overlay_container'+length))[0])$(top.document.getElementById('overlay_container'+length)).remove();}});})(window,jQuery);(function(window,$){var buffer=[];DF.UI.Tooltip.fn=DF.UI.Tooltip.prototype={init:function(options,target)
{this.width=450;this.height=0;this.message='';this.focusTarget=null;this.skin='white';this.position='center';this.opacity=45;this.zIndex=9999;this.isoverlay=false;this.isdrag=true;this.onload=function(){;};this.onremove=function(){;};this.onloaded=function(){;};if(DF.Common().type.isObj(options))DF.Common.extend.call(this,options);else if(DF.Common().type.isStr(options)){this.message=options;if(target&&target.nodeType===1)this.focusTarget=target;}
this.on();return this;}};DF.UI.Tooltip.fn.init.prototype=DF.UI.Tooltip.fn;DF.Common.extend.call(DF.UI.Tooltip.fn,{overlay_buffer_length:0,on:function()
{var _top=0;var left=0;var length=buffer.length;var w=top.document.createElement('div');var skinName=this.skin.toLowerCase()==='white'?'DFAlertWindowWhite':'DFAlertWindowBlack';$(w).attr({'id':'tooltip_wrap'+length,'className':'DFAlertWindow '+skinName});var h=[];h.push('<div class=\'DFAlertHeader\'>\n');h.push('<div><p>FPSCAMP</p><span></span></div>\n');h.push('</div>\n');h.push('<div class=\'DFAlertContainer\'>\n');h.push('<div class=\'DFAlertContent\'>\n');h.push('<table class=\'DFAlertMessage\' style=\'height:'+this.messageWindowHeight+'px;\'><tr><td>'+this.message+'</td></tr></table>');if(this.position==='center'){h.push('<p class=\'DFAlertFunction\'>\n');h.push('<span class=\'DFAlertCHECK\'><em id=\'btn_tooltip_confirm'+length+'\'><a href=\'#\' onclick=\'return false\'>확인</a></em></span>\n');h.push('</p>\n');}
else if(this.position==='confirm'){h.push('<p class=\'DFAlertFunction\'>\n');h.push('<span class=\'DFAlertCHECK\'><em id=\'btn_tooltip_confirm'+length+'\'><a href=\'#\' onclick=\'return false\'>확인</a></em></span>\n');h.push('<span class=\'DFAlertCLOSE\'><em id=\'btn_tooltip_close'+length+'\'><a href=\'#\' onclick=\'return false\'>닫기</a></em></span>\n');h.push('</p>\n');}
h.push('</div>\n');h.push('</div>\n');w.innerHTML=h.join('');top.document.body.appendChild(w);if($(top.document.getElementById('tooltip_wrap'+length)))buffer.push('#tooltip_wrap'+length);this.height=$(w).height();_top=$(top.document).scrollTop()+(top.document.documentElement.clientHeight/2)-(this.height/2);left=$(top.document).scrollLeft()+(top.document.documentElement.clientWidth/2)-(this.width/2);$(w).css({top:_top,left:left,width:this.width,opacity:0.0,zIndex:this.zIndex});var wrap=$(top.document.getElementById('tooltip_wrap'+length));if(this.isdrag)DF.UI.Drag({targets:$(w)}).on();$(top.document.getElementById('btn_tooltip_close'+length)).focus();if(this.position=='center'){(function(o){$(top.document.getElementById('btn_tooltip_confirm'+length)).click(function(){o.off(length);});})(this);}
else if(this.position=='confirm'){(function(o){$(top.document.getElementById('btn_tooltip_confirm'+length)).click(function(){o.off(length);});})(this);(function(o){$(top.document.getElementById('btn_tooltip_close'+length)).click(function(){o.off(length);o.onremove=function(){;};});})(this);}
if(this.isoverlay)this.overlay_buffer_length=DF.UI.Overlay({opacity:this.opacity}).on();(function(o,w){$(top.document.getElementById('btn_tooltip_confirm'+length)).find('a').focus();w.animate({opacity:1},50,function(){if(o.onload&&typeof(o.onload)==='function')o.onload();});})(this,wrap);},off:function(length){if(!$(top.document.getElementById('tooltip_wrap'+length))[0])return false;(function(o)
{$(top.document.getElementById('tooltip_wrap'+length)).animate({opacity:0.0},100,function()
{o.remove(length);o.onremove();o.onloaded();if(o.focusTarget)o.focusTarget.focus();if(o.isoverlay)DF.UI.Overlay().off(o.overlay_buffer_length);});})(this);},remove:function(length){if(!$(top.document.getElementById('tooltip_wrap'+length))[0])return false;$(top.document.getElementById('tooltip_wrap'+length)).remove();},getStringSize:function(str){return(str.length+(escape(str)+'/%u').match(/%u/g).length-1);}});})(window,jQuery);(function(window,$){DF.UI.Lamp.fn=DF.UI.Lamp.prototype={init:function(options)
{this.target=null;this.mouseTimeout=1.5;this.background='white';this.zIndex=9997;DF.Common.extend.call(this,options);this.create();return this;}}
DF.UI.Lamp.fn.init.prototype=DF.UI.Lamp.fn;DF.Common.extend.call(DF.UI.Lamp.fn,{create:function(){this.target=$('*[lang*=lamp]');if(!this.target[0])return false;this.createLampElement(this.target);this.initAddEventHandler(this.target);},createLampElement:function(elements){elements.css({'position':'relative'});},mouseTimerId:null,overlay_buffer_length:0,initAddEventHandler:function(elements){(function(o){elements.each(function(idx)
{$(this).bind('mouseover',function(e){var target=this;DF.Common().events.relatedEventFilter(target,e.relatedTarget,function(){o.mouseTimerId=window.setTimeout(function(){o.on(target);},o.mouseTimeout*1000);});})
$(this).bind('mouseout',function(e){var target=this;DF.Common().events.relatedEventFilter(target,e.relatedTarget,function(){window.clearTimeout(o.mouseTimerId);o.mouseTimerId=null;o.off(target);});});});})(this);},overlay:null,on:function(target){if(!target)return false;$(target).css({'background':'white','zIndex':this.zIndex});this.overlay_buffer_length=DF.UI.Overlay().on();},off:function(target){if(!target)return false;$(target).css({'background':'','zIndex':0});DF.UI.Overlay().off(this.overlay_buffer_length);}});})(window,jQuery);(function(window,$){var _this={};DF.UI.Forms.fn=DF.UI.Forms.prototype={init:function(options)
{this.forms=null;this.inputs=[];this.positions=[];this.onsubmits=[];DF.Common.extend.call(this,options);_this=this;this.create();return this;}}
DF.UI.Forms.fn.init.prototype=DF.UI.Forms.fn;DF.Common.extend.call(DF.UI.Forms.fn,{create:function()
{this.forms=$('body form[lang*=valid]');if(!this.forms[0])return false;this.forms.each(function(i){var arg=$.trim($(this).attr('lang')).split('=')[1];var split=$.trim(arg).split('|');_this.onsubmits[i]=(split[0]!==''&&split[0]!==undefined)?eval(split[0]):function(){;};var elem=$(this).find('[lang*=valid]');_this.inputs[i]=[];elem.each(function(k){var arg=$.trim(this.lang).split('=')[1];var split=$.trim(arg).split('|');_this.inputs[i][k]={obj:this,ptnName:split[0]||'',msg:split[1]||'',exp:split[2]||''};});$(this).submit(function(){var ret=_this.load(_this.inputs[i]);if(ret)_this.onsubmits[i](this);return ret;});});},load:function(elem){if(!elem[0])return false;for(var i=0;i<elem.length;i++)
{var arg=elem[i];if(arg&&DF.Common().type.isObj(arg)){if(!arg.obj||!arg.ptnName)continue;var mt=new _this.valids[arg.ptnName];if(mt)
{var tmp={};if(arg.ptnName.toLowerCase()==='custom')tmp={msg:arg.msg,exp:arg.exp};else tmp={msg:arg.msg};var ret=mt.test(arg.obj,tmp);if(!ret.test){DF.UI.Tooltip(ret.msg,arg.obj);return false;break;}}}}
return true;},valids:{empty:function(){this.msg='값을 입력해주세요.';this.exp=null;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;};},han:function(){this.msg='한글만 입력만 가능합니다.';this.exp=/^([가-힣]| ){1,}$/i;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;};},eng:function(){this.msg='영문만 입력만 가능합니다.';this.exp=/^([a-zA-Z]| ){1,}$/i;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},str:function(){this.msg='문자를 입력해주세요.';this.exp=/^([\w가-힣]| ){1,}$/i;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},num:function(){this.msg='숫자 입력만 가능합니다.';this.exp=/^([0-9]| ){1,}$/i;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},id:function(){this.msg='아이디가 없거나 형식이 올바르지 않습니다.';this.exp=/^[a-z0-9]{1,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!=''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},passWord:function(){this.msg='비밀번호가 없거나 형식이 올바르지 않습니다.';this.exp=/^[a-z0-9]{1,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},zipCode:function(){this.msg='우편번호가 없거나 정확히(3자리로) 입력해주세요.';this.exp=/^[0-9]{3}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},jumin1:function(){this.msg='주민번호앞(6자리)가 없거나 형식이 올바르지 않습니다.';this.exp=/^[0-9]{6}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},jumin2:function(){this.msg='주민번호뒤(7자리)가 없거나 형식이 올바르지 않습니다.';this.exp=/^[0-9]{7}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},email:function(){this.msg='메일이 없거나 형식이 올바르지 않습니다.';this.exp=/^([a-z0-9]){2,}\@([\w]){2,}\.([a-z]){2,3}(\.([a-z]){2,3})?$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},mailId:function(){this.msg='메일 아이디가 없거나 형식이 올바르지 않습니다.';this.exp=/^([a-z0-9]){2,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},mailDomain:function(){this.msg='메일 도메인이 없거나 형식이 올바르지 않습니다.';this.exp=/^([a-z0-9]){2,}\.([a-z]){2,3}(\.([a-z]){2,3})?$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},mobileNum:function(){this.msg='핸드폰번호가 없거나 정확히(3 ~ 4자리로) 입력해주세요.';this.exp=/^[0-9]{3,4}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},phoneNum:function(){this.msg='집번호가 없거나 정확히(3 ~ 4자리로) 입력해주세요.';this.exp=/^[0-9]{3,4}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},url:function(){this.msg='URL이 없거나 형식이 올바르지 않습니다.';this.exp=/^(http|https):\/\/([\w\W]{1,})$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=($.trim(obj.value)!==''&&this.exp.test(obj.value))?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},title:function(){this.msg='제목을 입력하세요.';this.exp=/^([\w]| ){1,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},content:function(){this.msg='내용을 입력하세요.';this.exp=/^([\w]| ){1,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},comment:function(){this.msg='댓글을 입력하세요.';this.exp=/^([\w]| ){1,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},file:function(){this.msg='파일을 입력하세요.';this.exp=null;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},video:function(){this.msg='동영상 소스를 입력하세요.';this.exp=null;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},search:function(){this.msg='검색어를 입력해주세요.';this.exp=null;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},gameInfo:function(){this.msg='사양정보가 없습니다.';this.exp=/^([\w]| ){1,}$/;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}},custom:function(){this.msg='';this.exp=null;this.test=function(obj,arg){obj.result={test:false,msg:''};if(arg&&arg.constructor===Object)for(var n in arg)if(arg[n]!==''&&arg[n]!==undefined)this[n]=arg[n];if(this.exp!==null)obj.result.test=($.trim(obj.value)!=''&&eval(this.exp).test(obj.value))?true:false;else obj.result.test=$.trim(obj.value)!==''?true:false;obj.result.msg=arg.msg||this.msg;return obj.result;}}}});})(window,jQuery);(function(window,$){DF.UI.POPs.fn=DF.UI.POPs.prototype={init:function()
{return this;}};DF.UI.POPs.fn.init.prototype=DF.UI.POPs.fn;window.DF.Common.extend.call(DF.UI.POPs.fn,{on:function(key,site,target,src,coords)
{if(!key||!site||!target||!src)return false;if(!this.getChecked(key))this.site[site.toLowerCase()](key,target,src,coords);},off:function(key)
{if($("#"+key)[0])
{if($("#"+key).css("display")==="block")$("#"+key).css({"display":"none"});}},site:{h:[],sof:function(key,target,src,coords)
{this.h=[];if(!$("#"+key)[0])
{coords=coords||"27,285,192,323";var wrap=document.createElement("div");$(wrap).attr({"id":key,"class":"popupWrapper"}).css({"marginLeft":-265,"zIndex":9998});this.h.push('<div class=\'popupContainer\'>');this.h.push('<div class=\'popupContent\'>');this.h.push('<p><img src=\'http://img.sofonline.co.kr/img/img_event/'+src+'\' usemap=\'#POPUP20110601-01-MAP\' alt=\'\' /></p>');this.h.push('<map name=\'POPUP20110601-01-MAP\'>');this.h.push('<area shape=\'rect\' coords=\''+coords+'\' href=\''+target+'\' title=\'이벤트 자세히 보기\' />');this.h.push('</map>');this.h.push('</div>');this.h.push('<div class=\'popupFooter\'><p>');this.h.push('<a href=\'#\' id=\'pop_checked'+key+'\'><img src=\'http://img.sofonline.co.kr/img_obt/img_common/popup_btn_block.gif\' alt=\'오늘 하루 이 창을 띄우지 않습니다.\' /></a>');this.h.push('<span><a href=\'#\' id=\'pop_close_btn'+key+'\'><img src=\'http://img.sofonline.co.kr/img_obt/img_common/popup_btn_close.gif\' alt=\'닫기\' /></a></span></p>');this.h.push('</div>');this.h.push('</div>');this.h.push('</div>');$(wrap).html(this.h.join(""));$(document.body).append(wrap);$('#pop_checked'+key).bind('click',function(){DF.Common().cookie.set(key,key);DF.UI.POPs.fn.off(key);});$('#pop_close_btn'+key).bind('click',function(){DF.UI.POPs.fn.off(key);});DF.UI.POPs.fn.drag($('#'+key));}},qw:function(key,target,src,coords)
{this.h=[];if(!$("#"+key)[0])
{coords=coords||"262,259,381,379";var wrap=document.createElement("div");$(wrap).attr({"id":key,"class":"popupWrapper"}).css({"marginLeft":-223,"zIndex":9998});this.h.push('<h2><img src=\'http://img.quakewars.co.kr/img/img_common/title_main_popup.gif\' alt=\'QUAKEWARS ONLINE\' /></h2>');this.h.push('<div class=\'popupContent\'>');this.h.push('<p><img src=\'http://img.quakewars.co.kr/img/img_event/'+src+'\' usemap=\'#POPUP20110601-01-MAP\' alt=\'\' /></p>');this.h.push('<map name=\'POPUP20110601-01-MAP\'>');this.h.push('<area shape=\'rect\' coords=\''+coords+'\' href=\''+target+'\' title=\'참가신청하기\' />');this.h.push('</map>');this.h.push('<div class=\'popupClose\'>');this.h.push('<label><input type=\'checkbox\' id=\'pop_checked\'/>오늘 하루 이 창을 열지 않겠습니다.</label>');this.h.push('<a href=\'#\' id=\'pop_close_btn\'><img src=\'http://img.quakewars.co.kr/img/img_common/btn_close_mainpop.gif\' alt=\'닫기\' /></a>');this.h.push('</div>');this.h.push('</div>');$(wrap).html(this.h.join(""));$(document.body).append(wrap);$('#pop_checked').bind('click',function(){DF.Common().cookie.set(key,key);DF.UI.POPs.fn.off(key);});$('#pop_close_btn').bind('click',function(){DF.UI.POPs.fn.off(key);});DF.UI.POPs.fn.drag($('#'+key));}},kr:function(key,target,src,coords)
{this.h=[];if(!$("#"+key)[0])
{coords=coords||"27,285,192,323";var wrap=document.createElement("div");$(wrap).attr({"id":key,"class":"popupWrapper"}).css({"marginLeft":-209,"zIndex":9998});this.h.push('<h2>');this.h.push('<img src=\'http://img.karma2.co.kr/img/img_common/title_main_popup.gif\' alt=\'QUAKEWARS ONLINE\' />');this.h.push('<a href="#" id=\'pop_close_btn\'><img src="http://img.karma2.co.kr/img/img_common/btn_main_popup_close.gif" alt="닫기" /></a>');this.h.push('</h2>');this.h.push('<div class=\'popupContent\'>');this.h.push('<p><img src=\'http://img.karma2.co.kr/img/img_event/'+src+'\' usemap=\'#POPUP20110601-01-MAP\' alt=\'\' /></p>');this.h.push('<map name=\'POPUP20110601-01-MAP\'>');this.h.push('<area shape=\'rect\' coords=\''+coords+'\' href=\''+target+'\' title=\'참가신청하기\' />');this.h.push('</map>');this.h.push('<div class=\'popupClose\'>');this.h.push('<label><input type=\'checkbox\' id=\'pop_checked\'/>오늘 하루 이 창을 열지 않겠습니다.</label>');this.h.push('</div>');$(wrap).html(this.h.join(""));$(document.body).append(wrap);$('#pop_checked').bind('click',function(){DF.Common().cookie.set(key,key);DF.UI.POPs.fn.off(key);});$('#pop_close_btn').bind('click',function(){DF.UI.POPs.fn.off(key);});DF.UI.POPs.fn.drag($('#'+key));}}},getChecked:function(key)
{var ret=false;if(DF.Common().cookie.get(key)!==undefined)ret=true;return ret;},drag:function(target)
{DF.UI.Drag({targets:target}).on();}});})(window,jQuery);(function(window,$){var movingObject=null;DF.UI.Drag.fn=DF.UI.Drag.prototype={init:function(options)
{this.targets=null;this.opacity=100;this.zindex=9999;this.ondrag=function(){;};this.onstart=function(){;};this.onstop=function(){;};DF.Common.extend.call(this,options);return this;}};DF.UI.Drag.fn.init.prototype=DF.UI.Drag.fn;window.DF.Common.extend.call(DF.UI.Drag.fn,{on:function()
{if(!this.targets[0])return false;var _this=this;this.targets.each(function(idx){var target=this;target.onmouseup=function(e){_this.onmouseup.call(_this,target,e);};target.onmousedown=function(e){_this.onmousedown.call(_this,target,e);};target.onmousemove=function(e){_this.onmousemove.call(_this,target,e);};target.ondragstart=function(){return false;};});},apos:{},rpos:{},onmousedown:function(target,e)
{var e=e||top.window.event;var elem=$(target);elem.css({'cursor':'pointer'});movingObject=elem;if(!movingObject[0])return false;this.apos[String(elem[0].id)]={x:e.clientX,y:e.clientY};this.rpos[String(elem[0].id)]={x:elem.offset().left-this.apos[String(elem[0].id)].x,y:elem.offset().top-this.apos[String(elem[0].id)].y};var _this=this;top.document.body.onmouseup=function(e){_this.onmouseup.call(_this,target,e);};top.document.body.onmousemove=function(e){_this.onmousemove.call(_this,target,e);};top.document.body.onselectstart=function(){return false;};DF.Common().events.preventDefault(e);DF.Common().events.stopPropagation(e);this.onmousestart(e);},onmousemove:function(target,e)
{if(!movingObject)return false;if(!movingObject[0])return false;var e=e||top.window.event;var elem=movingObject;elem.css({'margin':0,'padding':0,'left':e.clientX+this.rpos[elem[0].id].x,'top':e.clientY+this.rpos[String(elem[0].id)].y,'cursor':'move'});var targetsleft=parseInt(elem.css('left'),10)+elem.width();var targetstop=parseInt(elem.css('top'),10)+elem.height();var docleft=top.document.documentElement.clientWidth;var doctop=$(top.document).scrollTop()+top.document.documentElement.clientHeight;if(parseInt(elem.css('left'),10)<=0)elem.css({'left':0});if(parseInt(elem.css('top'),10)<=0)elem.css({'top':0});if(targetsleft>=docleft)elem.css({'left':docleft-elem.width()});if(targetstop>=doctop)elem.css({'top':doctop-elem.height()});DF.Common().events.preventDefault(e);DF.Common().events.stopPropagation(e);this.ondrag(e);},onmousestart:function(e)
{var e=e||top.window.event;if(this.opacity!==100)this.targets.css({opacity:(this.opacity/100)});this.onstart(e);},onmouseup:function(target,e)
{var e=e||top.window.event;var elem=$(target);top.document.body.onmousemove=null;top.document.body.onmouseup=null;top.document.body.onselectstart=null;if(this.opacity!==100)this.targets.css({opacity:1});this.targets.css({cursor:'pointer'});DF.Common().events.preventDefault(e);DF.Common().events.stopPropagation(e);this.onstop(e);movingObject=null;}});})(window,jQuery);
