/**
 * Als het links-cms wordt geopend vanuit een ander cms mag dat cms niet gereload worden bij sluiten
 * omdat het formulier daar in nog niet is opgeslagen.
 */
function closeCMS_Links_indexLinks()
{
	if (window.opener.name == 'popup_users') {
		window.close();
	}
	else {
		window.opener.location.href=window.opener.location.href;
		window.close();
	}
}

function showTagcloud(url) {
    var width = 600;
    var height = 450;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_tagcloud', attributes);
    w.focus();
}

function showTextpage(url) {
    var width = 500;
    var height = 400;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_textpage', attributes);
    w.focus();
}

function showAlbums(url) {
    var width = 700;
    var height = 400;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_albums', attributes);
    w.focus();
}

function showBanners(url) {
    var width = 750;
    var height = 600;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_banners', attributes);
    w.focus();
}

function showPodcasting(url) {
    var width = 750;
    var height = 600;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_podcasting', attributes);
    w.focus();
}

function showUploader(url) {
    var width = 450;
    var height = 400;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_albums_uploader', attributes);
    w.focus();
}

function showPoll(url) {
    var width = 650;
    var height = 700;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_poll', attributes);
    w.focus();
}

function showEvent(url) {
    var width = 650;
    var height = 700;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_event', attributes);
    w.focus();
}

function showBlogroll(url) {
    var width = 650;
    var height = 700;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_blogroll', attributes);
    w.focus();
}

function showReport(url) {
    var width = 650;
    var height = 700;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_report', attributes);
    w.focus();
}

function showTextpages(url) {
    var width = 700;
    var height = 500;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_textpages',attributes);
    w.focus();
}

function showChannels(url) {
    var width = 450;
    var height = 300;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_channels',attributes);
    w.focus();
}

function showReview(url) {
    var width = 650;
    var height = 450;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_reviews',attributes);
    w.focus();
}

function showUsers(url) {
    var width = 500;
    var height = 300;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_users',attributes);
    w.focus();
}

function showTags(url) {
    var width = 640;
    var height = 600;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_tags',attributes);
    w.focus();
}

function showArticles(url) {
    var width = 650;
    var height = 700;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_articles',attributes);
    w.focus();
}

function showVideos(url) {
    var width = 650;
    var height = 660;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_videos',attributes);
    w.focus();
}

function searchRelated(url) {
    var width = 450;
    var height = 300;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_related',attributes);
    w.focus();
}

function editReactie(url) {
    var width = 650;
    var height = 450;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url, 'popup_reactie', attributes);
    w.focus();
}

function openPreview(content) {
    var w = window.open('/cms_preview.php?content='+ escape(content), 'preview', 'width=400, height=300, dependent=yes, alwaysRaised=yes');
    w.focus();
}

function showDocs(section)
{
	switch (section) {
		case 'nieuwsbericht':
			var w = window.open('/docs_nieuwsbericht.php','docs_nieuws','width=400,height=300,scrollbars=yes,dependent=yes, alwaysRaised=yes');
		    w.focus();
			break;
	}
}

function showLinks(url) {
    var width = 450;
    var height = 300;
    var attributes = 'width='+ width +', height='+ height +//', top='+ (mouse_y-10) +', left='+ (mouse_x-width-5) +
                     ', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_links',attributes);
    w.focus();
}

function showLinksPage() {
    var width = 450;
    var height = 300;
    var attributes = 'width='+ width +', height='+ height +//', top='+ (mouse_y-10) +', left='+ (mouse_x-width-5) +
                     ', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open('/cms_linkspage_categorieen.php','popup_linkspage',attributes);
    w.focus();
}

function showSyndication() {
    var width = 450;
    var height = 300;
    var attributes = 'width='+ width +', height='+ height +//', top='+ (mouse_y-10) +', left='+ (mouse_x-width-5) +
                     ', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open('/cms_rss_feeds.php','popup_syndication',attributes);
    w.focus();
}

/**
 * sfGuard admin popups
 */

function showSfGuardUsers(url) {
    var width = 800;
    var height = 600;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_sfguard_users',attributes);
    w.focus();
}

function showSfGuardPermissions(url) {
    var width = 800;
    var height = 600;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_sfguard_permissions',attributes);
    w.focus();
}

function showSfGuardGroups(url) {
    var width = 800;
    var height = 600;
    var attributes = 'width='+ width +', height='+ height +', scrollbars=yes, dependent=yes, alwaysRaised=yes, status=yes';

    var w = window.open(url,'popup_sfguard_groups',attributes);
    w.focus();
}