function index2search(){
	var objs = document.getElementsByTagName("input");
	var ax = 0;
	extSetting = ";path=/;domain=homebook.com.tw";
	for(ax=0;ax<objs.length;ax++){
		var dom = objs[ax];
		if(dom.type=="radio"){
			if(dom.checked){
				var i2f = document.getElementById('index2searchform');
				document.cookie = "keyword="+encodeURI(document.getElementById('keyword').value)+extSetting;
				document.cookie = "searchTag="+extSetting;
				document.cookie = "searchCity="+extSetting;
				document.cookie = "searchArea="+extSetting;
				window.location.href = i2f.getAttribute("linktype")+"select/"+dom.value;
				break;
			}
		}
	}
	return false;
}
function cloud2search(tag,name){
	extSetting = ";path=/;domain=homebook.com.tw";
	document.cookie = "keyword="+extSetting;
	document.cookie = "searchTag="+encodeURI(name)+extSetting;
	document.cookie = "searchCity="+extSetting;
	document.cookie = "searchArea="+extSetting;
	window.location.href = searchURL+"select/"+tag;
}
function cloud2homeCity(name){
	extSetting = ";path=/;domain=homebook.com.tw";
	document.cookie = "keyword="+extSetting;
	document.cookie = "searchTag="+extSetting;
	document.cookie = "searchCity="+encodeURI(name)+extSetting;
	document.cookie = "searchArea="+extSetting;
	window.location.href = searchURL+"select/home";
}
function cloud2homeCityAndArea(name1,name2){
	extSetting = ";path=/;domain=homebook.com.tw";
	document.cookie = "keyword="+extSetting;
	document.cookie = "searchTag="+extSetting;
	document.cookie = "searchCity="+encodeURI(name1)+extSetting;
	document.cookie = "searchArea="+encodeURI(name2)+extSetting;
	goURL = searchURL+"select/home";
	window.location.href = goURL;
}
function order2search(type,byname,byorder){
	extSetting = ";path=/;domain=homebook.com.tw";
	document.cookie = "keyword="+extSetting;
	document.cookie = "searchTag="+extSetting;
	document.cookie = "searchCity="+extSetting;
	document.cookie = "searchArea="+extSetting;
	window.location.href = searchURL+"select/"+type+"/"+byname+"/"+byorder;
}
