/* 共通javascript */
function openwin(the_url,winname,w,h){
	newWindow = window.open(the_url,winname,"width=" + w +  ",height=" + h + ",scrollbars=yes,states=yes,menubar=no,resizable=yes,toolbar=no,location=no,directories=no");
	newWindow.focus();
}
function swImg(iName,str){
	document.images[iName].src = str;
}
//----------------------------
// マウスオーバー画像切り替え
//----------------------------
function RollOver (obj,val) {
	obj.src = val;
}
//----------------------------
// 検索フォーム
//----------------------------
function setValue(id,sw){
	if (sw == 'on'){
		if (document.getElementById(id).value.indexOf('キーワードを入力') > -1) {
			document.getElementById(id).style.color = '#666666';
			document.getElementById(id).value = '';
		}
	} else {
		if (document.getElementById(id).value == '') {
			document.getElementById(id).style.color = '#999999';
			document.getElementById(id).value = 'キーワードを入力';
		}
	}
}
//----------------------------
// サイト内Search
//----------------------------
function googleSubmit(){
	document.form1.target = '_blank';
	document.form1.method = "get";
	document.form1.action = 'http://www.google.co.jp/search';
	document.form1.submit();
}
//----------------------------
// 画像を先読み
//----------------------------
window.onload = function(e) {
	preLoad(images_ary);					/* 画像を先読み */
}
/* 先読みする画像の配列 */
var images_ary=new Array(
	'images/header/gnavi_home_on.gif',
	'images/header/gnavi_product_on.gif',
	'images/header/gnavi_work_on.gif',
	'images/header/gnavi_profile_on.gif',
	'images/header/gnavi_qa_on.gif'
);
/* 画像先読み処理関数 */
function preLoad(imgAry) {
	var imgMax=imgAry.length;
	var images=new Array(imgMax);
	for (var i=0; i<imgMax; i++) {
		images[i]=new Image();
		images[i].src=imgAry[i];
	}
}

