var userAgent = navigator.userAgent.toLowerCase(); var is_opera = userAgent.indexOf('opera') != -1 && opera.version(); var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3); var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3); function $(id) { return document.getElementById(id); } Array.prototype.push = function(value) { this[this.length] = value; return this.length; } function getcookie(name) { var cookie_start = document.cookie.indexOf(name); var cookie_end = document.cookie.indexOf(";", cookie_start); return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length))); } function setcookie(cookieName, cookieValue, seconds, path, domain, secure) { seconds = seconds ? seconds : 8400000; var expires = new Date(); expires.setTime(expires.getTime() + seconds); document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '/') + (domain ? '; domain=' + domain : '') + (secure ? '; secure' : ''); } function _attachEvent(obj, evt, func) { if(obj.addEventListener) { obj.addEventListener(evt, func, false); } else if(obj.attachEvent) { obj.attachEvent("on" + evt, func); } } function _cancelBubble(e, returnValue) { if(!e) return ; if(is_ie) { if(!returnValue) e.returnValue = false; e.cancelBubble = true; } else { e.stopPropagation(); if(!returnValue) e.preventDefault(); } } function checkall(name) { var e = is_ie ? event : checkall.caller.arguments[0]; obj = is_ie ? e.srcElement : e.target; var arr = document.getElementsByName(name); var k = arr.length; for(var i=0; i'; for(var i in creditsettings) { s += ''; } s += ''; $(obj).innerHTML = s; } function setselect(selectobj, value) { var len = selectobj.options.length; for(i = 0;i < len;i++) { if(selectobj.options[i].value == value) { selectobj.options[i].selected = true; } } } function show(id, display) { if(!$(id)) return false; if(display == 'auto') { $(id).style.display = $(id).style.display == '' ? 'none' : ''; } else { $(id).style.display = display; } }