﻿
// Bookmark Panel
jQuery(document).ready(function() {
	var bmToggle = false;

	// Maus rauf auf Button
	jQuery("#butBookmark").mouseenter(function() {
		jQuery("#divBookmarkPnl").fadeIn("fast");
	});

	// Maus runter von Button
	jQuery("#butBookmark").mouseleave(function() {
		window.setTimeout(function() {
			if (bmToggle == false) {
				jQuery("#divBookmarkPnl").fadeOut("slow");
			}
		}, 200);
	});

	// Maus rauf auf BMPanel
	jQuery("#divBookmarkPnl").mouseenter(function() {
		bmToggle = true;
	});

	// Maus runter von BMPanel
	jQuery("#divBookmarkPnl").mouseleave(function() {
		bmToggle = false;
		window.setTimeout(function() {
			jQuery("#divBookmarkPnl").fadeOut("slow");
		}, 200);
	});
});

function generateBookmarkLink(preURL, preTitle, postTitle, getURL, getTitle) {
	if (getURL == true) {
		preURL += encodeURIComponent(window.location)
	}
	if (getTitle == true) {
		preTitle += encodeURIComponent(document.title)
	}
	linkStr = preURL + preTitle;
	if (postTitle.toString().length > 0)
		linkStr += postTitle;

	window.open(linkStr, null);
}

