var typeOptions = {};typeOptions['gallery'] = {'site':'www.maluzen.com/gallery/detailbig', 'name':'装着ギャラリー'};typeOptions['wheel'] = {'site':'www.maluzen.com/wheel/detail', 'name':'ホイール'};typeOptions['all'] = {'site':'www.maluzen.com/', 'name':'マルゼンサイトすべて'};function OnLoad() {	var searchControl = new google.search.SearchControl();		searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);	searchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);//	searchControl.setNoResultsString(google.search.SearchControl.NO_RESULTS_DEFAULT_STRING );	var drawOptions = new google.search.DrawOptions();	drawOptions.setSearchFormRoot(document.getElementById("searchForm"));	drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);	var gtype = '';	if(document.search_form.gt.length)	{		for(var gi=0;gi<document.search_form.gt.length;gi++)			if(document.search_form.gt[gi].checked)				gtype = document.search_form.gt[gi].value;	}	else	{		gtype = document.search_form.gt.value;	}	var typeOption = typeOptions[gtype];	if(gtype)	{		var siteSearch = new google.search.WebSearch();		siteSearch.setUserDefinedLabel(typeOption['name']);		siteSearch.setUserDefinedClassSuffix("gsearch");		siteSearch.setSiteRestriction(typeOption['site']);		searchControl.addSearcher(siteSearch);	}//	searchControl.addSearcher(new google.search.WebSearch());	searchControl.draw(document.getElementById("searchResult"), drawOptions);	var gop = 0;	if(document.getElementById('op'))		gop = document.getElementById('op').value;		var gsearch = '';	if(gop == 0)	{		gsearch = document.getElementById('gs').value;	}	else	{		var gss = ['gs1', 'gs2', 'gs3', 'gs4'];		var gsearchs = [];		for(var gi=0;gi<gss.length;gi++)		{			if(document.getElementById(gss[gi]))				gsearchs.push(document.getElementById(gss[gi]).value);		}		gsearch = gsearchs.join(' ');	}	    if (gsearch.match(/[^\s]/))	 	searchControl.execute(gsearch);	 }function search_submit(type){	document.getElementById('gt').value = type;	document.getElementById('search_form').submit();	return false;}//引数なし 2010/06/08.function search_submit_notype(){	document.getElementById('search_form').submit();	return false;}function change_option(op){	if(op==0)	{		if(document.getElementById('search_normal'))			document.getElementById('search_normal').style.display = 'block';		if(document.getElementById('search_optional'))			document.getElementById('search_optional').style.display = 'none';		if(document.getElementById('change_normal'))			document.getElementById('change_normal').style.display = 'none';		if(document.getElementById('change_optional'))			document.getElementById('change_optional').style.display = 'inline';	}	else	{		if(document.getElementById('search_normal'))			document.getElementById('search_normal').style.display = 'none';		if(document.getElementById('search_optional'))			document.getElementById('search_optional').style.display = 'block';		if(document.getElementById('change_normal'))			document.getElementById('change_normal').style.display = 'inline';		if(document.getElementById('change_optional'))			document.getElementById('change_optional').style.display = 'none';	}	document.getElementById('op').value = op;	 document.getElementById('search_form').style.visibility = 'visible';	return false;}function init_form(){	var gop = 0;	if(document.getElementById('op'))	{		gop = document.getElementById('op').value;		change_option(gop);	}}Event.observe(window, 'load', init_form, false); google.load("search", "1");google.setOnLoadCallback(OnLoad);