
//////////ポップアップウィンドウ//////////


//お知らせ
function openNews01() {
	var w = window.open("", "News01", "width=640,height=580,scrollbars=1,resizable=0,toolbar=0,menubar=0,location=0,status=0");
	if((w == window) || w.closed) { w.focus();} else {w.focus();}
	return(false);
}

//企業詳細・ブックマーク　onclick="openCompanyDetail();" target="CompanyDetail"
function openCompanyDetail() {
	var w = window.open("", "CompanyDetail", "width=770,scrollbars=1,resizable=1,toolbar=0,menubar=1,location=0,status=1");
	if((w == window) || w.closed) { w.focus();} else {w.focus();}
	return(false);
}

//企業一括エントリー　onclick="openCompanyEntry();" target="CompanyEntry"
function openCompanyEntry() {
	var w = window.open("", "CompanyEntry", "width=770,scrollbars=1,resizable=1,toolbar=0,menubar=1,location=0,status=1");
	if((w == window) || w.closed) { w.focus();} else {w.focus();}
	return(false);
}

//企業一括エントリー　onclick="openprintSchedule();" target="printSchedule"
function openprintSchedule() {
	var w = window.open("", "printSchedule", "width=700,scrollbars=1,resizable=1,toolbar=0,menubar=1,location=0,status=1");
	if((w == window) || w.closed) { w.focus();} else {w.focus();}
	return(false);
}


//////////ログイン IDテキストフィールド//////////

function eraseID(obj){
if (obj.value == obj.defaultValue) obj.value = "";}




//文字カウント

function update(){
	document.form.cmd.value = "update";
	document.form.submit();
}
function changedate(val){
	
	if(val == 0){
		document.form.kinmu_to_m.disabled = false;
		document.form.kinmu_to_y.disabled = false;
	}else{
		document.form.kinmu_to_m.disabled = true;
		document.form.kinmu_to_y.disabled = true;
	}
}

function check(formobj,writeobj){
	$(writeobj).setText(count( trim(formobj) ));
	return true;
}
function $(tagID){
	var tagObj = document.getElementById(tagID);
	tagObj.setText = function (srcText) {
		if (navigator.userAgent.indexOf("Firefox") > -1) {
			tagObj.textContent = srcText;
		}else{
			tagObj.innerHTML = srcText;
		}
	}
	return tagObj;
}
function trim(str) {
	var ret;
	var regexp = new RegExp("[\r\n]", "g");
	ret = str.replace(regexp,"");
	ret = ret.replace(/[ 　]+$/,"");
	return ret;
}
function count(str) {
	var len = str.length;
	Br=navigator.appName;
	if(Br=="Netscape"){
		return len;
	} else if(Br=="Microsoft Internet Explorer") {
		return len;
	}
}


//ロールオーバー

// デフォルト画像名：xxxxx_out.gif
// マウスオーバー時画像名：xxxxx_out.gif で保存してください。（拡張子はなんでもOK)

function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_out\\."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_out.", "_over."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_over.", "_out."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}

