$(document).ready( function() {

	$("#search_button").click(function () {

		var country_id 						= $("select[name='country_id']").val()
		var creditcard_kinds_id		= $("select[name='creditcard_kinds_id']").val()
		var provider_id	 					= $("select[name='provider_id']").val()
		var creditcard_limit	 		= $("select[name='creditcard_limit']").val()
		var creditcard_price	 		= $("select[name='creditcard_price']").val()

		if(creditcard_kinds_id=="") creditcard_kinds_id = "0";
		if(provider_id=="") provider_id = "0";

		url = 'category_list.php?country_id='+country_id+'&creditcard_kinds_id='+creditcard_kinds_id+'&provider_id='+provider_id+'&creditcard_limit='+creditcard_limit+'&creditcard_price='+creditcard_price+'';
		
		window.location.href 	= 'http://www.creditcard.be/'+url;

	} )

});



function CreateBookmarkLink() {

	title = "Creditcard.be | Creditcards vergelijken en aanvragen!";
	url = "http://www.creditcard.be";

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
		else if(window.opera && window.print) { // Opera Hotlist
			return true; }
}


function newScreen(url) {
	var window_height = screen.availHeight - 30;
	var window_width = screen.availWidth - 6;
	var window_top = (screen.availHeight-window_height)/2-10;
	var window_left = (screen.availWidth-window_width)/2-5;
	nw = window.open('','newwindoes','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,maximize=yes,minimize=yes');
	if(!nw) nw = top;
	nw.location.href = url;
	return false;
}