$(document).ready(function(){var a=navigator.userAgent.toLowerCase();$.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());if($.browser.msie){$('body').addClass('browserIE');$('body').addClass('browserIE'+$.browser.version.substring(0,1))}if($.browser.chrome){$('body').addClass('browserChrome');a=a.substring(a.indexOf('chrome/')+7);a=a.substring(0,1);$('body').addClass('browserChrome'+a);$.browser.safari=false}if($.browser.safari){$('body').addClass('browserSafari');a=a.substring(a.indexOf('version/')+8);a=a.substring(0,1);$('body').addClass('browserSafari'+a)}if($.browser.mozilla){if(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1){$('body').addClass('browserFirefox');a=a.substring(a.indexOf('firefox/')+8);a=a.substring(0,1);$('body').addClass('browserFirefox'+a)}else{$('body').addClass('browserMozilla')}}if($.browser.opera){$('body').addClass('browserOpera')}});;(function($){var moz = $.browser.mozilla && /gecko/i.test(navigator.userAgent);var webkit = $.browser.safari && $.browser.version >= 3;var expr = $.browser.msie && (function(){var div = document.createElement('div');try{div.style.setExpression('width','0+0');}catch(e){return false;}return true;})();function sz(el,p){return parseInt($.css(el,p))||0;};function hex2(s){var s = parseInt(s).toString(16);return ( s.length < 2 ) ? '0'+s :s;};function gpc(node){for (;node && node.nodeName.toLowerCase() != 'html';node = node.parentNode ){var v = $.css(node,'backgroundColor');if (v == 'rgba(0,0,0,0)')continue;if (v.indexOf('rgb') >= 0){var rgb = v.match(/\d+/g);return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);}if ( v && v != 'transparent' )return v;}return '#ffffff';};function getWidth(fx,i,width){switch(fx){case 'round':return Math.round(width*(1-Math.cos(Math.asin(i/width))));case 'cool':return Math.round(width*(1+Math.cos(Math.asin(i/width))));case 'sharp':return Math.round(width*(1-Math.cos(Math.acos(i/width))));case 'bite':return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case 'slide':return Math.round(width*(Math.atan2(i,width/i)));case 'jut':return Math.round(width*(Math.atan2(width,(width-i-1))));case 'curl':return Math.round(width*(Math.atan(i)));case 'tear':return Math.round(width*(Math.cos(i)));case 'wicked':return Math.round(width*(Math.tan(i)));case 'long':return Math.round(width*(Math.sqrt(i)));case 'sculpt':return Math.round(width*(Math.log((width-i-1),width)));case 'dog':return (i&1) ? (i+1) :width;case 'dog2':return (i&2) ? (i+1) :width;case 'dog3':return (i&3) ? (i+1) :width;case 'fray':return (i%2)*width;case 'notch':return width;case 'bevel':return i+1;}};$.fn.corner = function(options){if (this.length == 0){if (!$.isReady && this.selector){var s = this.selector,c = this.context;$(function(){$(s,c).corner(options);});}return this;}return this.each(function(index){var $this = $(this);var o = (options || $this.attr($.fn.corner.defaults.metaAttr) || '').toLowerCase();var keep = /keep/.test(o);var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10;var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx = ((o.match(re)||['round'])[0]);var edges ={T:0,B:1};var opts ={TL:/top|tl|left/.test(o),TR:/top|tr|right/.test(o),BL:/bottom|bl|left/.test(o),BR:/bottom|br|right/.test(o)};if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )opts ={TL:1,TR:1,BL:1,BR:1};if ($.fn.corner.defaults.useNative && fx == 'round' && (moz || webkit) && !cc && !sc){if (opts.TL)$this.css(moz ? '-moz-border-radius-topleft' :'-webkit-border-top-left-radius',width + 'px');if (opts.TR)$this.css(moz ? '-moz-border-radius-topright' :'-webkit-border-top-right-radius',width + 'px');if (opts.BL)$this.css(moz ? '-moz-border-radius-bottomleft' :'-webkit-border-bottom-left-radius',width + 'px');if (opts.BR)$this.css(moz ? '-moz-border-radius-bottomright' :'-webkit-border-bottom-right-radius',width + 'px');return;}var strip = document.createElement('div');strip.style.overflow = 'hidden';strip.style.height = '1px';strip.style.backgroundColor = sc || 'transparent';strip.style.borderStyle = 'solid';var pad ={T:parseInt($.css(this,'paddingTop'))||0,R:parseInt($.css(this,'paddingRight'))||0,B:parseInt($.css(this,'paddingBottom'))||0,L:parseInt($.css(this,'paddingLeft'))||0};if (typeof this.style.zoom != undefined) this.style.zoom = 1;if (!keep) this.style.border = 'none';strip.style.borderColor = cc || gpc(this.parentNode);var cssHeight = $.curCSS(this,'height');for (var j in edges){var bot = edges[j];if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))){strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');var d = document.createElement('div');$(d).addClass('jquery-corner');var ds = d.style;bot ? this.appendChild(d) :this.insertBefore(d,this.firstChild);if (bot && cssHeight != 'auto'){if ($.css(this,'position') == 'static')this.style.position = 'relative';ds.position = 'absolute';ds.bottom = ds.left = ds.padding = ds.margin = '0';if (expr)ds.setExpression('width','this.parentNode.offsetWidth');else ds.width = '100%';}else if (!bot && $.browser.msie){if ($.css(this,'position') == 'static')this.style.position = 'relative';ds.position = 'absolute';ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';if (expr){var bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth');ds.setExpression('width','this.parentNode.offsetWidth - '+bw+'+ "px"');}else ds.width = '100%';}else{ds.position = 'relative';ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' :(pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';}for (var i=0;i < width;i++){var w = Math.max(0,getWidth(fx,i,width));var e = strip.cloneNode(false);e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';bot ? d.appendChild(e) :d.insertBefore(e,d.firstChild);}}}});};$.fn.uncorner = function(){if (moz || webkit)this.css(moz ? '-moz-border-radius' :'-webkit-border-radius',0);$('div.jquery-corner',this).remove();return this;};$.fn.corner.defaults ={useNative:true,metaAttr:'data-corner'};})(jQuery);(function($){$.fn.rcorner = function(param1,tr,bl,br){if (param1 == undefined) return false;else return this.each(function(){if (tr == undefined && bl == undefined && br == undefined){var radius = param1+'px';$(this).css('-moz-border-radius',radius).css('-webkit-border-radius',radius).css('border-radius',radius);}else{$(this).css('-moz-border-radius-topleft',param1 + 'px').css('-webkit-border-top-left-radius',param1 + 'px').css('border-top-left-radius',param1 + 'px');if (tr != undefined && tr != '') $(this).css('-moz-border-radius-topright',tr + 'px').css('-webkit-border-top-right-radius',tr + 'px').css('border-top-right-radius',tr + 'px');if (bl != undefined && bl != '') $(this).css('-moz-border-radius-bottomleft',bl + 'px').css('-webkit-border-bottom-left-radius',bl + 'px').css('border-bottom-left-radius',bl + 'px');if (br != undefined && br != '') $(this).css('-moz-border-radius-bottomright',br + 'px').css('-webkit-border-bottom-right-radius',br + 'px').css('border-bottom-right-radius',br + 'px');}});}})(jQuery);(function($){$.fn.center = function(absolute){if (absolute == true || absolute == 1 || absolute == 'true') var pos = 'absolute';else var pos = 'fixed';return this.each(function(){var pw = $(window).width();var ph = $(window).height();var tw = $(this).width();var th = $(this).height();var tl = (pw / 2) - (tw / 2);var tt = (ph / 2) - (th / 2);if (tt < 0) tt = 10;$(this).css({position:pos,left:tl,top:tt});});}})(jQuery);jQuery.cookie = function(name,value,options){if (typeof value != 'undefined'){options = options ||{};if (value === null){value = '';options = $.extend({},options);options.expires = -1;}var expires = '';if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)){var date;if (typeof options.expires == 'number'){date = new Date();date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));}else{date = options.expires;}expires = ';expires=' + date.toUTCString();}var path = options.path ? ';path=' + (options.path) :'';var domain = options.domain ? ';domain=' + (options.domain) :'';var secure = options.secure ? ';secure' :'';document.cookie = [name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue = null;if (document.cookie && document.cookie != ''){var cookies = document.cookie.split(';');for (var i = 0;i < cookies.length;i++){var cookie = jQuery.trim(cookies[i]);if (cookie.substring(0,name.length + 1) == (name + '=')){cookieValue = decodeURIComponent(cookie.substring(name.length + 1));break;}}}return cookieValue;}};(function($){jQuery.fn.pngFix = function(settings){settings = jQuery.extend({blankgif:'blank.gif'},settings);var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);if (jQuery.browser.msie && (ie55 || ie6)){jQuery(this).find("img[src$=.png]").each(function(){jQuery(this).attr('width',jQuery(this).width());jQuery(this).attr('height',jQuery(this).height());var prevStyle = '';var strNewHTML = '';var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' :'';var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' :'';var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' :'';var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' :'';var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' :'';var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' :'';if (this.style.border){prevStyle += 'border:'+this.style.border+';';this.style.border = '';}if (this.style.padding){prevStyle += 'padding:'+this.style.padding+';';this.style.padding = '';}if (this.style.margin){prevStyle += 'margin:'+this.style.margin+';';this.style.margin = '';}var imgStyle = (this.style.cssText);strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt;strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\',sizingMethod=\'scale\');';strNewHTML += imgStyle+'"></span>';if (prevStyle != ''){strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'+'">' + strNewHTML + '</span>';}jQuery(this).hide();jQuery(this).after(strNewHTML);});jQuery(this).find("*").each(function(){var bgIMG = jQuery(this).css('background-image');if(bgIMG.indexOf(".png")!=-1){var iebg = bgIMG.split('url("')[1].split('")')[0];jQuery(this).css('background-image','none');jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";}});jQuery(this).find("input[src$=.png]").each(function(){var bgIMG = jQuery(this).attr('src');jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\',sizingMethod=\'scale\');';jQuery(this).attr('src',settings.blankgif)});}return jQuery;};})(jQuery);(function($){$.InFieldLabels=function(label,field,options){var base=this;base.$label=$(label);base.label=label;labelcontent=$(label).html();$(field).attr('title',labelcontent);base.$field=$(field);base.field=field;base.$label.data("InFieldLabels",base);base.showing=true;base.init=function(){base.options=$.extend({},$.InFieldLabels.defaultOptions,options);if(base.$field.val()!=""){base.$label.hide();base.showing=false;};base.$field.focus(function(){base.fadeOnFocus();}).blur(function(){base.checkForEmpty(true);}).bind('keydown.infieldlabel',function(e){base.hideOnChange(e);}).change(function(e){base.checkForEmpty();}).bind('onPropertyChange',function(){base.checkForEmpty();});};base.fadeOnFocus=function(){if(base.showing){base.setOpacity(base.options.fadeOpacity);};};base.setOpacity=function(opacity){base.$label.stop().animate({opacity:opacity},base.options.fadeDuration);base.showing=(opacity>0.0);};base.checkForEmpty=function(blur){if(base.$field.val()==""){base.prepForShow();base.setOpacity(blur?1.0:base.options.fadeOpacity);}else{base.setOpacity(0.0);};};base.prepForShow=function(e){if(!base.showing){base.$label.css({opacity:0.0}).show();base.$field.bind('keydown.infieldlabel',function(e){base.hideOnChange(e);});};};base.hideOnChange=function(e){if((e.keyCode==16)||(e.keyCode==9))return;if(base.showing){base.$label.hide();base.showing=false;};base.$field.unbind('keydown.infieldlabel');};base.init();};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(options){return this.each(function(){var for_attr=$(this).attr('for');if(!for_attr)return;var $field=$("input#"+for_attr+"[type='text'],"+"input#"+for_attr+"[type='password'],"+"textarea#"+for_attr);if($field.length==0)return;(new $.InFieldLabels(this,$field[0],options));});};})(jQuery);(function(){var BrowserDetect ={init:function (){this.browser = this.searchString(this.dataBrowser) || "An unknown browser";this.version = this.searchVersion(navigator.userAgent)|| this.searchVersion(navigator.appVersion)|| "an unknown version";this.OS = this.searchString(this.dataOS) || "an unknown OS";},searchString:function (data){for (var i=0;i<data.length;i++){var dataString = data[i].string;var dataProp = data[i].prop;this.versionSearchString = data[i].versionSearch || data[i].identity;if (dataString){if (dataString.indexOf(data[i].subString) != -1)return data[i].identity;}else if (dataProp)return data[i].identity;}},searchVersion:function (dataString){var index = dataString.indexOf(this.versionSearchString);if (index == -1) return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS :[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();window.$.client ={os :BrowserDetect.OS,browser :BrowserDetect.browser};})();function date ( format,timestamp ){var that = this;var jsdate=((typeof(timestamp) == 'undefined') ? new Date() :(typeof(timestamp) == 'object') ? new Date(timestamp) :new Date(timestamp*1000) );var _pad = function (n,c){if ( (n = n + "").length < c ){return new Array(++c - n.length).join("0") + n;}else{return n;}};var _dst = function (t){var dst=0;var jan1 = new Date(t.getFullYear(),0,1,0,0,0,0);var june1 = new Date(t.getFullYear(),6,1,0,0,0,0);var temp = jan1.toUTCString();var jan2 = new Date(temp.slice(0,temp.lastIndexOf(' ')-1));temp = june1.toUTCString();var june2 = new Date(temp.slice(0,temp.lastIndexOf(' ')-1));var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60);var daylight_time_offset = (june1 - june2) / (1000 * 60 * 60);if (std_time_offset === daylight_time_offset){dst = 0;}else{var hemisphere = std_time_offset - daylight_time_offset;if (hemisphere >= 0){std_time_offset = daylight_time_offset;}dst = 1;}return dst;};var ret = '';var txt_weekdays = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var txt_ordin ={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"};var txt_months =["","January","February","March","April","May","June","July","August","September","October","November","December"];var f ={d:function (){return _pad(f.j(),2);},D:function (){var t = f.l();return t.substr(0,3);},j:function (){return jsdate.getDate();},l:function (){return txt_weekdays[f.w()];},N:function (){return f.w() ? f.w() :7;},S:function (){return txt_ordin[f.j()] ? txt_ordin[f.j()] :'th';},w:function (){return jsdate.getDay();},z:function (){return (jsdate - new Date(jsdate.getFullYear() + "/1/1")) / 864e5 >> 0;},W:function (){var a = f.z(),b = 364 + f.L() - a;var nd2,nd = (new Date(jsdate.getFullYear() + "/1/1").getDay() || 7) - 1;if (b <= 2 && ((jsdate.getDay() || 7) - 1) <= 2 - b){return 1;}if (a <= 2 && nd >= 4 && a >= (6 - nd)){nd2 = new Date(jsdate.getFullYear() - 1 + "/12/31");return that.date("W",Math.round(nd2.getTime()/1000));}var w = (1 + (nd <= 3 ? ((a + nd) / 7) :(a - (7 - nd)) / 7) >> 0);return (w ? w :53);},F:function (){return txt_months[f.n()];},m:function (){return _pad(f.n(),2);},M:function (){var t = f.F();return t.substr(0,3);},n:function (){return jsdate.getMonth() + 1;},t:function (){return (new Date((f.n() + 1) + '/0/' + f.Y())).getDate();},L:function (){var y = f.Y();return (!(y & 3) && (y % 1e2 || !(y % 4e2))) ? 1 :0;},o:function (){if (f.n() === 12 && f.W() === 1){return jsdate.getFullYear()+1;}if (f.n() === 1 && f.W() >= 52){return jsdate.getFullYear()-1;}return jsdate.getFullYear();},Y:function (){return jsdate.getFullYear();},y:function (){return (jsdate.getFullYear() + "").slice(2);},a:function (){return jsdate.getHours() > 11 ? "pm" :"am";},A:function (){return f.a().toUpperCase();},B:function (){return _pad(Math.floor(((jsdate.getUTCHours() * 36e2) + (jsdate.getUTCMinutes() * 60) + jsdate.getUTCSeconds() + 36e2) / 86.4) % 1e3,3);},g:function (){return jsdate.getHours() % 12 || 12;},G:function (){return jsdate.getHours();},h:function (){return _pad(f.g(),2);},H:function (){return _pad(jsdate.getHours(),2);},i:function (){return _pad(jsdate.getMinutes(),2);},s:function (){return _pad(jsdate.getSeconds(),2);},u:function (){return _pad(jsdate.getMilliseconds()*1000,6);},e:function (){return 'UTC';},I:function (){return _dst(jsdate);},O:function (){var t = _pad(Math.abs(jsdate.getTimezoneOffset()/60*100),4);t = (jsdate.getTimezoneOffset() > 0) ? "-"+t :"+"+t;return t;},P:function (){var O = f.O();return (O.substr(0,3) + ":" + O.substr(3,2));},T:function (){return 'UTC';},Z:function (){return -jsdate.getTimezoneOffset()*60;},c:function (){return f.Y() + "-" + f.m() + "-" + f.d() + "T" + f.h() + ":" + f.i() + ":" + f.s() + f.P();},r:function (){return f.D()+','+f.d()+' '+f.M()+' '+f.Y()+' '+f.H()+':'+f.i()+':'+f.s()+' '+f.O();},U:function (){return Math.round(jsdate.getTime()/1000);}};return format.replace(/[\\]?([a-zA-Z])/g,function (t,s){if ( t!=s ){ret = s;}else if (f[s]){ret = f[s]();}else{ret = s;}return ret;});}function strtotime (str,now){var i,match,s,strTmp = '',parse = '';strTmp = str;strTmp = strTmp.replace(/\s{2,}|^\s|\s$/g,' ');strTmp = strTmp.replace(/[\t\r\n]/g,'');if (strTmp == 'now'){return (new Date()).getTime()/1000;}else if (!isNaN(parse = Date.parse(strTmp))){return (parse/1000);}else if (now){now = new Date(now*1000);}else{now = new Date();}strTmp = strTmp.toLowerCase();var __is ={day:{'sun':0,'mon':1,'tue':2,'wed':3,'thu':4,'fri':5,'sat':6},mon:{'jan':0,'feb':1,'mar':2,'apr':3,'may':4,'jun':5,'jul':6,'aug':7,'sep':8,'oct':9,'nov':10,'dec':11}};var process = function (m){var ago = (m[2] && m[2] == 'ago');var num = (num = m[0] == 'last' ? -1 :1) * (ago ? -1 :1);switch (m[0]){case 'last':case 'next':switch (m[1].substring(0,3)){case 'yea':now.setFullYear(now.getFullYear() + num);break;case 'mon':now.setMonth(now.getMonth() + num);break;case 'wee':now.setDate(now.getDate() + (num * 7));break;case 'day':now.setDate(now.getDate() + num);break;case 'hou':now.setHours(now.getHours() + num);break;case 'min':now.setMinutes(now.getMinutes() + num);break;case 'sec':now.setSeconds(now.getSeconds() + num);break;default:var day;if (typeof (day = __is.day[m[1].substring(0,3)]) != 'undefined'){var diff = day - now.getDay();if (diff == 0){diff = 7 * num;}else if (diff > 0){if (m[0] == 'last'){diff -= 7;}}else{if (m[0] == 'next'){diff += 7;}}now.setDate(now.getDate() + diff);}}break;default:if (/\d+/.test(m[0])){num *= parseInt(m[0],10);switch (m[1].substring(0,3)){case 'yea':now.setFullYear(now.getFullYear() + num);break;case 'mon':now.setMonth(now.getMonth() + num);break;case 'wee':now.setDate(now.getDate() + (num * 7));break;case 'day':now.setDate(now.getDate() + num);break;case 'hou':now.setHours(now.getHours() + num);break;case 'min':now.setMinutes(now.getMinutes() + num);break;case 'sec':now.setSeconds(now.getSeconds() + num);break;}}else{return false;}break;}return true;};match = strTmp.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if (match != null){if (!match[2]){match[2] = '00:00:00';}else if (!match[3]){match[2] += ':00';}s = match[1].split(/-/g);for (i in __is.mon){if (__is.mon[i] == s[1] - 1){s[1] = i;}}s[0] = parseInt(s[0],10);s[0] = (s[0] >= 0 && s[0] <= 69) ? '20'+(s[0] < 10 ? '0'+s[0] :s[0]+'') :(s[0] >= 70 && s[0] <= 99) ? '19'+s[0] :s[0]+'';return parseInt(this.strtotime(s[2] + ' ' + s[1] + ' ' + s[0] + ' ' + match[2])+(match[4] ? match[4]/1000 :''),10);}var regex = '([+-]?\\d+\\s'+'(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?'+'|sun\.?|sunday|mon\.?|monday|tue\.?|tuesday|wed\.?|wednesday'+'|thu\.?|thursday|fri\.?|friday|sat\.?|saturday)'+'|(last|next)\\s'+'(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?'+'|sun\.?|sunday|mon\.?|monday|tue\.?|tuesday|wed\.?|wednesday'+'|thu\.?|thursday|fri\.?|friday|sat\.?|saturday))'+'(\\sago)?';match = strTmp.match(new RegExp(regex,'g'));if (match == null){return false;}for (i = 0;i < match.length;i++){if (!process(match[i].split(' '))){return false;}}return (now.getTime()/1000);}function implode (glue,pieces){var i = '',retVal='',tGlue='';if (arguments.length === 1){pieces = glue;glue = '';}if (typeof(pieces) === 'object'){if (pieces instanceof Array){return pieces.join(glue);}else{for (i in pieces){retVal += tGlue + pieces[i];tGlue = glue;}return retVal;}}else{return pieces;}}function explode (delimiter,string,limit){var emptyArray ={0:''};if ( arguments.length < 2 ||typeof arguments[0] == 'undefined' ||typeof arguments[1] == 'undefined' ){return null;}if ( delimiter === '' ||delimiter === false ||delimiter === null ){return false;}if ( typeof delimiter == 'function' ||typeof delimiter == 'object' ||typeof string == 'function' ||typeof string == 'object' ){return emptyArray;}if ( delimiter === true ){delimiter = '1';}if (!limit){return string.toString().split(delimiter.toString());}else{var splitted = string.toString().split(delimiter.toString());var partA = splitted.splice(0,limit - 1);var partB = splitted.join(delimiter.toString());partA.push(partB);return partA;}}function is_numeric (mixed_var){return (typeof(mixed_var) === 'number' || typeof(mixed_var) === 'string') && mixed_var !== '' && !isNaN(mixed_var);}function loadingObject(obj){var ow = $(obj).width();var oh = $(obj).height();var id = $(obj).attr('id');var ml = $(obj).css('padding-left');var mt = $(obj).css('padding-top');var oz = $(obj).css('z-index');if (oz == '' || oz == undefined) oz = 500;else if (oz < 1) oz = 1;var nz = oz * 10;var clone = $(obj).clone();$(clone).addClass('loading').insertBefore(obj).empty().fadeTo(0,0).css({zIndex:nz,height:oh+'px',width:ow+'px',position:'absolute',background:'black url(images/loading_big.gif) center center no-repeat'}).fadeTo(500,0.65);}function doneLoadingObject(obj){$(obj).closest('.loading').fadeOut(500,function(){$(this).remove();});}(function($){$.extend($.fn,{caret:function (start,end){var elem = this[0];if (elem){if (typeof start == "undefined"){if (elem.selectionStart){start = elem.selectionStart;end = elem.selectionEnd;}else if (document.selection){var val = this.val();var range = document.selection.createRange().duplicate();range.moveEnd("character",val.length);start = (range.text == "" ? val.length :val.lastIndexOf(range.text));range = document.selection.createRange().duplicate();range.moveStart("character",-val.length);end = range.text.length;}}else{var val = this.val();if (typeof start != "number") start = -1;if (typeof end != "number") end = -1;if (start < 0) start = 0;if (end > val.length) end = val.length;if (end < start) end = start;if (start > end) start = end;elem.focus();if (elem.selectionStart){elem.selectionStart = start;elem.selectionEnd = end;}else if (document.selection){var range = elem.createTextRange();range.collapse(true);range.moveStart("character",start);range.moveEnd("character",end - start);range.select();}}return{start:start,end:end};}}});})(jQuery);function currentPage(){return location.pathname.substring(location.pathname.lastIndexOf('/') + 1);}$.fn.clearForm = function(){return this.each(function(){var type = this.type,tag = this.tagName.toLowerCase();if (tag == 'form') return $(':input',this).clearForm();if (type == 'text' || type == 'password' || tag == 'textarea'){this.value = '';if (type == 'text') $(this).focus().blur();}else if ((type == 'checkbox' || type == 'radio') && $(this).hasClass('staychecked') == false) this.checked = false;else if (tag == 'select') this.selectedIndex = -1;});};$.fn.unwrap = function(){this.parent(':not(body)').each(function(){$(this).replaceWith( this.childNodes );});return this;};function function_exists (function_name){if (typeof function_name == 'string'){return (typeof this.window[function_name] == 'function');}else{return (function_name instanceof Function);}}if ($.datepicker){(function($){$.extend($.datepicker._defaults,{'stepMinutes':1,'stepHours':1,'time24h':false,'showTime':false,'altTimeField':''});$.datepicker._connectDatepickerOverride = $.datepicker._connectDatepicker;$.datepicker._connectDatepicker = function(target,inst){$.datepicker._connectDatepickerOverride(target,inst);if (this._get(inst,'showTime')){inst.settings['showButtonPanel'] = true;}var showOn = this._get(inst,'showOn');if (showOn == 'button' || showOn == 'both'){inst.trigger.unbind('click');inst.trigger.click(function(){if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)$.datepicker._hideDatepicker(null);else$.datepicker._showDatepicker(target);return false;});}};$.datepicker._showDatepickerOverride = $.datepicker._showDatepicker;$.datepicker._showDatepicker = function (input){$.datepicker._showDatepickerOverride(input);input = input.target || input;if (input.nodeName.toLowerCase() != 'input') input = $('input',input.parentNode)[0];if ($.datepicker._isDisabledDatepicker(input)) return;var inst = $.datepicker._getInst(input);var showTime = $.datepicker._get(inst,'showTime');if (showTime) $.timepicker.show(input);};$.datepicker._checkExternalClickOverride = $.datepicker._checkExternalClick;$.datepicker._checkExternalClick = function (event){if (!$.datepicker._curInst) return;var $target = $(event.target);if (($target.parents('#' + $.timepicker._mainDivId).length == 0)){$.datepicker._checkExternalClickOverride(event);}};$.datepicker._hideDatepickerOverride = $.datepicker._hideDatepicker;$.datepicker._hideDatepicker = function(input,duration){var inst = this._curInst;if (!inst || (input && inst != $.data(input,PROP_NAME))) return;var showTime = this._get(inst,'showTime');if (input === undefined && showTime){if (inst.input){inst.input.val(this._formatDate(inst));inst.input.trigger('change');}this._updateAlternate(inst);if (showTime) $.timepicker.update(this._formatDate(inst));}$.datepicker._hideDatepickerOverride(input,duration);if (showTime){$.timepicker.hide();}};$.datepicker._selectDate = function(id,dateStr){var target = $(id);var inst = this._getInst(target[0]);var showTime = this._get(inst,'showTime');dateStr = (dateStr != null ? dateStr :this._formatDate(inst));if (!showTime){if (inst.input)inst.input.val(dateStr);this._updateAlternate(inst);}var onSelect = this._get(inst,'onSelect');if (onSelect)onSelect.apply((inst.input ? inst.input[0] :null),[dateStr,inst]);else if (inst.input && !showTime)inst.input.trigger('change');if (inst.inline)this._updateDatepicker(inst);else if (!inst.stayOpen){if (showTime){this._updateDatepicker(inst);}else{this._hideDatepicker(null,this._get(inst,'duration'));this._lastInput = inst.input[0];if (typeof(inst.input[0]) != 'object')inst.input[0].focus();this._lastInput = null;}}};$.datepicker._updateDatepickerOverride = $.datepicker._updateDatepicker;$.datepicker._updateDatepicker = function(inst){$.datepicker._updateDatepickerOverride(inst);$.timepicker.resize();};function Timepicker(){}Timepicker.prototype ={init:function(){this._mainDivId = 'ui-timepicker-div';this._inputId = null;this._orgValue= null;this._orgHour = null;this._orgMinute = null;this._colonPos= -1;this._visible = false;this.tpDiv= $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible" style="width:100px;display:none;position:absolute;"></div>');this._generateHtml();},show:function (input){var inst = $.datepicker._getInst(input);this._time24h = $.datepicker._get(inst,'time24h');this._altTimeField = $.datepicker._get(inst,'altTimeField');var stepMinutes = parseInt($.datepicker._get(inst,'stepMinutes'),10) || 1;var stepHours = parseInt($.datepicker._get(inst,'stepHours'),10) || 1;if (60 % stepMinutes != 0){stepMinutes = 1;}if (24 % stepHours != 0){stepHours = 1;}$('#hourSlider').slider('option','max',24 - stepHours);$('#hourSlider').slider('option','step',stepHours);$('#minuteSlider').slider('option','max',60 - stepMinutes);$('#minuteSlider').slider('option','step',stepMinutes);this._inputId = input.id;if (!this._visible){this._parseTime();this._orgValue = $('#' + this._inputId).val();}this.resize();$('#' + this._mainDivId).show();this._visible = true;var dpDiv = $('#' + $.datepicker._mainDivId);var dpDivPos= dpDiv.position();var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();var tpRight = this.tpDiv.offset().left + this.tpDiv.outerWidth();if (tpRight > viewWidth){dpDiv.css('left',dpDivPos.left - (tpRight - viewWidth) - 5);this.tpDiv.css('left',dpDiv.offset().left + dpDiv.outerWidth() + 'px');}},update:function (fd){var curTime = $('#' + this._mainDivId + ' span.fragHours').text()+ ':'+ $('#' + this._mainDivId + ' span.fragMinutes').text();if (!this._time24h){curTime += ' ' + $('#' + this._mainDivId + ' span.fragAmpm').text();}var curDate = $('#' + this._inputId).val();$('#' + this._inputId).val(fd + ' ' + curTime);if (this._altTimeField){$(this._altTimeField).each(function(){$(this).val(curTime);});}},hide:function (){this._visible = false;$('#' + this._mainDivId).hide();},resize:function (){var dpDiv = $('#' + $.datepicker._mainDivId);var dpDivPos = dpDiv.position();var hdrHeight = $('#' + $.datepicker._mainDivId +' > div.ui-datepicker-header:first-child').height();$('#' + this._mainDivId + ' > div.ui-datepicker-header:first-child').css('height',hdrHeight);this.tpDiv.css({'height':dpDiv.height(),'top' :dpDivPos.top,'left':dpDivPos.left + dpDiv.outerWidth() + 'px'});$('#hourSlider').css('height',this.tpDiv.height() - (3.5 * hdrHeight));$('#minuteSlider').css('height',this.tpDiv.height() - (3.5 * hdrHeight));},_generateHtml:function (){var html = '';html += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">';html += '<div class="ui-datepicker-title" style="margin:0">';html += '<span class="fragHours">08</span><span class="delim">:</span><span class="fragMinutes">45</span> <span class="fragAmpm"></span></div></div><table>';html += '<tr><th>Hour</th><th>Minute</th></tr>';html += '<tr><td align="center"><div id="hourSlider" class="slider"></div></td><td align="center"><div id="minuteSlider" class="slider"></div></td></tr>';html += '</table>';this.tpDiv.empty().append(html);$('body').append(this.tpDiv);var self = this;$('#hourSlider').slider({orientation:"vertical",range:'min',min:0,max:23,step:1,slide:function(event,ui){self._writeTime('hour',ui.value);},stop:function(event,ui){$('#' + self._inputId).focus();}});$('#minuteSlider').slider({orientation:"vertical",range:'min',min:0,max:59,step:1,slide:function(event,ui){self._writeTime('minute',ui.value);},stop:function(event,ui){$('#' + self._inputId).focus();}});$('#hourSlider > a').css('padding',0);$('#minuteSlider > a').css('padding',0);},_writeTime:function (type,value){if (type == 'hour'){if (!this._time24h){if (value < 12){$('#' + this._mainDivId + ' span.fragAmpm').text('am');}else{$('#' + this._mainDivId + ' span.fragAmpm').text('pm');value -= 12;}if (value == 0) value = 12;}else{$('#' + this._mainDivId + ' span.fragAmpm').text('');}if (value < 10) value = '0' + value;$('#' + this._mainDivId + ' span.fragHours').text(value);}if (type == 'minute'){if (value < 10) value = '0' + value;$('#' + this._mainDivId + ' span.fragMinutes').text(value);}},_parseTime:function (){var dt = $('#' + this._inputId).val();this._colonPos = dt.search(':');var m = 0,h = 0,a = '';if (this._colonPos != -1){h = parseInt(dt.substr(this._colonPos - 2,2),10);m = parseInt(dt.substr(this._colonPos + 1,2),10);a = jQuery.trim(dt.substr(this._colonPos + 3,3));}a = a.toLowerCase();if (a != 'am' && a != 'pm'){a = '';}if (h < 0) h = 0;if (m < 0) m = 0;if (h > 23) h = 23;if (m > 59) m = 59;if (a == 'pm' && h< 12) h += 12;if (a == 'am' && h == 12) h= 0;this._setTime('hour',h);this._setTime('minute',m);this._orgHour = h;this._orgMinute = m;},_setTime:function (type,value){if (isNaN(value)) value = 0;if (value < 0)value = 0;if (value > 23 && type == 'hour') value = 23;if (value > 59 && type == 'minute') value = 59;if (type == 'hour'){$('#hourSlider').slider('value',value);}if (type == 'minute'){$('#minuteSlider').slider('value',value);}this._writeTime(type,value);}};$.timepicker = new Timepicker();$('document').ready(function (){$.timepicker.init();});})(jQuery);}function safeEmail(user,domain){if (user == undefined) user = 'pr';if (domain == undefined) domain = 'gamexplain.com';$('body').append('<iframe id="emailiframe" style="height:1px;width:1px;visibility:hidden;" src="/email.php?user='+user+'&domain='+domain+'"></iframe>');setTimeout('$("iframe#emailiframe").remove();',1000);}

