function isFunction(v){return(typeof v=='function')}function isObject(v){return((v&&typeof v=='object')||isFunction(v))}function isArray(v){return(isObject(v)&&v.constructor==Array)}function isAlien(v){return(isObject(v)&&!isFunction(v))}function isBoolean(v){return(typeof v=='boolean')}function isString(v){return(typeof v=='string')}function isNumber(v){return((typeof v=='number'&&isFinite(v))||(isString(v)&&!isNaN(v)))}function isNull(v){return(typeof v=='object'&&!v)}function isUndefined(v){return(typeof v=='undefined')}function isUrl(v){return(isString(v)&&v.match(/^(news|telnet|nttp|file|http|ftp|https)\:\/\/(?:[^\<\>\*"]+|[a-z0-9\/\._\- !]+)$/i))}function isEmail(v){return(isString(v)&&v.match(/^[a-z0-9_\!#\$%&'\*\+-\/\=\?^`\.\{\|\}~]+@(?:[0-9\.]+|[^\s'"\<\>]+\.[a-z]{2,6})$/i))}var Utils={cookies:[],getCookie:function(name){return this.cookies[name]},setCookie:function(name,value,sticky){expire='';domain='';path=!isUndefined(cookie_path)?cookie_path:'/';if(sticky){expire='; expires=Wed, 1 Jan 2020 00:00:00 GMT'}if(!isUndefined(cookie_domain)){domain='; domain='+cookie_domain}document.cookie=name+'='+value+'; path='+path+expire+domain+';';this.cookies[name]=value},encodeUrl:function(url){if(isUrl(url)){var matches=url.match(/[\x90-\xFF]/g);if(matches){for(var i in matches){url=url.replace(matches[i],'%u00'+(matches[i].charCodeAt(0)&0xFF).toString(16).toUpperCase())}}return escape(url).replace(/\+/g,'%2B')}return url},confirmA:function(message,url){try{eval('var tmp = Lang.'+message);message=tmp}catch(ex){}if(!(message&&tmp)){message='Vui l\u00F2ng x\u00E1c nh\u1EADn tr\u01B0\u1EDBc khi ti\u1EBFp t\u1EE5c.'}if(confirm(message)){if(!isUndefined(url)){if(url.indexOf(request)==-1){url=request+url}if(isUrl(url)){url=url.replace(/&amp;/g,'&');location.href=url}}return true}return false},popup:function(url,width,height,name){if(isUrl(url)){return window.open(url.replace(/&amp;/g,'&'),name?name:'PopUp','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes'+(isNumber(width)?',width='+parseInt(width):'')+(isNumber(height)?',height='+parseInt(height):''))}return false},resize:function(id,maxWidth,maxHeight){var image=jQuery(id);var w=image.attr('width'),h=image.attr('height');if(w&&h){if(!maxWidth&&h>0)maxWidth=w*maxHeight/h;if(!maxHeight&&w>0)maxHeight=h*maxWidth/w;if(!(maxWidth||maxHeight)){maxWidth=250;maxHeight=190}var args=new Array(maxWidth,maxHeight,w,h);var ret=new Array(args[2],args[3]);if(args[2]>args[0]){ret[0]=args[0];ret[1]=Math.ceil((args[3]*((args[0]*100)/args[2]))/100);args[2]=ret[0];args[3]=ret[1]}if(args[3]>args[1]){ret[1]=args[1];ret[0]=Math.ceil((args[2]*((args[1]*100)/args[3]))/100)}w=ret[0];h=ret[1];image.attr('width',w);image.attr('height',h)}return{width:w,height:h}}};