- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
// jquery required
function trim(str){
return str.replace(/^\s+/, "").replace(/\s+$/, "");
}
function round1000(val){
return Math.round(parseInt(val)/1000)*1000;
}
function floor1000(val){
return Math.floor(parseInt(val)/1000)*1000;
}
function ceil1000(val){
return Math.ceil(parseInt(val)/1000)*1000;
}
function setCookie(c_name,value,expiredays){
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+'='+escape(value)+((expiredays==null)?'':';expires='+exdate.toGMTString())+';path=/';
}
function resetCookie(c_name){
var exdate=new Date(0);
document.cookie = c_name + '=0;expires=' + exdate.toUTCString() + ';path=/';
}
function getCookie(name){
var cookies=document.cookie.split(";");
for(var i=0;i<cookies.length;i++){
var params=cookies[i].split("=");
if(trim(params[0])==name){
return unescape(params[1]);
}
}
return false;
}
function asyncScriptLoader(scriptUrl){
var d=document,
h=d.getElementsByTagName('head')[0],
s=d.createElement('script');
s.type='text/javascript';
s.async=true;
s.src=scriptUrl;
h.appendChild(s);
}