function service_opener(url,window_name,max_width) {
        var window_width_minimum = 600;
        var window_height_minimum = 400;
        var window_width = screen.availWidth;
        var window_height = screen.availHeight;
        if ((window_width  < window_width_minimum) || (window_height < window_height_minimum)) {
                alert('The width and height available on your screen (' +  window_width + 'x' + window_height + ') should be at least (' + window_width_minimum + 'x' + window_height_minimum + ') for this application.');
        }
        var window_width = window_width>max_width?max_width:window_width;
        var window_height = window_height>700?700:window_height;
        var window_left = (screen.availWidth - window_width) / 2;
        var window_top = (screen.availHeight - window_height) / 2;
        new_window=window.open(url, window_name,'width=' + window_width + ',height=' + window_height + ',left=' + window_left + ',top=' + window_top + ',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,copyhistory=no');
        new_window.resizeTo(window_width, window_height);
        new_window.moveTo(window_left, window_top);
        if(window.focus) {
                new_window.focus();
        }
        return false;
}

function mail_window(url,window_name,max_width) {
	var a = window.setTimeout("document.form.submit();",500);
        var window_width_minimum = 600;
        var window_height_minimum = 400;
        var window_width = screen.availWidth;
        var window_height = screen.availHeight;
        if ((window_width  < window_width_minimum) || (window_height < window_height_minimum)) {
                alert('The width and height available on your screen (' +  window_width + 'x' + window_height + ') should be at least (' + window_width_minimum + 'x' + window_height_minimum + ') for this application.');
        }
        var window_width = window_width>max_width?max_width:window_width;
        var window_height = window_height>700?700:window_height;
        var window_left = (screen.availWidth - window_width) / 2;
        var window_top = (screen.availHeight - window_height) / 2;
        new_window=window.open(url, window_name,'width=' + window_width + ',height=' + window_height + ',left=' + window_left + ',top=' + window_top + ',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,copyhistory=no');
        new_window.resizeTo(window_width, window_height);
        new_window.moveTo(window_left, window_top);
        if(window.focus) {
                new_window.focus();
        }
        return false;
}

