function preSearch(form) {
	var params = new Array();
	
	$('input, select, textarea', document.forms[form]).each(function(){
		if (this.type == 'radio' || this.type == 'checkbox') {
			if (!$(this).attr('checked') && !$(this).attr('selected')) {
				return true;
			}
		}
		
		if (this.value) {
			params.push(this.name + '=' + this.value);
		}
	});

	$.ajax({
		type: "GET",
		url: document.forms[form].action + 'pre_search/',
		data: params.join('&'),
		timeout: 3000,
		success: function(data){ $('div.text', $(document.forms[form])).html(data) }
	});
}

function jump(select, restore) {
	eval("window.location='" + select.options[select.selectedIndex].value + "'");
	
	if (restore) {
		select.selectedIndex = 0
	};
}

function addCart(url) {
	self.parent.location.href = url;
	self.parent.tb_remove();
}

function positioning() {
	try{
		var nv = navigator.userAgent;
		var bt = document.getElementById("page_navi");
		
		if (nv.match(new RegExp("MSIE 6", "i"))) {
			bt.style.position = "absolute";
			floatbt();
		} else {
			bt.style.position = "fixed";
			bt.style.left = (document.body.offsetWidth / 2) + 420 + "px";
			bt.style.bottom = "5px";
		}
	}
	catch(e){}
}

function floatbt() {
	var bt = document.getElementById("page_navi");
	bt.style.left = (document.body.offsetWidth / 2) + 420 + "px";
	bt.style.top = document.documentElement.clientHeight + document.documentElement.scrollTop - 63 + "px";
	setTimeout("floatbt()", 10);
}

window.onresize = function() { positioning(); }
$(function() {
	positioning();
})

