/* page up
----------------------------------------------- */
function pageup() {
	var nv = navigator.userAgent;
	if (nv.match(new RegExp("MSIE 7", "i"))) { posi = document.documentElement.scrollTop; }
	else if (document.all) { posi = document.body.scrollTop; }
	else { posi = window.pageYOffset; }
	moveObje(posi);
}
function moveObje(position) {
	move = position / 10;
	point = parseInt(position - move);
	scrollTo(0,point);
	if (point > 0) { setTimeout("moveObje(point)",1); }
}


/* smartRollover
----------------------------------------------- */
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


/* form
----------------------------------------------- */
function form_btn() {
document.entry_terms.btn2.disabled =!document.entry_terms.btn[0].checked
}


/* linklist
----------------------------------------------- */
function go(obj) {
	if(obj.form.linklist.value) {
		location = obj.form.linklist.value;
	}
}

function go2(obj) {
	if(obj.form.linklist2.value) {
		location = obj.form.linklist2.value;
	}
}


/* jquery.js window.open
----------------------------------------------- */
$(document).ready(function () {
	$('a[@href^="http"]').not('[@href^="http://www.mia.co.jp/"]').click(function() {
	window.open(this.href, '');
	return false;
	});
	$('a[@href^="http"]').not('[@href^="http://www.mia.co.jp/"]').addClass("exLink");
});


$(document).ready(function () {
	$('a[@href$=".pdf"]').click(function() {
	window.open(this.href, '_blank');
	return false;
	});
});


$(document).ready(function () {
	$('a[@href$="notice.php"]').click(function(){
	window.open(this.href, 'notice', 'width=550, height=720, menubar=no, toolbar=no, location=no, scrollbars=no, resizable=yes');
	return false;
	});
});

$(document).ready(function () {
	$('a[@href$="voice01.php"]').click(function(){
	window.open(this.href, 'voice', 'width=660, height=720, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes');
	return false;
	});
});

$(document).ready(function () {
	$('a[@href$="voice02.php"]').click(function(){
	window.open(this.href, 'voice', 'width=660, height=720, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes');
	return false;
	});
});

$(document).ready(function () {
	$('a[@href$="voice03.php"]').click(function(){
	window.open(this.href, 'voice', 'width=660, height=720, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes');
	return false;
	});
});

$(document).ready(function () {
	$('[@href$="trial.php"]').click(function(){
	window.open(this.href, 'trial', 'width=800, height=650, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes');
	return false;
	});
});

$(document).ready(function () {
	$('a[@href$="mailmagazine_sample.php"]').click(function(){
	window.open(this.href, 'voice', 'width=560, height=720, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes');
	return false;
	});
});

/* jquery.js change table bgcolor
----------------------------------------------- */
$(document).ready(function() {
	$(".tabletype02").each(function() {
		trs = $(this).children();
		$(trs).find("tr:even").addClass("changeTrBg");
	});
});


/* jquery.js change bgcolor
----------------------------------------------- */
$(document).ready(function() {
	$(".list_entry dd").click(function() {
    	window.location=$(this).find("a").attr("href");
		return false;
	});
});


$(document).ready(function() {
	$(".list_expert dd").click(function() {
    	window.location=$(this).find("a").attr("href");
		return false;
	});
});


$(document).ready(function() {
	$(".listtype_news li").click(function() {
    	window.location=$(this).find("a").attr("href");
		return false;
	});
});


$(document).ready(function() {
	$(".linkbox").click(function() {
    	window.location=$(this).find("a").attr("href");
		return false;
	});
});


$(document).ready(function() {
	$(".search_service dd").click(function() {
    	window.location=$(this).find("a").attr("href");
		return false;
	});
});
