﻿var newwnd;
function windowopen(id, url, height, width, scrollbars, sizeable, force) {
    var newWindow = true;
    var features = 'width=' + width + ',height=' + height + ',status=0,scrollbars=' + scrollbars + ',sizeable=' + sizeable;

    if (newwnd) {
        try {
            if (newwnd.document) newWindow = false;
        }
        catch (e) {
        }
    }

    if (force) newWindow = force;

    if (newWindow)
        newwnd = window.open(url, id, features);
    else {
        newwnd.document.location.href = url;
        newwnd.resizeTo(width, height);
    }

    newwnd.focus();
}

function getflightschema() {
    var parentID = 'Product_ProductContent_ProductContent';
    var ContentID = 'Product_ProductContent_pcvlSCHEMA';
    var SchemaID = 'Product_Price_PriceDetail_VluchtSchema';

    var TabStripID = 'Product_ProductContent_ContentTabStrip';
    var PageViewID = 'Product_ProductContent_TabProductContent';

    var container = document.getElementById(parentID);

    if (container) {
        if (document.getElementById(SchemaID)) {
            container.innerHTML = "<div style='clear: both'></div>";
            container.innerHTML += document.getElementById(SchemaID).innerHTML;
            container.innerHTML += "<div style='clear: both'></div>";
            container.style.display = 'block';
        } 
    }

    try {
        var tabstrip = $find(TabStripID);
        var tab = tabstrip.findTabByText("Vlucht informatie");
        var pageView = $find(PageViewID);
        pageView.get_pageViews().getPageView(tab.get_index()).set_selected(true);
    }
    catch (e) { }
}

function meerkamers() {
    winkamers = window.open('http://www.dejongintra.nl/popups/meerderekamers.htm', 'kamerswin', 'width=360,height=250,resizable=0,scrollbars=no');
    setTimeout('winkamers.focus()', 100);
}
