function addBookmark(){
    var title = document.title;
    var url = window.location.href;

    if(window.sidebar){ // Firefox
        window.sidebar.addPanel(title, url,'');
    }else if(window.opera){ //Opera
        var a = document.createElement("A");
        a.rel = "sidebar";
        a.target = "_search";
        a.title = title;
        a.href = url;
        a.click();
    } else if(document.all){ //IE
        window.external.AddFavorite(url, title);
    } else {
        alert('Uw browser ondersteunt deze functie niet. U dient deze pagina handmatig aan uw favorieten toe te voegen.');
    }
}

function getNewSubmitForm(value){
	var submitForm = document.createElement("FORM");
	submitForm.style.visibility = "hidden";
	document.body.appendChild(submitForm);
	submitForm.method = "POST";
	return submitForm;
}
	
function createNewFormElement(inputForm, elementName, elementValue){
	var newElement = document.createElement('input');
	newElement.style.visibility = "hidden";

	inputForm.appendChild(newElement);
	newElement.value = elementValue;
	newElement.name = elementName;
	return newElement;
}

function createFormAndSubmit(value){
	var submitForm = getNewSubmitForm();
	createNewFormElement(submitForm, "product", value);
	submitForm.action= "/nl/recepten/zoek/";
	submitForm.submit();
}

var now = new Date();
$(document).ready(function () {
    if ($("ul.tabs").length > 0) {
        var mth = $.query.get('mth') ? $.query.get('mth') : now.getMonth();
        $("ul.tabs").tabs("div.seasonPanes > div", { initialIndex: mth });
        DD_belatedPNG.fix('ul.tabs li a.current');
    }
});

