function readCookies(name) {
    var start = cookies.indexOf(name + "=");

    if (start == -1) {
        return;
    }
    
    start = cookies.indexOf("=", start) + 1;
    
    var end = cookies.indexOf(";", start);
    
    if (end == -1) {
        end = cookies.length;
    }

    var value = unescape(cookies.substring(start, end));
    
    if (value != null && value == "success") {
        window.open('thankyou.htm', 'Thank_You', 'width=330px, height=390px');
    }
}
