var lang = new Array();
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);
}
//定数グループのpushプロパティ
Array.prototype.push = function(value) {
this[this.length] = value;
return this.length;
}
//javascript全选関数
function checkall(form, prefix, checkall) {
var checkall = checkall ? checkall : 'chkall';
for(var i = 0; i < form.elements.length; i ) {
var e = form.elements[i];
if(e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
e.checked = form.elements[checkall]。チェック済み。
}
}
}
function doane(event) {
e = event ? イベント: window.event;
if(is_ie) {
e.returnValue = false;
e.cancelBubble = true;
} else if(e) {
e.stopPropagation();
e.preventDefault();
}
}
function fetchCheckbox(cbn) {
return $(cbn) && $(cbn).checked == true ? 1:0;
}
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 thumbImg(obj) {
var zw = obj.width;
var zh = obj.height;
if(is_ie && zw == 0 && zh == 0) {
var matches;
re = /width=(["']?)(d )(1)/i;
matches = re.exec(obj.outerHTML);
zw = matches[2];
re = /height=(["']?)(d )(1)/i;
一致 = re.exec(obj.outerHTML);
zh = 一致[2];
}
obj.resize = true;
obj.style.width = zw 'px';
obj.style.height = '自動';
if(obj.offsetHeight > zh) {
obj.style.height = zh 'px';
obj.style.width = 'auto';
}
if(is_ie) {
var imgid = 'img_' Math.random();
obj.id = imgid;
setTimeout('try {if ($('' imgid '').offsetHeight > ' zh ') {$('' imgid '').style.height = '' zh 'px';$('' imgid ' ').style.width = 'auto';}} catch(e){}', 1000);
}
obj.onload = null;
}
function imgzoom(obj) {}
function in_array(needle, haystack) {
if(針の種類 == '文字列' || 針の種類 == ' number') {
for(var i in haystack) {
if(haystack[i] == needle) {
return true;
}
}
}
return false;
}
function setcopy(text, alertmsg){
if(is_ie) {
clipboardData.setData('Text', text);
アラート(alertmsg);
} else if(prompt('Ctrl C を押してクリップボードにコピー', text)) {
alert(alertmsg);
}
}
関数 isUnknown(変数) {
変数の型を返す == '未定義'?? true : false;
}
function mb_strlen(str) {
var len = 0;
for(var i = 0; i < str.length; i ) {
len = str.charCodeAt(i)