
	function conf() {
		if (confirm('Да?')) {
			return true;
		} else {
			return false;
		}
	}

	function search() {
		if (cat>0) {
			window.location='/Filter-c'+cat+'|s'+(document.getElementById("squery").value);
		} else {
			window.location='/Filter-s'+(document.getElementById("squery").value);
		}
		return false;
	}

function implode (glue, pieces) {
    // http://kevin.vanzonneveld.net
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Waldo Malqui Silva
    // *     example 1: implode(' ', ['Kevin', 'van', 'Zonneveld']);
    // *     returns 1: 'Kevin van Zonneveld'
 
    return ( ( pieces instanceof Array ) ? pieces.join( glue ) : pieces );
}

function buy (id,cat,type) {
	if (type==0) {
		if (cat>0) {
			window.location='/Filter-c'+cat+'/Item-'+id+'/buy-'+id+'/';
		} else {
			window.location='/Filter-s'+document.getElementById("squery").value+'/Item-'+id+'/buy-'+cat+'/';
		}
	} else {
		if (cat>0) {
			window.location='/Filter-c'+cat+'/buy-'+id+'/';
		} else {
			window.location='/Filter-s'+document.getElementById("squery").value+'/buy-'+cat+'/';
		}
	}
}

